Delete build configuration automatically after execution

Hi all.

I'm creating an intergration between Testrail and Teamcity. Our QA team will be able to trigger executions of Teamcity builds via the Testrail interface and then the results are reported back to Testrail and subsequently removed from Teamcity.

When they trigger the builds, a "base" Teamcity build configuration is duplicated and dynamic build specific settings provided from Testrail are added to the new, duplicated, build configuration (like build steps, etc.).
These duplicates are supposed to be just temporary build configurations that will most often only be executed once and then should be deleted (after successful reporting to Testrail).

I can't seem to find a way to delete build configurations automatically after they have been executed, not in the API docs, API responses (when fetching a build configuration) or in the web interface.

This is perhaps not the way Teamcity should be used, so I might have to implement this myself?

All help is greatly appreciated.

Best regards,

Comment actions Permalink


You can delete build configuration using REST API:

curl -u user:pass -X DELETE http://teamcity:8111/httpAuth/app/rest/buildTypes/id:<config_id>

Since TeamCity 8.1, you can trigger a build and tracking the queued build results as the build queue request returns the link to the queued build which can later be used to track the build's current status.

Comment actions Permalink

Hi Alina.

Thank you for your reply.

Yes I knew about that possibility. I was just hoping I wouldn't have to do the polling myself. :-)

But it's all good, I just wanted to see if there was a functionality like this in Teamcity - so I would be able to execute builds with a certain parameter which tells Teamcity to delete the build configuration after it's execution.

Thank you for your help.

Best regards.


Please sign in to leave a comment.