VCS Trigger rules to disable a build not quite working

Hi all,

I have a VCS trigger issue to disable a build with specific commit message.

we have a git repository of our software setup in Teamcity with two build config.

The first one we use VCS trigger and build every push commit, the second one we disable VCS trigger and only will build the manual triggered build for our release build.

when we need a release build, we push an empty commit with a special text “(( release_xxx ))” to trigger a release build, we manually triggered it in the 2nd build config and want to disable the automatic trigger on the first one to avoid duplicated build.

In the first build config with VCS trigger enabled, I cannot fully disable it not triggering the special release build, I think it works when the Change contain a single commit, but fail when the Change contain multiple commits.

the trigger rule looks like this currently:  -:root=Root_mainsoftwareOnGithub;comment=(?s)^\(\(.+\)\)$:**

for the regex I tried having (?s) and without (?s), result is similar. And I do not know in the file filter field what to input if I target a empty commit (no file changed), end up using ** default value.

and we enable “Queued build can be replaced with a more recent build” because we would like to reduce build as well.

is there any way to work around this? so that if a change contain multiple commits, it only build up to a commit before the release tag?

Thank you.
Philip

 

0
1 comment
Hi Philip,

I checked your comment's regular expression, and it doesn't seem to match the "release_xxx" text.
As per the documentation, to match the comments that include the specific text, it should be enough to just use this text as is. Please refer to the examples: https://www.jetbrains.com/help/teamcity/configuring-vcs-triggers.html#trigger-rules-examples-1
To not trigger the build for commits with the comments containing "release", the following trigger rule may be used: 
-:comment=release:**

Best regards,
Anton
0

Please sign in to leave a comment.