Jack Ukleja
Jack Ukleja

Reputation: 13501

How to delete TeamCity tags across all builds?

The only way I can find to delete a TeamCity tag is to remove all references to the tag from all builds. This is a manual and laborious process. Is there a way to do it automatically?

Upvotes: 5

Views: 1105

Answers (2)

Jonas Bang Christensen
Jonas Bang Christensen

Reputation: 1051

If you have access to the database you can also hard delete it from there.

Upvotes: 1

Alina Mishina
Alina Mishina

Reputation: 3370

It's not possible in TeamCity UI. As workaround you can use REST API. To find all builds use the request:

http://teamcity/httpAuth/app/rest/builds?locator=tags:<tag_name>

Then for each build get the list of tags:

http://teamcity/httpAuth/app/rest/builds/id:<buildId>/tags

Delete needed tag in returned XML and use PUT request to replace tags.

There is no related ticket in TeamCity tracker, so you can fill one.

Upvotes: 3

Related Questions