16 lines
519 B
YAML
16 lines
519 B
YAML
- hosts: all
|
|
tasks:
|
|
- 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.project.src_dir }}/{{ item.context }}"
|
|
loop: "{{ images }}"
|