From 3bab13b2286bf96b9a65a1bc5d7aba533277c6e2 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Tue, 3 Nov 2020 20:52:31 +0200 Subject: [PATCH] ci: move f.do_distro_{tag, exec} vars to the jobs The gitlab parser will only expand the variables once, which make it impossible to abstract over the rust version in a nice way. A hacky workaround is to duplicate some things and get rid of the RUST_VERSION var to avoid the issue. https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/618#note_679774 --- .gitlab-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 08007746f..0fe2c20f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,7 +41,6 @@ stages: .debian:10: variables: FDO_DISTRIBUTION_VERSION: 10 - FDO_DISTRIBUTION_TAG: '$RUST_VERSION-$GST_RS_IMG_TAG' before_script: - source ./ci/env.sh - mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config @@ -61,18 +60,21 @@ stages: .debian:10-stable: extends: .debian:10 variables: - RUST_VERSION: '$GST_RS_STABLE' RUST_IMAGE_FULL: "1" + FDO_DISTRIBUTION_TAG: '$GST_RS_STABLE-$GST_RS_IMG_TAG' + FDO_DISTRIBUTION_EXEC: 'bash ci/install-rust.sh $GST_RS_STABLE $RUST_IMAGE_FULL' .debian:10-msrv: extends: .debian:10 variables: - RUST_VERSION: '$GST_RS_MSRV' + FDO_DISTRIBUTION_TAG: '$GST_RS_MSRV-$GST_RS_IMG_TAG' + FDO_DISTRIBUTION_EXEC: 'bash ci/install-rust.sh $GST_RS_MSRV $RUST_IMAGE_FULL' .debian:10-nightly: extends: .debian:10 variables: - RUST_VERSION: 'nightly' + FDO_DISTRIBUTION_TAG: 'nightly-$GST_RS_IMG_TAG' + FDO_DISTRIBUTION_EXEC: 'bash ci/install-rust.sh nightly $RUST_IMAGE_FULL' .build-base-image: extends: @@ -88,7 +90,6 @@ stages: stage: container-final variables: FDO_BASE_IMAGE: '$CI_REGISTRY_IMAGE/debian/10:base-$GST_RS_IMG_TAG' - FDO_DISTRIBUTION_EXEC: 'bash ci/install-rust.sh $RUST_VERSION $RUST_IMAGE_FULL' build-base: extends: