Skip to content

Commit dc1750d

Browse files
Merge pull request #276485 from tejaswikolli-web/importimage
edits for git issue
2 parents 9bd5e47 + 3f53983 commit dc1750d

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

articles/container-registry/container-registry-auto-purge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ At a minimum, specify the following when you run `acr purge`:
4242

4343
`acr purge` supports several optional parameters. The following two are used in examples in this article:
4444

45-
* `--untagged` - Specifies that all manifests that don't have associated tags (*untagged manifests*) are deleted. This parameter also deletes untagged manifests in addition to tags that are already being deleted.
45+
* `--untagged` - Specifies that all manifests that don't have associated tags (*untagged manifests*) are deleted. This parameter also deletes untagged manifests in addition to tags that are already being deleted. Remove all tags associated with a manifest to purge it; only then you can purge a tag free manifest using `--untagged`.
4646
* `--dry-run` - Specifies that no data is deleted, but the output is the same as if the command is run without this flag. This parameter is useful for testing a purge command to make sure it does not inadvertently delete data you intend to preserve.
4747
* `--keep` - Specifies that the latest x number of to-be-deleted tags are retained. The latest tags are determined by the last modified time of the tag.
4848
* `--concurrency` - Specifies a number of purge tasks to process concurrently. A default value is used if this parameter is not provided.

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,29 @@ steps:
202202
- build: -t $Registry/hello-world -f hello-world.dockerfile ./subDirectory
203203
```
204204

205+
### Dynamic variable passing in ACR Tasks
206+
207+
When working with Azure container registry (ACR) tasks, you may find yourself needing to pass different values to your build process without changing the task definition by using the `--set` flag with the `az acr task run` command.
208+
209+
#### Example: Setting image tag at runtime
210+
211+
Suppose you have an ACR task defined in a `acr-task.yml` file with a placeholder for the image tag:
212+
213+
```yaml
214+
steps:
215+
- build: -t $Registry/hello-world:{{.Values.tag}}
216+
```
217+
218+
You can trigger the task and set the `tag` variable to `v2` at runtime using the following Azure CLI command:
219+
220+
```azurecli
221+
az acr task run --registry myregistry --name mytask --set tag=v2
222+
```
223+
224+
This command will start the ACR task named `mytask` and build the image using the `v2` tag, overriding the placeholder in the `acr-task.yml` file.
225+
226+
This approach allows for customization in your CI/CD pipelines, enabling you to dynamically adjust parameters based on your current needs without altering the task definitions.
227+
205228
## push
206229

207230
Push one or more built or retagged images to a container registry. Supports pushing to private registries like Azure Container Registry, or to the public Docker Hub.
@@ -385,6 +408,7 @@ az acr run -f mounts-secrets.yaml --set-secret mysecret=abcdefg123456 https://gi
385408
<!-- SOURCE: https://github.com/Azure-Samples/acr-tasks/blob/master/mounts-secrets.yaml -->
386409
[!code-yml[task](~/acr-tasks/mounts-secrets.yaml)]
387410

411+
388412
## Task step properties
389413

390414
Each step type supports several properties appropriate for its type. The following table defines all of the available step properties. Not all step types support all properties. To see which of these properties are available for each step type, see the [cmd](#cmd), [build](#build), and [push](#push) step type reference sections.

articles/container-registry/monitor-service-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Resource Provider and Type: [Microsoft.ContainerRegistry/registries](../azure-mo
2424
| AgentPoolCPUTime | Yes | Seconds | Total | CPU time used by [ACR tasks](container-registry-tasks-overview.md) running on dedicated [agent pools](tasks-agent-pools.md) | None |
2525
| RunDuration | Yes | Milliseconds | Total | Duration of [ACR tasks](container-registry-tasks-overview.md) runs | None |
2626
| StorageUsed | No | Bytes | Average | Storage used by the container registry<br/><br/>Sum of storage for unique and shared layers, manifest files, and replica copies in all repositories<sup>1</sup> | Geolocation |
27-
| SuccessfulPullCount | Yes | Count | Total | Successful pulls of container images and other artifacts from the registry | None |
28-
| SuccessfulPushCount | Yes | Count | Total | Successful pushes of container images and other artifacts to the registry | None |
29-
| TotalPullCount | Yes | Count | Total | Total pulls of container images and other artifacts from the registry | None |
27+
| SuccessfulPullCount | Yes | Count | Total | Successful pulls of container images and other artifacts from the registry. Total get requests to registry v2 manifest api with 200 response. | None |
28+
| SuccessfulPushCount | Yes | Count | Total | Successful pushes of container images and other artifacts to the registry. | None |
29+
| TotalPullCount | Yes | Count | Total | Total pulls of container images and other artifacts from the registry. Total get requests to registry v2 manifest api. | None |
3030
| TotalPushCount | Yes | Count | Total | Total pushes of container images and other artifacts to the registry | None |
3131

3232
<sup>1</sup>Because of layer sharing, registry storage used may be less than the sum of storage for individual repositories. When you [delete](container-registry-delete.md) a repository or tag, you recover only the storage used by manifest files and the unique layers referenced.

0 commit comments

Comments
 (0)