From abd4ab18a3c61ec1b6ce80758a585d3d7ba97478 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 22 Jul 2020 07:26:05 -0700 Subject: [PATCH] Temporarily disable tag cleanup in docker promote This was relying on a bug in the executor. It's not critical functionality, so just avoid it for now. Change-Id: I6069150324d0b921cdb8cbc6902e74ec2a6036cc --- .../tasks/promote-cleanup.yaml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/roles/promote-docker-image/tasks/promote-cleanup.yaml b/roles/promote-docker-image/tasks/promote-cleanup.yaml index e0affc2a6..385cd8eed 100644 --- a/roles/promote-docker-image/tasks/promote-cleanup.yaml +++ b/roles/promote-docker-image/tasks/promote-cleanup.yaml @@ -3,18 +3,18 @@ url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags?page_size=1000" status_code: 200 register: tags -- name: Set cutoff timestamp to 24 hours ago - command: "python3 -c \"import datetime; print((datetime.datetime.utcnow()-datetime.timedelta(days=1)).strftime('%Y-%m-%dT%H:%M:%fZ'))\"" - register: cutoff -- name: Delete all change tags older than the cutoff - no_log: true - loop: "{{ tags.json.results }}" - loop_control: - loop_var: zj_docker_tag - when: zj_docker_tag.last_updated < cutoff.stdout and zj_docker_tag.name.startswith('change_') - uri: - url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/{{ zj_docker_tag.name }}/" - method: DELETE - status_code: [200, 204] - headers: - Authorization: "JWT {{ jwt_token.json.token }}" +# - name: Set cutoff timestamp to 24 hours ago +# command: "python3 -c \"import datetime; print((datetime.datetime.utcnow()-datetime.timedelta(days=1)).strftime('%Y-%m-%dT%H:%M:%fZ'))\"" +# register: cutoff +# - name: Delete all change tags older than the cutoff +# no_log: true +# loop: "{{ tags.json.results }}" +# loop_control: +# loop_var: zj_docker_tag +# when: zj_docker_tag.last_updated < cutoff.stdout and zj_docker_tag.name.startswith('change_') +# uri: +# url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/{{ zj_docker_tag.name }}/" +# method: DELETE +# status_code: [200, 204] +# headers: +# Authorization: "JWT {{ jwt_token.json.token }}"