ArtifactDependency

TeamCity artifact dependency.

Example. Artifact dependency on artifacts of some pinned build

See also artifact dependency

dependencies {
artifacts(AnotherBuild) {
buildRule = lastPinned()
// this rule will find all the jar files in the build artifacts root directory
// and place them under the "library" folder on the agent
artifactRules = "*.jar => libraries"
// this will ensure that "libraries" folder is cleaned up before the .jar files are placed there
cleanDestination = true
}
}








Example. Artifact dependency on a build outside of Kotlin DSL project

dependencies {
artifacts(AbsoluteId("Another_Project_Library")) {
buildRule = lastSuccessful()
artifactRules = "*.jar => libraries"
cleanDestination = true
}
}





In this example "Another_Project_Library" is an id of a build configuration which is not defined in the Kotlin DSL project, but exists somewhere else in the TeamCity projects hierarchy.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

New-line separated list of artifact rules specifying the way artifacts from the dependency should be copied. Mandatory, empty by default.

Link copied to clipboard

Rule for selecting a dependency build, when not specified sameChainOrLastFinished is used

Link copied to clipboard

Whether destination directory on agent should be cleaned before copying artifacts, false by default

Link copied to clipboard

Allows to disable the dependency, it is enabled by default

Link copied to clipboard
var id: String?

Dependency id, if not specified will be generated

Link copied to clipboard

Functions

Link copied to clipboard
fun build(buildNumber: String): BuildRule

Creates a build rule matching a build with the specified build number

Link copied to clipboard

Copies the receiver artifact dependency

Link copied to clipboard
fun lastFinished(branch: String? = null): BuildRule

Creates a build rule matching the last finished build in the specified branch

Link copied to clipboard
fun lastPinned(branch: String? = null): BuildRule

Creates a build rule matching a last pinned build in the specified branch

Link copied to clipboard
fun lastSuccessful(branch: String? = null): BuildRule

Creates a build rule matching the last successful build in the specified branch

Link copied to clipboard

Creates a build rule matching the build from the same build chain or last finished build

Link copied to clipboard
fun tag(tag: String, branch: String? = null): BuildRule

Creates a build rule matching a build with the specified tag in the specified branch