Razorops CI/CD with heroku apps

Razorops CI/CD with heroku apps

This post i will explain how to deploy rails app on heroku using Razorops CI/CD

Deploying to heroku was super easy as it happen with just a git push, with razorops you can add Unit Testing, Code Scaning support to your Heroku app.

For this guide you will need:

1) Heroku user account

2) Create an App in side Heroku

3) Get your Heroku Token or (API Key form your account)

4) Get one Razorops account here

5) Connect your GIT provide account under integration:

6) Create a Pipeline on dashboard

7) Edit your pipeline and add your heroku HEROKU_API_KEY and HEROKU_APP_NAME environment variables

Add a .razorops.yaml in your project’s root directory

  runner: ruby:3.1.2

    - checkout
    - run: bundle install
    - commands:
        - bundle exec rspec

    depends: [unit-tests]
    when: branch == 'production'
    - checkout
    - commands:
      - gem install dpl
      - dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_API_KEY

Razorops will trigger pipeline if code is pushed to production branch. it will deploy production branch to heroku.

meet razorops team

Ready to get started?

Start with Free Plan..

Signup Here