Ignore errors when deleting tags from dockerhub

We've seen a case where we can still push and pull tags from dockerhub,
but the web UI and API seem out of sync with the actual registry.  In
this case, we would like to continue, even though it will leave some
unused tags in the repo (they can be cleaned up later if they ever
show up).

Change-Id: If000163a321c869c46cfed4233c2ea42c3e8471b
This commit is contained in:
James E. Blair 2021-07-02 16:58:48 -07:00
parent 9d3aaaf434
commit e8cc0b54ed
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@
Authorization: "Bearer {{ token.json.token }}"
- name: Delete the current change tag
no_log: true
# In case the dockerhub API is out of sync with the registry, let's
# continue anyway.
failed_when: false
uri:
url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/{{ promote_tag_prefix }}_{{ zj_image_tag }}/"
method: DELETE