-
New Feature
-
Resolution: Unresolved
-
Major
-
None
Currently this plugin lets you skip CI builds based on some ignore list kept in Jenkins configuration (BranchBuildStrategy). This has some serious limitations:
- It is hard to keep an audit trail of changes, unless you also use jobConfigHistory or job-dsl.
- You need Item.CONFIGURE permission to make changes. For example, on ci.jenkins.io this would mean filing an INFRA ticket and waiting for an overworked administrator to pay attention.
- In the case of an OrganizationFolder, you can only set safe generic patterns like README.md—there is no way to define per-repository patterns.
The recommended usage mode should instead be to create a file in the repository itself listing patterns to exclude (or perhaps include). The contents of this file should be read (using SCMFileSystem, a.k.a. "lightweight checkout") in the currRevision, so that you can create an atomic commit which both adds some new file irrelevant to CI and marks it in the ignore list, without triggering a build.
I would suggest the file name .jenkinsignore by analogy with .gitignore, .dockerignore, etc. For consistency with other Ant PatternSet usages in Jenkins, it can use the same syntax as the current configuration:
.* *.md docs/ images/
though most people would be more familiar with the syntax of .gitignore, if there is some JVM parser available for it.