From 4feb02f87e4d5aacfa2ed42bb817d67ac6f619d9 Mon Sep 17 00:00:00 2001 From: Albin Vass Date: Sat, 2 May 2020 15:46:46 +0200 Subject: [PATCH] use zj_image instead of image as loopvar Change-Id: I2b34253e736252994681b7c69eb051c8a0659671 --- .../tasks/push-image.yaml | 14 +++++++------- .../push-to-intermediate-registry/tasks/push.yaml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/push-to-intermediate-registry/tasks/push-image.yaml b/roles/push-to-intermediate-registry/tasks/push-image.yaml index 47a064829..91bf51401 100644 --- a/roles/push-to-intermediate-registry/tasks/push-image.yaml +++ b/roles/push-to-intermediate-registry/tasks/push-image.yaml @@ -5,12 +5,12 @@ - name: Push tag to intermediate registry command: >- skopeo --insecure-policy copy - docker://127.0.0.1:{{ socat_port }}/{{ 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://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 }}/{{ zj_image.repository }}:{{ zuul.build }}_{{ zj_image_tag }} retries: 3 register: result until: result is success - loop: "{{ image.tags | default(['latest']) }}" + loop: "{{ zj_image.tags | default(['latest']) }}" loop_control: loop_var: zj_image_tag @@ -19,12 +19,12 @@ data: zuul: artifacts: - - name: "{{ image.repository }}:{{ zj_image_tag }}" - url: "docker://{{ intermediate_registry.host | ipwrap }}:{{ intermediate_registry.port }}/{{ image.repository }}:{{ zuul.build }}_{{ zj_image_tag }}" + - name: "{{ zj_image.repository }}:{{ zj_image_tag }}" + url: "docker://{{ intermediate_registry.host | ipwrap }}:{{ intermediate_registry.port }}/{{ zj_image.repository }}:{{ zuul.build }}_{{ zj_image_tag }}" metadata: type: container_image - repository: "{{ image.repository }}" + repository: "{{ zj_image.repository }}" tag: "{{ zj_image_tag }}" - loop: "{{ image.tags | default(['latest']) }}" + loop: "{{ zj_image.tags | default(['latest']) }}" loop_control: loop_var: zj_image_tag diff --git a/roles/push-to-intermediate-registry/tasks/push.yaml b/roles/push-to-intermediate-registry/tasks/push.yaml index 03f63bffe..a85a3b3ce 100644 --- a/roles/push-to-intermediate-registry/tasks/push.yaml +++ b/roles/push-to-intermediate-registry/tasks/push.yaml @@ -80,7 +80,7 @@ include_tasks: push-image.yaml loop: "{{ docker_images }}" loop_control: - loop_var: image + loop_var: zj_image always: - name: Remove docker user config command: "shred ~/.docker/config.json"