artifacts

fun artifacts(idOwner: IdOwner, init: ArtifactDependency.() -> Unit)

Adds an artifact dependency for the specified job

Example. Artifact dependency on artifacts of some pinned build

See also artifact dependency

download {
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 pipeline outside of Kotlin DSL project

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

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

Adds an artifact dependency on the buildType or pipeline with the specified id.

Parameters

idOwner

buildType or pipeline to depend on

init

function to initialize the dependency