Reputation: 1817
I'm pushing my image to JFrog artifactory Docker Registry with tag : latest with Azure task
- task: ArtifactoryDocker@1
displayName: 'Publish a docker image'
inputs:
command: 'push'
artifactoryService: 'Artifactory'
targetRepo: 'docker'
imageName: '$(imageName):latest'
However it doesn't rewrites existing latest and in pipeline I see next log
394668d88274: Layer already exists
d821d3ad1366: Layer already exists
78d869964af5: Layer already exists
26f565299233: Layer already exists
c952f96d3d90: Layer already exists
29a09581f308: Layer already exists
30ffbe29feab: Layer already exists
af63a7c31ba7: Layer already exists
6153c9b0b282: Layer already exists
25c2968702ec: Layer already exists
610209d4392e: Layer already exists
7cd35e62d6fb: Layer already exists
2de391e51d73: Layer already exists
92d30847d049: Layer already exists
d73dd9e65295: Layer already exists
686245e78935: Layer already exists
d7ff1dc646ba: Layer already exists
644879075e24: Layer already exists
latest: digest: sha256:586235b20caabc398b8da81d79a48e27385456d4a4bc2a343f7cacdd8ce97b38 size: 4078
Can I somehow make it to overwrite? I cannot find any documantation for this task of plugin.
Upvotes: 2
Views: 1147
Reputation: 19016
Cannot find any documantation for this task of plugin.
I'm afraid this plugin does not exists for azure devops.
Based on my understanding, the previous image should been overwritten. You can check your image which tag is latest
after above pipeline executed finished. I think the modification time of the image should change as the pipeline runs.
Layer already exists
This should because your dockerfile does not has changes there. As you know, every instruction of Dockerfile will generate a layer. If there's no changes on instruction, correspondingly, the layer will not be changed also.
In addition, if you worry about the image is not the latest one you want to push. You can consider to remove that tag before you push it.
Check this JFrog document, and consider to make use of command line task to execute this api:
curl -k -u {username}:{password} -X DELETE https://{reverseproxyhost}/artifactory/<repo>/<imgname>/<imgtag>
Upvotes: 2