How are individual commit messages considered in VCS Trigger rules?

I have two different TC projects: (runnint TC 9.1.3)

PullRequestQuick - builds pull requests from our GitHub repo quickly (incrementally in about 5 minutes)
PullRequestFull - builds pull request from our GitHub repo via a full clean rebuild, which takes over an hour

I'd like to use the VCS Trigger Rules feature for comment pattern matching to choose which build to run

I'd like to use the presence of a special phrase (in this case "FullBuildPlease") to in any commit message to trigger the PullRequesFull build.
If the magic phrase is not found in a pull request's commit messages, the PullRequestQuick build will be triggered instead.

Ideally, I'd like the phrase matching to be case-insensitive. That would be a Java regular expression of (?i:fullbuildplease) to match the phrase.

So the only configuration difference in the triggers of the PullRequestQuick project and the PullRequestFull project is the comment trigger. definition.





But both projects are always getting run for every pull request. No matter what comments are added to commits in a source branch of a pull request, both projects are always being triggered.

The examples provided in the Confluence documentation linked above are rather thin.


Q1) How does TeamCity evaluate a pull request containing multiple commits?

Q2) Does TC concatenate all the commit messages from all the commits in the pull request source branch, and then run the VCS Trigger rules once-and-only-once against the concatenated commit message?

Q3) Or does TC evaluate each commit message separately?

Q4) And since each commit message can be multi-line, how are newlines handled by the regex?

Q5) I guess my real question is why isn't my trigger working when the FullBuildPlease phrase is contained somewhere in at least one commit message of a pull request?


1 comment
Comment actions Permalink

Hi Doug,

TeamCity takes all commit messages for each detected change and then evaluates each commit message separately. Could you please attach a screenshots of configured VCS root and VCS trigger?


Please sign in to leave a comment.