ci: Append $MESA_TEMPLATES_COMMIT to image tags

This ensures all images get rebuilt when we update to a newer
ci-templates commit.

v2:
* Append to WINDOWS(_UPSTREAM)_IMAGE instead of WINDOWS_TAG. The latter
  failed, apparently variables are not expanded recursively on the
  Windows runners.
* Use separate MESA_IMAGE_TAG/MESA_BASE_IMAGE variables instead of
  appending to each FDO_DISTRIBUTION_TAG/FDO_BASE_IMAGE separately for
  Linux jobs, to prevent accidentally dropping the suffix.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7902>
This commit is contained in:
Michel Dänzer 2020-12-03 17:54:05 +01:00 committed by Marge Bot
parent 48f78dfd1a
commit 0781d9825b
2 changed files with 32 additions and 30 deletions

View File

@ -178,7 +178,7 @@ success:
# Build the CI docker images.
#
# FDO_DISTRIBUTION_TAG is the tag of the docker image used by later stage jobs. If the
# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
# image doesn't exist yet, the container stage job generates it.
#
# In order to generate a new image, one should generally change the tag.
@ -226,6 +226,8 @@ success:
# Otherwise, container jobs won't run
- when: never
variables:
FDO_BASE_IMAGE: "${MESA_BASE_IMAGE}-${MESA_TEMPLATES_COMMIT}"
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}-${MESA_TEMPLATES_COMMIT}"
FDO_DISTRIBUTION_VERSION: buster-slim
FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
@ -238,7 +240,7 @@ x86_build-base:
- .fdo.container-build@debian
- .container
variables:
FDO_DISTRIBUTION_TAG: &x86_build-base "2020-12-02"
MESA_IMAGE_TAG: &x86_build-base "2020-12-02"
.use-x86_build-base:
extends:
@ -247,7 +249,7 @@ x86_build-base:
stage: container-2
variables:
BASE_TAG: *x86_build-base
FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_build-base:$BASE_TAG"
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_build-base:${BASE_TAG}"
needs:
- x86_build-base
@ -256,12 +258,12 @@ x86_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_build "2020-12-02"
MESA_IMAGE_TAG: &x86_build "2020-12-02"
.use-x86_build:
variables:
TAG: *x86_build
image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
image: "$CI_REGISTRY_IMAGE/debian/x86_build:${TAG}-${MESA_TEMPLATES_COMMIT}"
needs:
- x86_build
@ -270,12 +272,12 @@ i386_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &i386_build "2020-12-02"
MESA_IMAGE_TAG: &i386_build "2020-12-02"
.use-i386_build:
variables:
TAG: *i386_build
image: "$CI_REGISTRY_IMAGE/debian/i386_build:$TAG"
image: "$CI_REGISTRY_IMAGE/debian/i386_build:${TAG}-${MESA_TEMPLATES_COMMIT}"
needs:
- i386_build
@ -284,12 +286,12 @@ ppc64el_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-12-02"
MESA_IMAGE_TAG: &ppc64el_build "2020-12-02"
.use-ppc64el_build:
variables:
TAG: *ppc64el_build
image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:$TAG"
image: "$CI_REGISTRY_IMAGE/debian/ppc64el_build:${TAG}-${MESA_TEMPLATES_COMMIT}"
needs:
- ppc64el_build
@ -298,12 +300,12 @@ s390x_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &s390x_build "2020-12-02"
MESA_IMAGE_TAG: &s390x_build "2020-12-02"
.use-s390x_build:
variables:
TAG: *s390x_build
image: "$CI_REGISTRY_IMAGE/debian/s390x_build:$TAG"
image: "$CI_REGISTRY_IMAGE/debian/s390x_build:${TAG}-${MESA_TEMPLATES_COMMIT}"
needs:
- s390x_build
@ -312,12 +314,12 @@ android_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &android_build "2020-12-02"
MESA_IMAGE_TAG: &android_build "2020-12-02"
.use-android_build:
variables:
TAG: *android_build
image: "$CI_REGISTRY_IMAGE/debian/android_build:$TAG"
image: "$CI_REGISTRY_IMAGE/debian/android_build:${TAG}-${MESA_TEMPLATES_COMMIT}"
needs:
- android_build
@ -325,7 +327,7 @@ android_build:
x86_test-base:
extends: x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-base "2020-12-02"
MESA_IMAGE_TAG: &x86_test-base "2020-12-02"
.use-x86_test-base:
extends:
@ -334,7 +336,7 @@ x86_test-base:
stage: container-2
variables:
BASE_TAG: *x86_test-base
FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_test-base:$BASE_TAG"
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/x86_test-base:${BASE_TAG}"
needs:
- x86_test-base
@ -342,25 +344,25 @@ x86_test-base:
x86_test-gl:
extends: .use-x86_test-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-11-06-deqp-version"
MESA_IMAGE_TAG: &x86_test-gl "2020-11-06-deqp-version"
# Debian 10 based x86 test image for VK
x86_test-vk:
extends: .use-x86_test-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-11-06-deqp-version"
MESA_IMAGE_TAG: &x86_test-vk "2020-11-06-deqp-version"
# Debian 9 based x86 build image (old LLVM)
x86_build_old:
extends: x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_build_old "2020-12-02"
MESA_IMAGE_TAG: &x86_build_old "2020-12-02"
FDO_DISTRIBUTION_VERSION: stretch-slim
.use-x86_build_old:
variables:
TAG: *x86_build_old
image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:$TAG"
image: "$CI_REGISTRY_IMAGE/debian/x86_build_old:${TAG}-${MESA_TEMPLATES_COMMIT}"
needs:
- x86_build_old
@ -370,12 +372,12 @@ arm_build:
- .fdo.container-build@debian@arm64v8
- .container
variables:
FDO_DISTRIBUTION_TAG: &arm_build "2020-12-02"
MESA_IMAGE_TAG: &arm_build "2020-12-02"
.use-arm_build:
variables:
TAG: *arm_build
image: "$CI_REGISTRY_IMAGE/debian/arm_build:$TAG"
image: "$CI_REGISTRY_IMAGE/debian/arm_build:${TAG}-${MESA_TEMPLATES_COMMIT}"
needs:
- arm_build
@ -385,7 +387,7 @@ arm_test-base:
- .fdo.container-build@debian
- .container
variables:
FDO_DISTRIBUTION_TAG: &arm_test-base "2020-12-03-expect"
MESA_IMAGE_TAG: &arm_test-base "2020-12-03-expect"
.use-arm_test-base:
extends:
@ -394,7 +396,7 @@ arm_test-base:
stage: container-2
variables:
BASE_TAG: *arm_test-base
FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:$BASE_TAG"
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:${BASE_TAG}"
needs:
- arm_test-base
@ -403,12 +405,12 @@ arm64_test:
extends:
- .use-arm_test-base
variables:
FDO_DISTRIBUTION_TAG: &arm64_test "2020-12-03-expect"
MESA_IMAGE_TAG: &arm64_test "2020-12-03-expect"
.use-arm64_test:
variables:
TAG: *arm64_test
image: "$CI_REGISTRY_IMAGE/debian/arm64_test:$TAG"
image: "$CI_REGISTRY_IMAGE/debian/arm64_test:${TAG}-${MESA_TEMPLATES_COMMIT}"
needs:
- arm64_test
@ -441,8 +443,8 @@ armhf_test:
.windows-docker-vs2019:
variables:
WINDOWS_TAG: "2020-12-02"
WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:${WINDOWS_TAG}-${MESA_TEMPLATES_COMMIT}"
WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/windows/x64_build:${WINDOWS_TAG}-${MESA_TEMPLATES_COMMIT}"
windows_build_vs2019:
extends:
@ -981,7 +983,7 @@ meson-mingw32-x86_64:
- .test
variables:
TAG: *x86_test-gl
image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:$TAG"
image: "$CI_REGISTRY_IMAGE/debian/x86_test-gl:${TAG}-${MESA_TEMPLATES_COMMIT}"
needs:
- x86_test-gl
@ -997,7 +999,7 @@ meson-mingw32-x86_64:
- .test
variables:
TAG: *x86_test-vk
image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:$TAG"
image: "$CI_REGISTRY_IMAGE/debian/x86_test-vk:${TAG}-${MESA_TEMPLATES_COMMIT}"
needs:
- meson-testing
- x86_test-vk

View 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"
image: "$CI_REGISTRY_IMAGE/debian/x86_build-base:${BASE_TAG}-${MESA_TEMPLATES_COMMIT}"
variables:
DEBIAN_ARCH: "amd64"