I cannot get the "included regions" feature to work in Jenkins with the Git plugin. I want a job only to be built when there a changes in "his" directory. Example: the project mytool should only be build when there are changes under GIT_ROOT/tools/mytool/
. I tried several forms for the regex in the included regions field:
/tools/mytool/.*
tools/mytool/.*
^tools/mytool/.*
With any of these regexes the result is the same: mytool builds every time a change is commited - no matter where. I also tried the excluded regions the same way - also not working. What am I doing wrong?
For me it started working when checking "Force polling using workspace" under "Source-Code-Management - Additional Behaviours" in the job config. Smells like a bug - there are several open regarding the included/excluded regions feature of the git plugin.
EDIT: it stopped working after updating jenkins and the git plugin. The cause is probably:
https://issues.jenkins-ci.org/browse/JENKINS-20607
I am thinking of moving to this method here
I just had this problem, and the answer was slightly different than the other answers. That being said, the solution lay in the question itself. For me, I had paths in the "Included Regions" with the pattern:
service/Search/AbstractSearchServices/master/**/*
I changed the pattern to:
service/Search/AbstractSearchServices/master/.*
Once I changed to that pattern, it worked perfectly for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With