We want our Teamcity server to do an automatic build whenever someone merges something back to the master branch.
To do this we have created a new VCS Trigger and checked the Trigger a build on each check-in-option. We have disabled the Quiet period mode and added a regular expression for the trigger rule.
Checking out the Java regex documentation I've created the following regex:
^Merge branch '[a-zA-Z0-9\p{Punct}]+' into 'master'$ which translates to the following in the Trigger rules textblock: +:comment=^Merge branch '[a-zA-Z0-9\p{Punct}]+' into 'master'$ or +:comment=^Merge branch '[a-zA-Z0-9\p{Punct}]+' into 'master'$:** (I haven't got the slightest idea what :** should do, but the TC documentation uses this sometimes)
This should match something like:
Merge branch 'test' into 'master'
or
Merge branch 'feature-cs-200' into 'master'
However, the builds are never triggered. Apparently the regex doesn't match the correct pattern.
Any ideas?
Finished...
Apparently Teamcity has decided the +:comment=^Merge branch '[a-zA-Z0-9\p{Punct}]+' into 'master'$ regex is fine now and triggers the builds whenever a commit message matches the examples. Perhaps there was some caching or something else which caused the trigger not to fire.
Include several check-ins in a build if they are from the same committer). This isn't a big problem, but it causes some overhead. Therefore we decided, for now, only builds are triggered if they are merged in this way. - Jan_V