How to trigger build with latest tag through teamcity

0
 

I am using the teamcity 2018.2.4 version. I want my nightly build should pull the latest tag and run it every night irrespective of any pending changes or not. I tried with below changes but no luck. Vcs root, configuration parameter, build trigger

3 comments
Comment actions Permalink
Official comment

Hello Arihan,

If by "pull the latest tag" "irrespective of any pending changes" you mean the tag with the last commit of the most recent timestamp, then there is no easy way to do that in TeamCity. I can only suggest you to create an auxiliary build configuration which will be triggered by schedule, then within it's script analyze the repository to find the necessary tag and trigger a build using TeamCity [REST API](https://confluence.jetbrains.com/display/TCD18/REST+API#RESTAPI-TriggeringaBuild)

Comment actions Permalink

If you check the below screenshot, you can find the WR61 is the latest tag though there are lot of commits got merged to the master after that. I want to run WR61 tag every day (i.e currently the latest tag ) through schedule trigger. Lets say after few days, WR62 got created, then that day onwards WR62 would be triggered. Is it possible through teamcity?

0
Comment actions Permalink

Hi Arihan,

I do not see any easy way to achieve that with TeamCity's bundled means.

I'd suggest to maintain another tag, like "latest", "stable", etc. and set it each time the necessary "latest tagged" revision is changed. That way you just need to get that tagged revision and that is easy for both automated systems like TeamCity and developers, should they need to checkout the same revision.

0

Please sign in to leave a comment.