Azure / Azure/acr

ACR Task Push Step to support retagging

Open
#481 0 comments 1 reaction 1 assignee Assigned to @toddysm View on GitHub
feature-acr-tasks feature-request triaged
Dominant language
No language data
Stars
177
Forks
137
PR merge metrics
No merged PRs in 30d

Description

**What is the problem you're trying to solve**
Minimizing the number of steps required, while reducing the time to execute

**Describe the solution you'd like**
In some scenarios, an image is pulled with a specific registry and/or tag. The image should be pushed to the current registry.
To achieve this I must write separate steps for pull, tag, tag, tag, push [collection]
The ask is to incorporate retagging with the push.
And/or, add an import step:
```yaml
- id: retag-base-image
when: ['pull-base-image']
cmd: docker tag {{.Values.REGISTRY_FROM_URL}}node:15-alpine {{.Run.Registry}}/node:15-alpine
- id: retag-base-image-unique-tag
when: ['pull-base-image']
cmd: docker tag {{.Values.REGISTRY_FROM_URL}}node:15-alpine {{.Run.Registry}}/node:15-alpine-{{.Run.ID}}
- id: push-base-image
when: ['retag-base-image', 'retag-base-image-unique-tag']
push:
- "{{.Run.Registry}}/node:15-alpine"
- "{{.Run.Registry}}/node:15-alpine-{{.Run.ID}}"
```
Could become:
```yaml
- id: push-with-retag
when: ['retag-base-image', 'retag-base-image-unique-tag']
push:
- {{.Values.REGISTRY_FROM_URL}}node:15-alpine, "{{.Run.Registry}}/node:15-alpine"
- {{.Values.REGISTRY_FROM_URL}}node:15-alpine, "{{.Run.Registry}}/node:15-alpine-{{.Run.ID}}"
```
or
```yaml
- id: import
import: >
--source={{.Values.REGISTRY_FROM_URL}}node:15-alpine
--target={{.Run.Registry}}/node:15-alpine
--target={{.Run.Registry}}/node:15-alpine-{{.Run.ID}}
```
**Additional context**
Add any other context or screenshots about the feature request here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.