system-config/playbooks/zuul/build-image/run.yaml

8 lines
368 B
YAML

- 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 }}"
args:
chdir: "{{ zuul.project.src_dir }}/{{ item.context }}"
loop: "{{ images }}"