Pattern for accessing build artifacts

We would like to provide a link to our users so that they can download the latest snapshot build by teamcity.

We have the following problem. Our CI build produces three artifacts. All of them contain a timestamp in their name. Something like:

gradle-0.9-20100309230023%2B0300-all.zip
gradle-0.9-20100309230023%2B0300-bin.zip
gradle-0.9-20100309230023%2B0300-src.zip

I'm aware that TeamCity provides a pattern like this: /guestAuth/repository/download/BUILD_TYPE_ID/.lastFinished/ARTIFACT_PATH

But in our case, the artifact path is not fixed as they have an ever changing timestamp. Is there a way to solve this problem?

- Hans

--
Hans Dockter
Founder, Gradle
http://www.gradle.org, http://twitter.com/gradleorg
CEO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz

2 comments

Hello Hans,

  TeamCity allows including build number into the artifact name, like {build.number}.
  Please read details on that at http://confluence.jetbrains.net/display/TCD5/Patterns+For+Accessing+Build+Artifacts

  TeamCity also allows downloading all artifacts of a build as a ZIP file (see details at the bottom of the docs page).

  Hope this helps,
  KIR

0

Hey Kirill,

I am also new to TeamCity and would like my Nant script to get the latest sucessful build from the respective build configuration.

The link mentions the following:

/repository/download/BUILD_TYPE_ID/.lastFinished/ARTIFACT_PATH
/repository/download/BUILD_TYPE_ID/.lastSuccessful/ARTIFACT_PATH
/repository/download/BUILD_TYPE_ID/.lastPinned/ARTIFACT_PATH

How is the below absolute path translated to the path metioned above?
For example :

D:\TeamCity\.BuildServer\system\artifacts\<project>\<build_configuration>\<latest_build>\


Thanks in advance !

0

Please sign in to leave a comment.