summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2019-01-22 18:59:50 +0000
committerMonty Taylor <mordred@inaugust.com>2019-01-22 18:59:50 +0000
commit2b27f720a2e641e73db70d656bcc388bbd9b7e65 (patch)
tree8715ec449679b9eef2916a425fc257a37cd0879f
parentcb54c59577f69687b283b2ccd117fe4c0bce2f9b (diff)
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
Notes
Notes (review): Code-Review+2: David Shrewsbury <shrewsbury.dave@gmail.com> Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Workflow+1: Tobias Henkel <tobias.henkel@bmw.de> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 22 Jan 2019 19:47:35 +0000 Reviewed-on: https://review.openstack.org/632528 Project: openstack-infra/zuul-jobs Branch: refs/heads/master
-rw-r--r--roles/build-docker-image/tasks/main.yaml4
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/build-docker-image/tasks/main.yaml b/roles/build-docker-image/tasks/main.yaml
index 795cbf7..904282e 100644
--- a/roles/build-docker-image/tasks/main.yaml
+++ b/roles/build-docker-image/tasks/main.yaml
@@ -1,8 +1,8 @@
1- name: Build a docker image 1- name: Build a docker image
2 command: >- 2 command: >-
3 docker build {{ item.path | default('.') }} -f Dockerfile 3 docker build {{ item.path | default('.') }} -f Dockerfile
4 {% if target | default(false) -%} 4 {% if item.target | default(false) -%}
5 --target {{ target }} 5 --target {{ item.target }}
6 {% endif -%} 6 {% endif -%}
7 {% for build_arg in item.build_args | default([]) -%} 7 {% for build_arg in item.build_args | default([]) -%}
8 --build-arg {{ build_arg }} 8 --build-arg {{ build_arg }}