How to download all set of artifacts from TeamCity

Document ID : KB000010943
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

In TeamCity UI when we navigate to specific build which we executed there is a possibility that we can download all the associated artifacts with that build in single zip. As we have integration between Release Automation(RA) and TeamCity we want to achieve same via Release Automation.

 

Background:

Using the RA action pack of TeamCity but the action of that "TeamCity -  Download Build artifact" expect us to pass each artifact name in it which we want to download.

  • Please elaborate why the former action expect each artifact name
  • How can we download all artifacts as possible via TeamCity UI via RA
Environment:
* TeamCity: 10.X, 2017 (1.5)* Release Automation: 6.4* Nolio-TeamCity-Actions: 10.3.1406.6
Instructions:

The process mentioned which allows users to download the complete zip of the artifacts associated with build via it’s UI, is due to the API not part of public domain i.e. exposed by Teamcity. The public REST API's anticipate artifacts name to be passed when downloading the artifacts via REST API.

  • Please elaborate why the former action expect each artifact name

Team-city action pack of RA you are trying to use is based on all the public API(refer document link under additional information section) , which required to have each artifact name to be mentioned for download.

  • How can we download all artifacts as possible via TeamCity UI via RA

 The best solution for above use case is to use the “REST Operation” method of RA and make a call to TeamCity internal API.

Note: There can be certain API restriction configured in TeamCity by administrator, which may protect usage of same, for same please contact TeamCity admins of your environment.

Please find how the REST Operation can be used to download all the artifacts associated with the specific build.  

* URI: http://{teamcity-server}:{teamcity-port}/repository/downloadAll/Artifactory_Artifac/{build-id}:id/artifacts.zip

* REST Operation Configuration

Teamcity.png

 

 

 

Additional Information: