user1862895
user1862895

Reputation: 93

Is it possible to dynamically get a build from a teamcity server using python?

Have regular builds that appear on a teamcity server. I manually take them down and configure for integration testing and so forth. The build link location is of the following format: http://TCServer.com/repository/download/constant/321812:id/BuildB.zip

Previous build could look like: http://TCServer.com/repository/download/constant/321796:id/BuildA.zip

The url as far as "constant" never changes but the rest is dynamic. Because the "Artifacts" links are popups, it's unclear how to get this link through scripting, (still wet behind ears when it comes to this language). Is there a python plugin for TC that may help in this regard?

Upvotes: 1

Views: 560

Answers (2)

James Woolfenden
James Woolfenden

Reputation: 6661

The backend for teamcity artifacts actually uses Apache Ivy (and optionally also Nuget). You can pull artifacts directly out of it, i do this using ant following the example jetbrains gives: http://confluence.jetbrains.com/display/TCD7/Artifact+Dependencies

Upvotes: 0

Pavel Sher
Pavel Sher

Reputation: 2211

There is a way to download all artifacts of a build in single zip archive: http:///repository/downloadAll//61158:id/artifacts.zip

You can also download all artifacts of the last finished/successful/pinned build (useful if you don't know build id): http:///repository/downloadAll//latest.lastSuccessful/artifacts.zip

You can use latest.lastSuccessful, latest.lastFinished and latest.lastPinned locators.

Upvotes: 1

Related Questions