454b5349b0
We think that sometimes the network derps so the whole copy goes bad. Add retries in to the mix since a copy command is idempotent. Change-Id: I2d2891f2ebe3ca6a99874d9cf028addea888c3b7
27 lines
1006 B
YAML
27 lines
1006 B
YAML
- name: Push tag to intermediate registry
|
|
command: >-
|
|
skopeo --insecure-policy copy
|
|
docker://127.0.0.1:{{ socat_port }}/{{ image.repository }}:{{ image_tag }}
|
|
docker://{{ intermediate_registry.host | ipwrap }}:{{ intermediate_registry.port}}/{{ image.repository }}:{{ zuul.build }}_{{ image_tag }}
|
|
retries: 3
|
|
register: result
|
|
until: result is success
|
|
loop: "{{ image.tags | default(['latest']) }}"
|
|
loop_control:
|
|
loop_var: image_tag
|
|
|
|
- name: Return artifact to Zuul
|
|
zuul_return:
|
|
data:
|
|
zuul:
|
|
artifacts:
|
|
- name: "image_{{ image.repository }}:{{ image_tag }}"
|
|
url: "docker://{{ intermediate_registry.host | ipwrap }}:{{ intermediate_registry.port}}/{{ image.repository }}:{{ zuul.build }}_{{ image_tag}}"
|
|
metadata:
|
|
type: container_image
|
|
repository: "{{ image.repository }}"
|
|
tag: "{{ image_tag }}"
|
|
loop: "{{ image.tags | default(['latest']) }}"
|
|
loop_control:
|
|
loop_var: image_tag
|