ci: Move BASE_TAG expansion to FDO_BASE_IMAGE assignment
authorMichel Dänzer <mdaenzer@redhat.com>
Mon, 7 Dec 2020 08:35:53 +0000 (09:35 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Dec 2020 08:22:46 +0000 (08:22 +0000)
This fixes the build of images which use another Mesa image as the base.

v2:
* Move $CI_REGISTRY_IMAGE expansion into FDO_BASE_IMAGE assignment as
  well (Dave Airlie)

Fixes: 0781d9825b31 "ci: Append $MESA_TEMPLATES_COMMIT to image tags"
Reported-by: Dave Airlie <airlied@redhat.com>
Acked-by: Eric Anholt <eric@anholt.net> # v1
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7957>

.gitlab-ci.yml
.gitlab-ci/lava-gitlab-ci.yml

index 686898f..7539db4 100644 (file)
@@ -226,7 +226,7 @@ success:
     # Otherwise, container jobs won't run
     - when: never
   variables:
-    FDO_BASE_IMAGE: "${MESA_BASE_IMAGE}-${MESA_TEMPLATES_COMMIT}"
+    FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}-${MESA_TEMPLATES_COMMIT}"
     FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}-${MESA_TEMPLATES_COMMIT}"
     FDO_DISTRIBUTION_VERSION: buster-slim
     FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
@@ -248,8 +248,8 @@ x86_build-base:
     - .ci-run-policy
   stage: container-2
   variables:
-    BASE_TAG: *x86_build-base
-    MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_build-base:${BASE_TAG}"
+    MESA_BASE_IMAGE: "debian/x86_build-base"
+    MESA_BASE_TAG: *x86_build-base
   needs:
     - x86_build-base
 
@@ -335,8 +335,8 @@ x86_test-base:
     - .ci-run-policy
   stage: container-2
   variables:
-    BASE_TAG: *x86_test-base
-    MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_test-base:${BASE_TAG}"
+    MESA_BASE_IMAGE: "debian/x86_test-base"
+    MESA_BASE_TAG: *x86_test-base
   needs:
     - x86_test-base
 
@@ -381,8 +381,8 @@ arm_test-base:
     - .ci-run-policy
   stage: container-2
   variables:
-    BASE_TAG: *arm_test-base
-    MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:${BASE_TAG}"
+    MESA_BASE_IMAGE: "debian/arm_test-base"
+    MESA_BASE_TAG: *arm_test-base
   needs:
     - arm_test-base
 
index 462fe61..4053319 100644 (file)
@@ -17,7 +17,7 @@ kernel+rootfs_amd64:
   extends:
     - .use-x86_build-base
     - .kernel+rootfs
-  image: "$CI_REGISTRY_IMAGE/debian/x86_build-base:${BASE_TAG}-${MESA_TEMPLATES_COMMIT}"
+  image: "$CI_REGISTRY_IMAGE/debian/x86_build-base:${MESA_BASE_TAG}-${MESA_TEMPLATES_COMMIT}"
   variables:
     DEBIAN_ARCH: "amd64"