问题
I have a build in Jenkins triggered by Gerrit I would like to trigger on all branches except master
. What regex should I use for this?
回答1:
Using a negative lookahead worked for me:
^(?!.*master).*$
Should trigger on everything except master. Kudos to this questions answers.
回答2:
The following worked for me:
^(master.+|(?!master).*)$
This excludes master only. Not master_joda, for example.
It is also based on these answers.
来源:https://stackoverflow.com/questions/17155249/jenkins-gerrit-trigger-on-all-branches-except-master