summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2019-01-23 17:58:30 +0000
committerMonty Taylor <mordred@inaugust.com>2019-01-23 18:06:47 +0000
commit0ac452ea28c73f4819892b0a86634fbaf47e5aa0 (patch)
tree5f6242f2c8988c6ae2abbc74363ca18163eeb34c
parent2e46b8b9cf0e239cb98f56608a0be27457257fc3 (diff)
Apply requested tags locally for docker build
When doing the local build, go ahead and apply the tags to the local image, so that one can use the role for building local images for testing that will eventually be published with the given tag. Change-Id: I0249ddc4f9a8a2e17466f96a5711672282ce025c
Notes
Notes (review): Code-Review+2: James E. Blair <corvus@inaugust.com> Code-Review+2: Andreas Jaeger <jaegerandi@gmail.com> Workflow+1: Andreas Jaeger <jaegerandi@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 24 Jan 2019 07:36:58 +0000 Reviewed-on: https://review.openstack.org/632790 Project: openstack-infra/zuul-jobs Branch: refs/heads/master
-rw-r--r--roles/build-docker-image/tasks/main.yaml3
1 files changed, 3 insertions, 0 deletions
diff --git a/roles/build-docker-image/tasks/main.yaml b/roles/build-docker-image/tasks/main.yaml
index 904282e..5b8fe61 100644
--- a/roles/build-docker-image/tasks/main.yaml
+++ b/roles/build-docker-image/tasks/main.yaml
@@ -8,6 +8,9 @@
8 --build-arg {{ build_arg }} 8 --build-arg {{ build_arg }}
9 {% endfor -%} 9 {% endfor -%}
10 --tag {{ item.repository }}:change_{{ zuul.change }} 10 --tag {{ item.repository }}:change_{{ zuul.change }}
11 {% for tag in item.tags | default(['latest']) -%}
12 --tag {{ item.repository }}:{{ tag }}
13 {% endfor -%}
11 args: 14 args:
12 chdir: "{{ zuul_work_dir }}/{{ item.context }}" 15 chdir: "{{ zuul_work_dir }}/{{ item.context }}"
13 loop: "{{ docker_images }}" 16 loop: "{{ docker_images }}"