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
This commit is contained in:
Monty Taylor 2019-01-23 17:58:30 +00:00
parent 2e46b8b9cf
commit 0ac452ea28
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,9 @@
--build-arg {{ build_arg }}
{% endfor -%}
--tag {{ item.repository }}:change_{{ zuul.change }}
{% for tag in item.tags | default(['latest']) -%}
--tag {{ item.repository }}:{{ tag }}
{% endfor -%}
args:
chdir: "{{ zuul_work_dir }}/{{ item.context }}"
loop: "{{ docker_images }}"