From 8567dddf9788dad9aa0f4b23b483bdd8ae7c219b Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 18 Feb 2019 15:32:17 -0800 Subject: [PATCH] Fix build-docker-image when using buildset_registry This was incorrect ansible -- we need to run two commands here, so let's just do it as two tasks. Change-Id: I88c6382f7f41659217ae66f07d6e5d9db0bf3b38 --- roles/build-docker-image/tasks/push.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/build-docker-image/tasks/push.yaml b/roles/build-docker-image/tasks/push.yaml index ed41714bb..d49edd1df 100644 --- a/roles/build-docker-image/tasks/push.yaml +++ b/roles/build-docker-image/tasks/push.yaml @@ -1,6 +1,11 @@ -- name: Push tag to buildset registry +- name: Tag image for buildset registry command: >- docker tag {{ image.repository }}:{{ image_tag }} {{ buildset_registry.host }}:{{ 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.host }}:{{ buildset_registry.port }}/{{ image.repository }}:{{ image_tag }} loop: "{{ image.tags | default(['latest']) }}" loop_control: