Docker Compose Step
A build step for docker-compose step.
Example. Adds a Docker Compose build step with specified Compose YAML file.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
dockerCompose {
name = "My Compose"
file = "my-services.yml"
}
Content copied to clipboard }
}Example. Adds a Docker Compose build step with multiple Compose YAML files, separated by space. Option for explicitly pull images is enabled. This step will we executed only if build status is sucessfull for previous build steps and extra condition is met.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
dockerCompose {
name = "My Compose"
executionMode = BuildStep.ExecutionMode.RUN_ON_SUCCESS
conditions {
equals("teamcity.build.branch", "release")
}
file = "my-services.yml my-other-services.yml"
forcePull = true
}
Content copied to clipboard }
}See also
Properties
Optional collection of build step execution conditions
Build step execution mode
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
A list of records, each field of an item stored as a parameter of its own: parameter f of the n-th item, counting from 1, is stored as name.n.f. A script fills the list in the block of the parameter, see RecordList.
A record, each field stored as a parameter of its own: parameter f of the record is stored as name.f. A script fills the record in the block of the parameter; a record without parameters stores nothing.
Validates this object and reports found errors to the provided consumer