From f4ffc94694b82f412d633fa8b01f0ef0ad3e4834 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 7 Feb 2023 09:51:29 +1100 Subject: [PATCH] build-docker-image: further cleanup buildx path The build we are doing here goes only into the temporary registry, and is then pulled back locally. So this image only needs the tag that it will get pulled with, which is done just below -- we can remove the "tag_prefix" and buildset-registry tags that won't be used. Change-Id: Ia9a3d3476e7971ee5a094f74628a6f6575b535a9 --- roles/build-docker-image/tasks/buildx.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/roles/build-docker-image/tasks/buildx.yaml b/roles/build-docker-image/tasks/buildx.yaml index b1d425c87..a160f71f9 100644 --- a/roles/build-docker-image/tasks/buildx.yaml +++ b/roles/build-docker-image/tasks/buildx.yaml @@ -5,8 +5,6 @@ # they can be pulled back onto the host image cache), and also tags # them for the buildset registry if one is present. - name: Set base docker build command - vars: - tag_prefix: "{{ ('change_' + zuul.change) if (zuul.change is defined) else zuul.pipeline }}_" set_fact: docker_buildx_command: >- docker buildx build {{ zj_image.path | default('.') }} -f {{ zj_image.dockerfile | default(docker_dockerfile) }} @@ -20,10 +18,6 @@ --build-arg "ZUUL_SIBLINGS={{ zj_image.siblings | join(' ') }}" {% endif -%} {% for tag in zj_image.tags | default(['latest']) -%} - --tag {{ temp_registry.host }}:{{ temp_registry.port }}/{{ zj_image.repository }}:{{ tag_prefix }}{{ tag }} - {% if buildset_registry | default(false) -%} - --tag {{ buildset_registry_alias }}:{{ buildset_registry.port }}/{{ zj_image.repository }}:{{ tag_prefix }}{{ tag }} - {% endif -%} --tag {{ temp_registry.host }}:{{ temp_registry.port }}/{{ zj_image.repository }}:{{ tag }} {% if buildset_registry | default(false) -%} --tag {{ buildset_registry_alias }}:{{ buildset_registry.port }}/{{ zj_image.repository }}:{{ tag }}