- 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 }}"