v1.0.0
Property | Type | Required | Default Value |
---|---|---|---|
steps | step[] |
Required | N/A |
stepTimeout | int |
Optional | 600 |
secrets | secret[] |
Optional | N/A |
networks | network[] |
Optional | N/A |
env | string[] |
Optional | N/A |
workingDirectory | string |
Optional | $HOME |
version | string |
Optional | Yes |
An array of step objects.
- Required
- Type:
step[]
A step's maximum execution time in seconds. This property defaults all steps' timeout properties. A step can override this property via timeout.
- Optional
- Type:
int
An array of secret objects.
- Optional
- Type:
secret[]
An array of network objects.
- Optional
- Type:
network[]
If specified on a task, these environment variables are applied to every step in the format of VARIABLE=value
.
If specified on a step, it will override any environment variables inherited from the task. In other words, env
is always scoped to a step.
- Optional
- Type:
string[]
Specifies the working directory of the container during runtime. If specified on a task, it defaults all of the steps' workingDirectory
properties. If specified on a step, it will override the property provided by the task.
- Optional
- Type:
string
The version of the task. If unspecified, defaults to the latest version.
- Optional
- Type:
string
An object with the following properties:
Property | Type | Required | Default Value |
---|---|---|---|
id | string |
Optional | acb_step_%d , where %d is the 0-based index of the step top-down in the yaml |
cmd | string |
Optional | N/A |
build | string |
Optional | N/A |
workingDirectory | string |
Optional | $HOME |
entryPoint | string |
Optional | N/A |
user | string |
Optional | N/A |
network | string |
Optional | N/A |
isolation | string |
Optional | default |
push | string[] |
Optional | N/A |
env | string[] |
Optional | N/A |
expose | string[] |
Optional | N/A |
ports | string[] |
Optional | N/A |
when | string[] |
Optional | N/A |
timeout | int |
Optional | 600 |
startDelay | int |
Optional | 0 |
retryDelay | int |
Optional | 0 |
retries | int |
Optional | 0 |
downloadRetries | int |
Optional | 0 |
downloadRetryDelay | int |
Optional | 0 |
repeat | int |
Optional | 0 |
keep | bool |
Optional | false |
detach | bool |
Optional | false |
privileged | bool |
Optional | false |
ignoreErrors | bool |
Optional | false |
disableWorkingDirectoryOverride | bool |
Optional | false |
pull | bool |
Optional | false |
- A step must define either a cmd, build, or a push property. It may not define more than one of the aforementioned properties.
The unique identifier for the step. Used as the name of the running container. Can be referenced across containers using this identifier as the tcp host and used in when.
- Optional
- Type:
string
- Cannot contain spaces.
Defines which container to run along with any additional command line arguments.
Example:
cmd: bash echo "hello world"
This runs a container called bash
and tells it to run the echo
command with "Hello World"
as a parameter.
- Optional
- Type:
string
Allows building containers.
Example:
build: -f Dockerfile -t acr-builder:v1 https://github.com/Azure/acr-builder.git
- Optional
- Type:
string
Sets the entry point of a container.
- Optional
- Type:
string
Sets the username or UID of a container.
- Optional
- Type:
string
Sets the isolation level of a container.
- Optional
- Type:
string
Pushes the specified images to a container registry.
Example:
push: ["example.azurecr.io/acb:v1"]
- Optional
- Type:
string[]
Sets environment variables for the container during execution.
Example:
env: ["K1=V1", "K2=V2"]
- Optional
- Type:
string[]
Exposes port(s) from the container.
- Optional
- Type:
string[]
Publishes port(s) from the container to the host.
- Optional
- Type:
string[]
Describes when the step should get executed relative to other steps. If unspecified, steps will be ran sequentially.
If when: ["-"]
is specified, the container will immediately begin execution without any dependency on parent steps' execution.
Examples:
# build is ran, followed by cmd sequentially.
steps:
- build: -f Dockerfile . -t example
- cmd: example
# step 1 and 2 are both executed simultaneously.
steps:
- id: step_1
cmd: bash echo "1"
- id: step_2
cmd: bash echo "2"
when: ["-"]
# step 1 and 2 are both executed simultaneously. Step 3 is executed after step 1 is completed.
steps:
- id: step_1
cmd: bash echo "1"
- id: step_2
cmd: bash echo "2"
when: ["-"]
- id: step_3
cmd: bash echo "3"
when: ["step_1"]
- Optional
- Type:
string[]
The maximum execution time of a step in seconds.
- Optional
- Type:
int
Defines the number of seconds to wait before executing the container.
- Optional
- Type:
int
The number of retries to attempt if a container fails its execution. A retry is only attempted if a container's exit code is non-zero.
- Optional
- Type:
int
The number of retries to attempt if downloading a container fails in a single cmd step.
- Optional
- Type:
int
The delay in seconds between download retries in a cmd step.
- Optional
- Type:
int
The delay in seconds between retries.
- Optional
- Type:
int
The number of times to repeat the execution of a container.
- Optional
- Type:
int
Determines whether or not the container should be kept (all containers are removed by default) after it has been executed.
- Optional
- Type:
bool
Runs the container as a background process to avoid blocking.
- Optional
- Type:
bool
Runs the container in privileged mode.
- Optional
- Type:
bool
Ignores any errors during container execution and always marks the step as successful.
- Optional
- Type:
bool
Disables all workingDirectory
override functionality. Use this in combination with workingDirectory to have complete control over the container's working directory.
Forces a pull of the container before executing it to prevent any caching behavior.
- Optional
- Type:
bool
An object with the following properties:
Property | Type | Required | Default Value |
---|---|---|---|
id |
string |
Required | N/A |
keyvault | string |
Optional | N/A |
clientID | string |
Optional | N/A |
The key vault URL.
- Optional
- Type:
string
The MSI user assigned identity client ID.
- Optional
- Type:
string
An object with the following properties:
Property | Type | Required | Default Value |
---|---|---|---|
name | string |
Required | N/A |
driver | string |
Optional | N/A |
ipv6 | bool |
Optional | false |
skipCreation | bool |
Optional | false |
isDefault | bool |
Optional | false |
The name of the network.
- Required
- Type:
string
The driver to manage the network.
- Default:
bridge
- Optional
- Type:
string
Enables ipv6 networking.
- Optional
- Type:
bool
Skips creation of the network.
- Optional
- Type:
bool
Specifies whether or not the network is a default one provided by Azure Container Registry.
- Optional
- Type:
bool