DockerComposeStep
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
Constructors
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
Creates an instance of this build step via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.
Validates this object and reports found errors to the provided consumer