I am using Jenkins (v1.592) with the Git Client Plugin (v1.12.0) and the Git Plugin (v2.3).
I have a build task that should be called if there have been changes in my git repository, if the changes were NOT made in the start / main or origin / name branches, and N is a decimal number.
I was very pleased to see that Jenkins allows regular expressions as a branch specifier in the "Branches for assembly" option. But, unfortunately, I do not believe that my expression works correctly:
My expression:
:master|name(\d+)
I also activated the "Choosing what to build strategy" with the "Reverse" option.
When I click on my master assembly now, it will be selected and the assembly will begin.
I use "Poll SCM" without a schedule and run the build with the Jenkins notifyCommit notification URL.
I also tried using: (?! (Origin / master | origin / name \ d +)) as a regex without an inverse option, but getting an error here.
source share