Conditional manual approval steps in workflows

When running jobs, you might want to sometimes skip the manual approva


for example when running an acceptance test - if everything is 100% then we can skip manual approval

if things are less than 100% then we want to manually approve

  • Guest
  • Sep 17 2018
  • New
  • Attach files
  • James Crowley commented
    24 Mar 23:22

    Also here because of the terraform use-case (only want the manual approval step when there are changes to apply)

  • Rob Grant commented
    23 Mar 15:06

    I got here through Google because I also have a Terraform use case.

  • Peter Brøndum commented
    December 04, 2019 09:50

    Any updates on this one ? 

  • Joshua Kleckner commented
    June 06, 2019 22:00

    Would love this. We have a lerna monorepo and with more work than I'm happy with have been able to get it all going thanks to circleci existing flexibility (we only test and build packages that changed). The last part is publishing new versions: I'd like to have manual approvals for production releases of only builds that have actually happened.

  • Eddie Bachle commented
    March 05, 2019 14:12

    We also are interested in this from the perspective of a terraform approvals workflow.  I want the terraform plan command to do a state comparison on every run, but would prefer if users didn't have to manually approve when there are no changes detected.

  • Eric Dahlseng commented
    January 02, 2019 20:01

    This also would be helpful for running Terraform jobs. Right now our infrastructure workflow is split into several different pieces, each one consisting of a plan, approval, and apply step. If the plan step shows no drift, however, then it would be great to skip the approval step, so that it's easy to tell whether or not the entire workflow succeeds or not (right now there are a lot of pending approval steps for each run).

  • Kara Louie commented
    December 17, 2018 23:47

    Our use case is slightly different.

    We have a workflow that deploys our app (master branch only) to our staging environment if everything goes well. The problem occurs when something flakes, and we decide to rerun a workflow. If it's rerun AFTER another workflow has already started, the second workflow will usually complete first. This deploys the new version of the branch to staging. Then the rerun workflow will complete and deploy an older version of the branch to staging. I'd like to optionally have a manual approval when the circle SHA is an ancestor of the SHA in our staging environment. I managed all the logic of that on our own, but manual approval types don't allow for adding commands prior to the manual approval step.