From 6701662ae0576f26e62fd23a07ba1bc16b938970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 7 Dec 2020 09:51:16 +0100 Subject: [PATCH] ci: Add .use-base-image template And use it in jobs for images using another Mesa image as their base. Should fix the build of images which don't use another Mesa image as their base (by no longer setting the FDO_BASE_IMAGE variable). Fixes: 0781d9825b31 "ci: Append $MESA_TEMPLATES_COMMIT to image tags" Acked-by: Eric Anholt Reviewed-by: Andres Gomez Part-of: --- .gitlab-ci.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7539db4e805..a7db6a4498e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -226,7 +226,6 @@ success: # Otherwise, container jobs won't run - when: never variables: - 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" @@ -234,6 +233,15 @@ success: # no need to pull the whole repo to build the container image GIT_STRATEGY: none +.use-base-image: + extends: + - .container + # Don't want the .container rules + - .ci-run-policy + stage: container-2 + variables: + FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}-${MESA_TEMPLATES_COMMIT}" + # Debian 10 based x86 build image base x86_build-base: extends: @@ -244,9 +252,8 @@ x86_build-base: .use-x86_build-base: extends: - - x86_build-base - - .ci-run-policy - stage: container-2 + - .fdo.container-build@debian + - .use-base-image variables: MESA_BASE_IMAGE: "debian/x86_build-base" MESA_BASE_TAG: *x86_build-base @@ -331,9 +338,8 @@ x86_test-base: .use-x86_test-base: extends: - - x86_build-base - - .ci-run-policy - stage: container-2 + - .fdo.container-build@debian + - .use-base-image variables: MESA_BASE_IMAGE: "debian/x86_test-base" MESA_BASE_TAG: *x86_test-base @@ -377,9 +383,8 @@ arm_test-base: .use-arm_test-base: extends: - - arm_test-base - - .ci-run-policy - stage: container-2 + - .fdo.container-build@debian + - .use-base-image variables: MESA_BASE_IMAGE: "debian/arm_test-base" MESA_BASE_TAG: *arm_test-base