Pull target from item in build image

In the image building loop, the loop variable is 'item' - which is
where target is located.

Change-Id: I4c9e612f58c1fd92a32da1888af195f17cb821eb
This commit is contained in:
Monty Taylor 2019-01-22 18:59:50 +00:00
parent cb54c59577
commit 2b27f720a2
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 2 additions and 2 deletions

View File

@ -1,8 +1,8 @@
- name: Build a docker image
command: >-
docker build {{ item.path | default('.') }} -f Dockerfile
{% if target | default(false) -%}
--target {{ target }}
{% if item.target | default(false) -%}
--target {{ item.target }}
{% endif -%}
{% for build_arg in item.build_args | default([]) -%}
--build-arg {{ build_arg }}