Is there any way to avoid triggering build on certain file commits which are not directly related to source code?
e.g. I don't want to trigger a automatic build when anyone make changes to README.md file or some reference document file.
Is there any way to avoid triggering build on certain file commits which are not directly related to source code?
e.g. I don't want to trigger a automatic build when anyone make changes to README.md file or some reference document file.
I don't know that it's described in the plugin page or the Wiki, but at least according to the Advanced Features/Additional Behaviors, the git plugin can be configured to do what you're looking for in multiple ways.
eg: Polling ignores commits in certain paths
lets you specify an Included region or Excluded region" The help (?) says:
Each exclusion uses java regular expression pattern matching, and must be separated by a new line.
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
You'd have to try them out. One less plugin - KISS!
After searching for quite a while I finally found a Jenkins plugin which can skip the build when there is keyword "[ci skip]" in the commit message.
This allows to skip a build on any file commit which has this keyword [ci skip].
only disadvantage is, it will skip the build even if somebody puts [ci skip] in a code file commit
Github: jenkins-ci-skip-plugin