Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins: Don't build if only README changed

Tags:

git

jenkins

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.

like image 718
Igor Galić Avatar asked Oct 17 '25 18:10

Igor Galić


1 Answers

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.

like image 95
Daniel Gruno Avatar answered Oct 20 '25 07:10

Daniel Gruno



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!