Jenkins Gerrit trigger on all branches except master

Kara picture Kara · Jun 17, 2013 · Viewed 11.5k times · Source

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?

Answer

romanofski picture romanofski · Sep 10, 2013

Using a negative lookahead worked for me:

^(?!.*master).*$

Should trigger on everything except master. Kudos to this questions answers.