Any option as 'skip_build' inside step/command sections

Is there any option or environment variable that can be used to skip the build if some condition occurs while building the project.

I have thought of the options to skip builds based on branches, but this is bit powerless. It would be great if this gets added to a feature. Say while building the project, a special case appears and we can skip build with a environment variable turning to ‘FALSE’ state.

Note : Checking for the condition in each command steps would be a difficult task for projects like mine which got lots of steps.

6 Likes

I would also LOVE this feature. I use circleci 2.0 to power a bunch of monorepos, and I’d like a feature like this so that I can skip builds that don’t apply based on the files changed in a given commit.

I’d suggest another option: if a step exits with a very specific exit code, e.g. 666, then skip the rest of the build steps.

This would be hugely beneficial to me and my team.

I would love to see it too.

As a stop-gap, what I’d do here is to create a downstream mirror repo for each of your individually buildable sections, and then run CI off that. I’ve never done it, but I imagine it could be hacked together with some Elastoplast and Sellotape, until such time as a skip option is implemented natively.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.