
In the image building loop, the loop variable is 'item' - which is where target is located. Change-Id: I4c9e612f58c1fd92a32da1888af195f17cb821eb
14 lines
455 B
YAML
14 lines
455 B
YAML
- name: Build a docker image
|
|
command: >-
|
|
docker build {{ item.path | default('.') }} -f Dockerfile
|
|
{% if item.target | default(false) -%}
|
|
--target {{ item.target }}
|
|
{% endif -%}
|
|
{% for build_arg in item.build_args | default([]) -%}
|
|
--build-arg {{ build_arg }}
|
|
{% endfor -%}
|
|
--tag {{ item.repository }}:change_{{ zuul.change }}
|
|
args:
|
|
chdir: "{{ zuul_work_dir }}/{{ item.context }}"
|
|
loop: "{{ docker_images }}"
|