Pass Tag in VCS root to checkout that particular tab for the build
My project has around 15 Git repositories and each repo will have its own tags. Is there a way to programmatically pass the tag name like below?
"refs/tags/%System.TagToBuild%" - I have set the System property in the config file and tried using that in the "Branch Name" field but it says its unable to reach the repository. However setting the tag without variable is successful.
Given the number of repositories its not easy to change the branch name with 15 different tags every time before the build (manual). Appreciate your help on this.
Please sign in to leave a comment.
Hi Danny,
have you checked the "use tags as branches" checkbox?
Also, where are you trying to set the tag? Which version of teamcity are you using?
Hi Denis,
Thanks for the suggestion, but I don't think "use tags as branches" option would help my situation.
My problem is the way I need to pass the tag name to the build. I have no problem passing the tag id directly in Version Control Settings.
I am trying to set the tag either as system or env variable in the buildAgent.properties file. There is a small script I am using to update the props file as i dont want to change the tags manually for all 15 repos and hoping to access that value in the VCS settings.
Version - Teamcity 9.1.7