File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed
ansible/roles/build-ecs-proxies/tasks Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change 1010 changed_when : no
1111
1212- name : pull latest if exists - to ensure cache {{ item }}
13- docker_image :
14- name : " {{ ecr_registry }}/{{ item }}:{{ describe_images.stdout }}"
15- source : pull
13+ ansible.builtin.command :
14+ cmd : " docker pull {{ ecr_registry }}/{{ item }}:{{ describe_images.stdout }}"
1615 when : describe_images.stdout != 'None'
1716 ignore_errors : true
1817 no_log : true
1918
20- - name : build and push ecr image {{ item }}
21- docker_image :
22- name : " {{ image_name }}"
23- build :
24- path : " {{ base_dir }}/{{ images_map[item].path }}"
25- dockerfile : " {{ base_dir }}/{{ images_map[item].dockerfile }}"
26- pull : yes
27- network : host
28- source : build
29- force_source : yes
30- push : yes
31- timeout : 300
19+ - name : build ecr image {{ item }}
20+ ansible.builtin.command :
21+ cmd : >
22+ docker build
23+ -t {{ image_name }}
24+ -f {{ base_dir }}/{{ images_map[item].dockerfile }}
25+ {{ base_dir }}/{{ images_map[item].path }}
26+ --network host --pull
27+ register : build_result
28+ ignore_errors : false
29+
30+ - name : push ecr image {{ item }}
31+ ansible.builtin.command :
32+ cmd : " docker push {{ image_name }}"
33+ when : build_result.rc == 0
You can’t perform that action at this time.
0 commit comments