4ed66807a0
We have to be careful about avoiding outer loop loop_var conflicts in ansible. Because the zuul-jobs roles are meant to be reconsumed elsewhere we should not use 'item' loopvars and instead set them to something a bit more unique. We use a zj_ prefix to try and be unique to this repo and document this convention. Change-Id: I20b9327a914890e9eafcb2b36dc8c23fb472bc8f
10 lines
284 B
YAML
10 lines
284 B
YAML
- name: Upload tag to dockerhub
|
|
command: "docker push {{ image.repository }}:change_{{ zuul.change }}_{{ zj_image_tag }}"
|
|
loop: "{{ image.tags | default(['latest']) }}"
|
|
loop_control:
|
|
loop_var: zj_image_tag
|
|
register: result
|
|
until: result.rc == 0
|
|
retries: 3
|
|
delay: 30
|