build-container-image: improve the reliabilty
build-container-image may ends up pushing large files. Network is not always as reliable as we want. This commit ensures we retry several times in case of failure. Change-Id: Ieaf92a8c3531e24ab5e41783b540de1df806c02f
This commit is contained in:
parent
d5e4d55c15
commit
ad56b0b4eb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user