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

View file

@ -17,7 +17,7 @@ kernel+rootfs_amd64:
extends: extends:
- .use-x86_build-base - .use-x86_build-base
- .kernel+rootfs - .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: variables:
DEBIAN_ARCH: "amd64" DEBIAN_ARCH: "amd64"