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

5 comments

Ray,

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
http://www.jetbrains.com
"Develop with pleasure!"

0

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.

Thanks,
Ray

0

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.

Rick

0

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

0

Hello,

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.

Regards,
KIR

0

Please sign in to leave a comment.