Change-Id: Ia14397389be0c7178c1879844cd675a3d291a3d0changes/77/630777/9
parent
b0731b9840
commit
d1a2dfa6f5
@ -1,7 +1,15 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Build a docker image
|
||||
command: "docker build {{ item.path | default('.') }} -f Dockerfile {{ target | default(false) | ternary('--target ', '') }}{{ target | default('') }} --tag {{ item.repository }}:change_{{ zuul.change }}"
|
||||
command: >-
|
||||
docker build {{ item.path | default('.') }} -f Dockerfile
|
||||
{% if target | default(false) -%}
|
||||
--target {{ target }}
|
||||
{% endif -%}
|
||||
{% for build_arg in item.build_args | default([]) -%}
|
||||
--build-arg {{ build_arg }}
|
||||
{% endfor -%}
|
||||
--tag {{ item.repository }}:change_{{ zuul.change }}
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}/{{ item.context }}"
|
||||
loop: "{{ images }}"
|
||||
|
Loading…
Reference in new issue