zuul-jobs/roles/build-docker-image/tasks/main.yaml
James E. Blair 1c827e4761 docker: prefix role vars
These probably should have been prefixed to start with.  The roles
are brand new, not publicised, and likely not widely used.  I think
we can merge this without announcement or deprecation.

Change-Id: I7825ef6fee1325b6d4fcc179032652eb5530d016
2019-01-17 11:28:37 -08:00

14 lines
445 B
YAML

- name: Build a docker image
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_work_dir }}/{{ item.context }}"
loop: "{{ docker_images }}"