Branch properties
Hi All,
as a possible workaround for having different set of properties used by differnt branches I'm trying to utilize the Branch properties.
The idea is to use teamcity.build.vcs.branch.My_Project value as a parameter for Maven profile activation like this:
<profile>
<id>develop</id>
<activation>
<property>
<name>teamcity.build.vcs.branch.Diligesoft_SOA</name>
<value>refs/heads/develop</value>
</property>
</activation>
...
but I'm not sure if it supposed to be propagated to the Maven at the build time.
Is the Branch property (teamcity.build.vcs.branch.My_Project) can be used by Maven? If it can, how to access it?
Thanks!
Please sign in to leave a comment.
I will share the solution (works good for me).
For anybody looking for the way to pass branch properties from TeamCity to Maven - you can use 'Additional Maven command line parameters' field:
-Dteamcity.build.vcs.branch.My_Project=%teamcity.build.vcs.branch.My_Project%
Dmitry,
Thank you for sharing the results!
Seems, you should also be able to define system property (in Build Parameters settings section) with the name teamcity.build.vcs.branch.My_Project and value %teamcity.build.vcs.branch.My_Project%.