Mina Galić
Mina Galić

Reputation: 260

Jenkins: Don't build if only README changed

We have our project in git and by the way our process works for stable branches there are often commits to those that don't affect the code at all. This could be a change to the README or INSTALL file in other projects in our case it's to the STATUS and CHANGES files by the means of voting for a particular change.

Because we have LOTS of Jenkins slaves (on the same physical) for different flavours of Unix, we'd like to put as little pressure on our buildbots for those kind of changes. We can always force a rebuild manually, over the web interface or on IRC, but we want to make sure that when ONLY a README, INSTALL, STATUS, or CHANGES file was changed Jenkins does not rebuild the project.

Upvotes: 4

Views: 2497

Answers (1)

Daniel Gruno
Daniel Gruno

Reputation: 111

In the Source Code Management tab in your build's configuration, click on 'Advanced' and go to the field called 'Excluded Regions'. Enter the names of the files you wish to ignore, one file per line, and that should cause Jenkins to ignore these files when polling to see whether a build should be triggered.

Upvotes: 6

Related Questions