CircleCI Ideas

Add 'circleci step skip-build' command

Current support

Currently it's possible to stop a job once it's started based on some conditions/logic within a step by calling `circleci step halt`. The job will stop and it's marked as successful. It's very useful to be able to to this so you can properly terminate a job based on some (complex) conditions. The build is 'successful' however, so following jobs in a workflow will be executed.


It would be great to be able to tell CircleCI to fully skip a build from a job step. Marking it as 'skipped' in the CircleCI UI and thus ignoring any other following builds or jobs in the workflows.


Add a command to tell CircleCI to fully skip the current build. I propose `circleci step skip-build` (similar to the existing `circleci step halt`).

- steps:
- run: circleci step skip-build

This causes:

  • ... the current job to stop (not executing any following steps).
  • ... to not start any following jobs or workflows for this build.
  • ... to finish other parallel jobs for this build, but any following jobs won't be started.
  • ... mark the build as 'skipped' for the CircleCI UI. 
  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Mar 2 2018
  • Taking votes
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    February 23, 2019 14:43

    I agree, but I think it shouldn't skip the whole build just the "branch" so any build that has the job as a dependency should be skipped too. This would be useful for monorepos when you skip the unmodified parts so no testing, building or deploying will be done.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    August 05, 2019 19:25

    How different is this proposal from canceling a job?