Setting a custom command to skip ci


#1

Is is possible to create a custom command to trigger the same effect as [ skip ci ].


#2

You can certainly exit a build early, by not running tests or build processes. What condition are you looking to implement that would decide whether to skip?


#3

I’m trying to implement a condition whereby builds will only run, if particular folders have been modified.
the repo goes through two different CI’s so prefixing [skip ci] would mean skipping both, so i wanted to know if there was anything specific to circle, that i couldn’t implement to prevent builds.

How would I exit a build early?


#4

Just don’t run the primary command(s) that make your build. For example, if the purpose of a build stage is to build a Docker image and push it, then use shell conditionals to avoid doing that. If you’re running tests, use shell conditionals again.

This has the disadvantage that your build will be marked as “successful” or “failed”, when you probably want “skipped” or nothing at all, but there is no explicit skip device as far as I know.


#5

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