To add dependencies to a build configuration:
At any point you can launch a build with custom artifact dependencies - read more.
This section describes how to download TeamCity build artifacts inside the build script. These instructions can also be used to download artifacts from outside of TeamCity.
For handling artifact dependencies between the builds this solution is more complicated then configuring dependencies in the TeamCity UI but allows for greater flexibility. For example, managing dependencies this way will allow you to start a personal build and verify that your build is still compatible with dependencies.
To configure dependencies via Ant build script:
2. Add Ivy to the classpath of your build.
4. Replace YOUR_TEAMCITY_HOST_NAME with the host name of your TeamCity server.
7. Modify your build.xml file and add tasks for downloading artifacts, for example (applicable for Ant 1.6 and later):
Artifacts repository is protected by a basic authentication. To access the artifacts, you need to provide credentials to the <ivy:configure/> task. For example:
where TEAMCITY_HOST is hostname or IP address of your TeamCity server (without port and servlet context).
The properties teamcity.auth.userId/teamcity.auth.password store automatically generated build-unique values whose only intended use is artifacts downloading within the build script. The values are valid only during the time the build is running. Using the properties is preferable to using real user credentials since it allows the server to track artifacts downloaded by your build. If the artifacts were downloaded by the build configuration artifact dependencies or using the supplied properties, the specific artifacts used by the build will be displayed at the Dependencies tab on the build results page. In addition, the builds which were used to get the artifacts from will not be cleaned up by the clean-up process much like the pinned builds.
Skip to end of metadata Go to start of metadata