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 CI/CD support to your Heroku app.

For this guide you will need:

1) Heroku user account https://signup.heroku.com/

2) Create an App in side Heroku

3) Get your Heroku Token or (API Key form your account) https://dashboard.heroku.com/account

4) Get one Razorops account here https://dashboard.razorops.com

5) Connect your GIT provide account under integration: https://dashboard.razorops.com/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

  - BUNDLE_PATH=$(CI_WORKSPACE)/vendor/bundle

    type: restore
      - bundle-[[ checksum "Gemfile.lock" ]]
      - bundle-cache-[[ .RepoBranch ]]

    image: buildpack-deps:trusty
      - git push https://heroku:[email protected]/$HEROKU_APP_NAME.git master

  - name: staging
    tasks: [deploy-to-heroku]
    when: branch == "staging"

Razorops will trigger pipeline if code is pushed to staging branch.

Razorops will deploy staging branch to heroku.

More details https://docs.razorops.com/languages/ruby.html

Enjoyed this article? Share it.

About The Author

Shyam Mohan

DevOps Engineer

Shyam Mohan is a DevOps Engineer and he has 14+ years of experience in the areas of Software Development, Devops, CI/CD, Kubernetes, and he also guides companies to adopt CI/CD pipelines which will help them to automate their workflow.

Upcoming Webinar

Kubernetes 101- Get started with Kubernetes

28th May,2022

11:30 AM IST


Want to setup CI/CD in a more complex app?

Request a Demo