Skip to content

Commit 132cc31

Browse files
committed
[ACR] Tasks doc updates
1 parent ed79443 commit 132cc31

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

articles/container-registry/container-registry-tasks-multi-step.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,33 @@ A multi-step task in ACR Tasks is defined as a series of steps within a YAML fil
4545
The following snippets show how to combine these task step types. Multi-step tasks can be as simple as building a single image from a Dockerfile and pushing to your registry, with a YAML file similar to:
4646

4747
```yml
48-
version: v1.0.0
48+
version: v1.1.0
4949
steps:
50-
- build: -t {{.Run.Registry}}/hello-world:{{.Run.ID}} .
51-
- push: ["{{.Run.Registry}}/hello-world:{{.Run.ID}}"]
50+
- build: -t $Registry/hello-world:$ID .
51+
- push: ["$Registry/hello-world:$ID"]
5252
```
5353
5454
Or more complex, such as this fictitious multi-step definition which includes steps for build, test, helm package, and helm deploy (container registry and Helm repository configuration not shown):
5555
5656
```yml
57-
version: v1.0.0
57+
version: v1.1.0
5858
steps:
5959
- id: build-web
60-
build: -t {{.Run.Registry}}/hello-world:{{.Run.ID}} .
60+
build: -t $Registry/hello-world:$ID .
6161
when: ["-"]
6262
- id: build-tests
63-
build -t {{.Run.Registry}}/hello-world-tests ./funcTests
63+
build -t $Registry/hello-world-tests ./funcTests
6464
when: ["-"]
6565
- id: push
66-
push: ["{{.Run.Registry}}/helloworld:{{.Run.ID}}"]
66+
push: ["$Registry/helloworld:$ID"]
6767
when: ["build-web", "build-tests"]
6868
- id: hello-world-web
69-
cmd: {{.Run.Registry}}/helloworld:{{.Run.ID}}
69+
cmd: $Registry/helloworld:$ID
7070
- id: funcTests
71-
cmd: {{.Run.Registry}}/helloworld:{{.Run.ID}}
71+
cmd: $Registry/helloworld:$ID
7272
env: ["host=helloworld:80"]
73-
- cmd: {{.Run.Registry}}/functions/helm package --app-version {{.Run.ID}} -d ./helm ./helm/helloworld/
74-
- cmd: {{.Run.Registry}}/functions/helm upgrade helloworld ./helm/helloworld/ --reuse-values --set helloworld.image={{.Run.Registry}}/helloworld:{{.Run.ID}}
73+
- cmd: $Registry/functions/helm package --app-version $ID -d ./helm ./helm/helloworld/
74+
- cmd: $Registry/functions/helm upgrade helloworld ./helm/helloworld/ --reuse-values --set helloworld.image=$Registry/helloworld:$ID
7575
```
7676
7777
See [task examples](container-registry-tasks-samples.md) for multi-step task YAML files and Dockerfiles for several scenarios.

articles/container-registry/container-registry-tasks-reference-yaml.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Task properties typically appear at the top of an `acr-task.yaml` file, and are
7474
| -------- | ---- | -------- | ----------- | ------------------ | ------------- |
7575
| `version` | string | Yes | The version of the `acr-task.yaml` file as parsed by the ACR Tasks service. While ACR Tasks strives to maintain backward compatibility, this value allows ACR Tasks to maintain compatibility within a defined version. If unspecified, defaults to the latest version. | No | None |
7676
| `stepTimeout` | int (seconds) | Yes | The maximum number of seconds a step can run. If the property is specified on a task, it sets the default `timeout` property of all the steps. If the `timeout` property is specified on a step, it overrides the property provided by the task. | Yes | 600 (10 minutes) |
77-
| `workingDirectory` | string | Yes | The working directory of the container during runtime. If the property is specified on a task, it sets the default `workingDirectory` property of all the steps. If specified on a step, it overrides the property provided by the task. | Yes | `$HOME` |
77+
| `workingDirectory` | string | Yes | The working directory of the container during runtime. If the property is specified on a task, it sets the default `workingDirectory` property of all the steps. If specified on a step, it overrides the property provided by the task. | Yes | `/workspace` |
7878
| `env` | [string, string, ...] | Yes | Array of strings in `key=value` format that define the environment variables for the task. If the property is specified on a task, it sets the default `env` property of all the steps. If specified on a step, it overrides any environment variables inherited from the task. | None |
7979
| `secrets` | [secret, secret, ...] | Yes | Array of [secret](#secret) objects. | None |
8080
| `networks` | [network, network, ...] | Yes | Array of [network](#network) objects. | None |
@@ -374,7 +374,7 @@ Each step type supports several properties appropriate for its type. The followi
374374
| `timeout` | int (seconds) | Yes | Maximum number of seconds a step may execute before being terminated. | 600 |
375375
| [`when`](#example-when) | [string, string, ...] | Yes | Configures a step's dependency on one or more other steps within the task. | None |
376376
| `user` | string | Yes | The user name or UID of a container | None |
377-
| `workingDirectory` | string | Yes | Sets the working directory for a step. By default, ACR Tasks creates a root directory as the working directory. However, if your build has several steps, earlier steps can share artifacts with later steps by specifying the same working directory. | `$HOME` |
377+
| `workingDirectory` | string | Yes | Sets the working directory for a step. By default, ACR Tasks creates a root directory as the working directory. However, if your build has several steps, earlier steps can share artifacts with later steps by specifying the same working directory. | `/workspace` |
378378

379379
### Examples: Task step properties
380380

0 commit comments

Comments
 (0)