use zj_image instead of image as loopvar

Change-Id: I2b34253e736252994681b7c69eb051c8a0659671
This commit is contained in:
Albin Vass 2020-05-02 15:46:46 +02:00
parent bee0c6ae2f
commit 4feb02f87e
2 changed files with 8 additions and 8 deletions

View File

@ -5,12 +5,12 @@
- name: Push tag to intermediate registry - name: Push tag to intermediate registry
command: >- command: >-
skopeo --insecure-policy copy skopeo --insecure-policy copy
docker://127.0.0.1:{{ socat_port }}/{{ image.repository | regex_replace('^docker\.io/(.*)', '\1') }}:{{ zj_image_tag }} docker://127.0.0.1:{{ socat_port }}/{{ zj_image.repository | regex_replace('^docker\.io/(.*)', '\1') }}:{{ zj_image_tag }}
docker://{{ intermediate_registry.host | ipwrap }}:{{ intermediate_registry.port }}/{{ image.repository }}:{{ zuul.build }}_{{ zj_image_tag }} docker://{{ intermediate_registry.host | ipwrap }}:{{ intermediate_registry.port }}/{{ zj_image.repository }}:{{ zuul.build }}_{{ zj_image_tag }}
retries: 3 retries: 3
register: result register: result
until: result is success until: result is success
loop: "{{ image.tags | default(['latest']) }}" loop: "{{ zj_image.tags | default(['latest']) }}"
loop_control: loop_control:
loop_var: zj_image_tag loop_var: zj_image_tag
@ -19,12 +19,12 @@
data: data:
zuul: zuul:
artifacts: artifacts:
- name: "{{ image.repository }}:{{ zj_image_tag }}" - name: "{{ zj_image.repository }}:{{ zj_image_tag }}"
url: "docker://{{ intermediate_registry.host | ipwrap }}:{{ intermediate_registry.port }}/{{ image.repository }}:{{ zuul.build }}_{{ zj_image_tag }}" url: "docker://{{ intermediate_registry.host | ipwrap }}:{{ intermediate_registry.port }}/{{ zj_image.repository }}:{{ zuul.build }}_{{ zj_image_tag }}"
metadata: metadata:
type: container_image type: container_image
repository: "{{ image.repository }}" repository: "{{ zj_image.repository }}"
tag: "{{ zj_image_tag }}" tag: "{{ zj_image_tag }}"
loop: "{{ image.tags | default(['latest']) }}" loop: "{{ zj_image.tags | default(['latest']) }}"
loop_control: loop_control:
loop_var: zj_image_tag loop_var: zj_image_tag

View File

@ -80,7 +80,7 @@
include_tasks: push-image.yaml include_tasks: push-image.yaml
loop: "{{ docker_images }}" loop: "{{ docker_images }}"
loop_control: loop_control:
loop_var: image loop_var: zj_image
always: always:
- name: Remove docker user config - name: Remove docker user config
command: "shred ~/.docker/config.json" command: "shred ~/.docker/config.json"