Jenkins Gerrit trigger on all branches except master

狂风中的少年 提交于 2020-01-09 19:45:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!