-
New Feature
-
Resolution: Unresolved
-
Minor
Sometimes you don't want to have CI build every time you push, especially if the build takes a long time or uses many executors.
It would be nice if it was possible to define criteria to skip building commits, for example, if the commit message contains the string "skip ci" or matches a user-definable regex.
Temporarily removing or renaming the Jenkinsfile is, of course, a workaround, but not a particularly elegant one.
- is related to
-
JENKINS-45502 Add concept of "interesting" to SCMHead and SCMRevision
-
- Open
-
Probably a better approach would be to have the first step of the Jenkinsfile check the commit log vs the last build commit and if the all commits since the last build match a regex, then record the build as whatever the last build status was / user configurable.
If the branch source hid branches where the last commit matched a regex, then you would end up deleting the branch job - which is not what you want.
We don't know the changelog until the build is started and it would be costly to constantly check the changelog (requiring a full git clone for some repository hosting providers)
It would be - to my mind - relatively simple to have a pipeline step that checks the changelog against a regex and stops the build early if all commits since last build match the supplied regex.
Would that be an acceptable solution?