jenkinsci / jenkinsci/docker-workflow-plugin
[JENKINS-37175] Tag image on another repository
- Dominant language
- Java
- Stars
- 527
- Forks
- 422
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
I would like to have an option to overwrite the imageName with regards to repository.
So I could do:
```
def image = docker.build("registry1.com/company/project:1")
image.push()
image.push("registry2.com/company/project:latest")
```
Current workaround would be (without building):
```
sh "docker tag -f registry1.com/compoany/project:1 registry2.com/company/project:latest"
sh "docker push registry2.com/company/project:latest"
```
---
Originally reported by
hakamairi, imported from: Tag image on another repository
jglick
Raw content of original issue
I would like to have an option to overwrite the imageName with regards to repository.
So I could do:def image = docker.build("registry1.com/company/project:1")
image.push()
image.push("registry2.com/company/project:latest")Current workaround would be (without building):
sh "docker tag -f registry1.com/compoany/project:1 registry2.com/company/project:latest"
sh "docker push registry2.com/company/project:latest"
Contributor guide
Assessment
This issue has not been assessed yet.