Browse Source

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
changes/90/632790/2
Monty Taylor 5 months ago
parent
commit
0ac452ea28
No account linked to committer's email address
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      roles/build-docker-image/tasks/main.yaml

+ 3
- 0
roles/build-docker-image/tasks/main.yaml View File

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

Loading…
Cancel
Save