VCS Trigger Rules

Is it possible to use variables in the VCS trigger rules section? I tried, but was not able to get TeamCity to kick off a continuous integration build in this manner. When I replaced the variable with the hard coded text I would expect, the build was initiated as expected. Any thoughts on this?

Ray Navarette
Pitney Bowes MapInfo

Comment actions Permalink


No, variables resolution is currently not supported for VCS triggering rules.

Could you please describe your use case in a bit more detail - why do you need to reference variables there?

Best regards,

Yegor Yarko
Project Manager
JetBrains, Inc
"Develop with pleasure!"

Comment actions Permalink

One of our product families has a shared code base in which most of the code is common, but each country which we produce a product for also has its own separate package. A way that I've made creating build configurations easier for these countries is to have the configuration name be the country code for the country. That allows me to use the configuration name as a variable for the country being built throughout the configuration. In this matter, adding support for a new country involves only copying the configuration and renaming it, nothing else. If variables were supported in the VCS triggers, we would be able to more easily (without configuration for each country) set up continuous integration so that continuous builds were only initiated when changes to common code or the country's code were made, and not when changes for some other country are committed. So, support for configuration based properties would be a great asset here.


Comment actions Permalink

I could also see a use for this when branching. Perhaps a version number variable could be used in the artifacts list. Then, when a branch is done, all you have to do is copy the build configuration and change the branch variable.


Comment actions Permalink

Does anyone know if I could accomplish this task by creating a custom plugin?

Comment actions Permalink


Currently, TeamCity OpenAPI doesn't allow to change VCS trigger settings for a build configuration, so I'm afraid this is not an option.

I suppose you may use different VCS roots for different countries? VCS roots can be handled from OpenAPI.



Please sign in to leave a comment.