CircleCI-Public / heroku-orb

Easily install and use the Heroku CLI with CircleCI to build, test, and deploy your applications to Heroku.
https://circleci.com/orbs/registry/orb/circleci/heroku
MIT License
6 stars 20 forks source link

feat: adding a provision to skip heroku deployment [semver: minor] #33

Closed ppentakota1 closed 2 years ago

ppentakota1 commented 3 years ago

We use heroku-orb in circleci for our heroku deployments and our heroku deployments are triggered when a new semantic version is created, the semantic version can be created from couple of branches. In this case we want to have a control on the heroku deployment on a each environment based on the semantic version branch.

As we do not have a conditional steps allowed in circleci on orbs , adding the provision in heroku orb by adding a new param skip-deploy

If it is set to true , the heroku-deploy-via-git will not perform any deployment

ppentakota1 commented 3 years ago

@brivu can you please provide your review , we want to have this feature with the heroku orb so that we can have the flexibility in the deployment circleci pipelines , so that we can skip deploying to certain environments based on our predefined conditions and with new option we updated in this PR

ppentakota1 commented 2 years ago

Can someone approve/review this ?

EricRibeiro commented 2 years ago

This PR can't be merged any longer due to the refactoring done for v2.0.0. Additionally, this sounds like something you could accomplish with tag or branch filters or dynamic config.

As we do not have a conditional steps allowed in circleci on orbs

You can always create your own job with the orb's command to leverage conditional workflows:

description: >
  'A simple example of a job utilizing the `install` and `deploy-via-git` commands.'
usage:
  version: 2.1
  orbs:
    heroku: circleci/heroku@2.0

  parameters:
      skip-deploy:
         type: boolean
         default: true

  workflows:
    heroku_deploy:
      jobs:
        - deploy

  jobs:
    deploy:
      executor:
        heroku/default
      steps:
        - checkout
        - heroku/install
        - when:
                condition: << parameters.skip-deploy >>
                steps:
                    - heroku/deploy-via-git