Fix incorrect variable name for promote-docker-image
The variable was changed inside the role from image to zj_image but the included task file did not use the new variable name. This patch fixes this. Change-Id: Ibe3acbd0881da24ec9c2f636d777885a309bdf98
This commit is contained in:
parent
d0e2016592
commit
5b37cabf41
@ -1,6 +1,6 @@
|
||||
- name: List tags
|
||||
uri:
|
||||
url: "https://hub.docker.com/v2/repositories/{{ image.repository }}/tags?page_size=1000"
|
||||
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
|
||||
@ -13,7 +13,7 @@
|
||||
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/{{ image.repository }}/tags/{{ zj_docker_tag.name }}/"
|
||||
url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/{{ zj_docker_tag.name }}/"
|
||||
method: DELETE
|
||||
status_code: [200,204]
|
||||
headers:
|
||||
|
@ -1,7 +1,7 @@
|
||||
- name: Get manifest
|
||||
no_log: true
|
||||
uri:
|
||||
url: "https://registry.hub.docker.com/v2/{{ image.repository }}/manifests/change_{{ zuul.change }}_{{ image_tag }}"
|
||||
url: "https://registry.hub.docker.com/v2/{{ zj_image.repository }}/manifests/change_{{ zuul.change }}_{{ image_tag }}"
|
||||
status_code: 200
|
||||
headers:
|
||||
Accept: "application/vnd.docker.distribution.manifest.v2+json"
|
||||
@ -11,7 +11,7 @@
|
||||
- name: Put manifest
|
||||
no_log: true
|
||||
uri:
|
||||
url: "https://registry.hub.docker.com/v2/{{ image.repository }}/manifests/{{ image_tag }}"
|
||||
url: "https://registry.hub.docker.com/v2/{{ zj_image.repository }}/manifests/{{ image_tag }}"
|
||||
method: PUT
|
||||
status_code: 201
|
||||
body: "{{ manifest.content | string }}"
|
||||
@ -21,7 +21,7 @@
|
||||
- name: Delete the current change tag
|
||||
no_log: true
|
||||
uri:
|
||||
url: "https://hub.docker.com/v2/repositories/{{ image.repository }}/tags/change_{{ zuul.change }}_{{ image_tag }}/"
|
||||
url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/change_{{ zuul.change }}_{{ image_tag }}/"
|
||||
method: DELETE
|
||||
status_code: [200,204]
|
||||
headers:
|
||||
|
@ -7,7 +7,7 @@
|
||||
force_basic_auth: true
|
||||
register: token
|
||||
- name: Retag image
|
||||
loop: "{{ image.tags | default(['latest']) }}"
|
||||
loop: "{{ zj_image.tags | default(['latest']) }}"
|
||||
loop_control:
|
||||
loop_var: image_tag
|
||||
include_tasks: promote-retag-inner.yaml
|
||||
|
Loading…
Reference in New Issue
Block a user