diff --git a/roles/build-container-image/tasks/push.yaml b/roles/build-container-image/tasks/push.yaml index 410122cb7..7ef241d6c 100644 --- a/roles/build-container-image/tasks/push.yaml +++ b/roles/build-container-image/tasks/push.yaml @@ -1,6 +1,9 @@ - name: Tag image for buildset registry command: >- {{ container_command }} tag {{ zj_image.repository }}:{{ zj_image_tag }} {{ buildset_registry_alias }}:{{ buildset_registry.port }}/{{ zj_image.repository }}:{{ zj_image_tag }} + register: result + until: result is succeeded + retries: 3 loop: "{{ zj_image.tags | default(['latest']) }}" loop_control: loop_var: zj_image_tag @@ -8,6 +11,9 @@ - name: Push tag to buildset registry command: >- {{ container_command }} push {{ buildset_registry_alias }}:{{ buildset_registry.port }}/{{ zj_image.repository }}:{{ zj_image_tag }} + register: result + until: result is succeeded + retries: 3 loop: "{{ zj_image.tags | default(['latest']) }}" loop_control: loop_var: zj_image_tag