zuul-jobs/roles/build-docker-image/tasks/push.yaml
James E. Blair 6e7797adec Don't repeat the etc/alias setup for buildset registry pushes
This is currently run for each image that is built; we only need
to run it once.

Change-Id: I45cdf6caaaa0e3a5ebc6bc7f0fcb96f3ea47b9a8
2019-04-25 14:33:13 -07:00

13 lines
550 B
YAML

- name: Tag image for buildset registry
command: >-
docker tag {{ image.repository }}:{{ image_tag }} {{ buildset_registry_alias }}:{{ buildset_registry.port }}/{{ image.repository }}:{{ image_tag }}
loop: "{{ image.tags | default(['latest']) }}"
loop_control:
loop_var: image_tag
- name: Push tag to buildset registry
command: >-
docker push {{ buildset_registry_alias }}:{{ buildset_registry.port }}/{{ image.repository }}:{{ image_tag }}
loop: "{{ image.tags | default(['latest']) }}"
loop_control:
loop_var: image_tag