From 7cf69a0f2f84f6479df7db11eefe6b4df2fdb068 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Mon, 29 Jul 2024 16:34:43 +0300 Subject: [PATCH] ci: Create a separate image for fluster Move the fluster setup into it's own image. It's only one job using it and this allows us to make the build image used for the rest of the jobs smaller. Part-of: --- .gitlab-ci.yml | 24 +++++++++++++++++++++++- ci/docker/fedora/prepare.sh | 2 -- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e691286496..e27409310d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,6 +135,16 @@ trigger: FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH" FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh' +.fedora fluster image: + variables: + CCACHE_DIR: !reference [".fedora image", "variables", CCACHE_DIR] + FDO_DISTRIBUTION_VERSION: !reference [".fedora image", "variables", FDO_DISTRIBUTION_VERSION] + FDO_REPO_SUFFIX: !reference [".fedora image", "variables", FDO_REPO_SUFFIX] + FDO_DISTRIBUTION_TAG: "fluster-$FEDORA_TAG-$GST_UPSTREAM_BRANCH" + FDO_DISTRIBUTION_EXEC: "bash ./ci/docker/fedora/virtme-fluster-setup.sh" + # Base the fluster image on top of the main fedora build image + FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/$FDO_REPO_SUFFIX:$FEDORA_TAG-$GST_UPSTREAM_BRANCH" + fedora amd64 docker: extends: - '.fedora image' @@ -145,6 +155,16 @@ fedora amd64 docker: # (which has faster network connectivity to the registry). tags: [ 'placeholder-job' ] +fedora amd64 docker fluster: + extends: + - '.fedora fluster image' + - '.fdo.container-build@fedora' + stage: 'preparation' + needs: ["fedora amd64 docker"] + # Note: assumption is that placeholder jobs run on a packet runner + # (which has faster network connectivity to the registry). + tags: [ 'placeholder-job' ] + # Build a toolbox specific image to workaround ci-templates fedora amd64 toolbox: image: quay.io/freedesktop.org/ci-templates:container-build-base-2024-01-31.0 @@ -850,7 +870,9 @@ gstreamer-full-minimal static build: # v4l2-stateless-decoders tests fluster v4l2-stateless on visl: - extends: 'gstreamer-full static build' + extends: + - '.fedora fluster image' + - '.fdo.suffixed-image@fedora' stage: 'test' variables: BUILD_GST_DEBUG: '-Dgstreamer:gst_debug=false' diff --git a/ci/docker/fedora/prepare.sh b/ci/docker/fedora/prepare.sh index 3589add372..66fd145776 100644 --- a/ci/docker/fedora/prepare.sh +++ b/ci/docker/fedora/prepare.sh @@ -10,6 +10,4 @@ git config --global user.name "Gstbuild Runner" bash ./ci/scripts/install-rust.sh -bash ./ci/docker/fedora/virtme-fluster-setup.sh - bash ./ci/scripts/create-subprojects-cache.sh