RoelF
RoelF

Reputation: 7573

Is it possible to run a script when a build is tagged in Teamcity?

We are using TeamCity 9.x as are main CI server. I'm looking for ways to run a script (PowerShell, Python, ...) when a build is tagged. Is this possible?

The only thing I can think of is to write a simple service which polls the REST API for the last x builds and reads the <tag/> information.
We are using TFS for source control, so labeling the sources is not an option (because a label is unique in TFS).

Are there any other (simpler) ways to do this? Or is there any other way to define build quality and execute something?

Upvotes: 0

Views: 141

Answers (2)

Biswajit_86
Biswajit_86

Reputation: 3739

Yes you can

In the build trigger definition, you can mention specific subset of tags(using regex patterns) on which teamcity targets are trigeered. In your case, you have to set the triggers to run on tags only

Upvotes: 1

Dylan Smith
Dylan Smith

Reputation: 22245

I know this doesn't answer your question but figured I'd mention it anyways since you have TFS in your environment already.

If you were using TFS Build it has a drop down on each build to indicate quality. And there's a free tool called TFS Deployer that allows you to run scripts when the quality is changed.

Upvotes: 0

Related Questions