|
Documentation Index
|
Patterns For Accessing Build ArtifactsThis section covers:
Obtaining ArtifactsUse the following patterns to download artifacts: To download artifacts of the latest builds (last finished, successful or pinned) use the following paths: /repository/download/BUILD_TYPE_ID/.lastFinished/ARTIFACT_PATH /repository/download/BUILD_TYPE_ID/.lastSuccessful/ARTIFACT_PATH /repository/download/BUILD_TYPE_ID/.lastPinned/ARTIFACT_PATH To download artifacts by build id use this path: /repository/download/BUILD_TYPE_ID/BUILD_ID:id/ARTIFACT_PATH To download artifacts by build number the following path should be used: /repository/download/BUILD_TYPE_ID/BUILD_NUMBER/ARTIFACT_PATH where
Obtaining Artifacts from an ArchiveTeamCity allows to obtain a file from any zip/jar archive from the build artifacts directory, using one of the following URL patterns: Pattern 1/repository/archive/<zip or jar archive>/buildTypeId/BUILD_TYPE_ID/buildId/(lastFinished|lastSuccessful|lastPinned)/index.html where:
Pattern 2/repository/archive/<zip or jar archive>/buildTypeId/BUILD_TYPE_ID/buildNumber/BUILD_NUMBER/index.html where
Obtaining Artifacts from a Build ScriptIt is often required to download artifacts of some build configuration by tools like wget or another downloader which does not support HTML login page. TeamCity asks for authentication if you accessing artifacts repository. To authenticate correctly from a build script, you have to change URLs (add /httpAuth/ prefix to the URL): /httpAuth/repository/download/BUILD_TYPE_ID/.lastFinished/ARTIFACT_PATH Basic authentication is required for accessing artifacts by this URLs with /httpAuth/ prefix. You can use existing TeamCity username and password in basic authentication settings. To enable downloading an artifact with guest login, you can use either way:
In this case you will not be asked for authentication. Links to the Artifacts Containing the TeamCity Build NumberYou can use {build.number} as a shortcut to current build number in the artifact file name. http://teamcity.yourdomain.com/repository/download/bt222/.lastFinished/TeamCity-{build.number}.exe
|