From d46dd23e1cb784d91e530fe7437b03a662404f92 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 23 Mar 2025 14:31:53 +0100 Subject: [PATCH] ci: Fix dist tarball name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release service does not allow `v` prefix in version part of the tarball: https://gitlab.gnome.org/Infrastructure/openshift-images/gnome-release-service/-/blob/263345eaa9db60dc4a495409298e2b9aff03bc6f/gnome_release_service/gnome_release_system/modules/module_release.py#L79-87 So renaming of the tarball in e028cc5c62ecec54c2d839fa7ced8e8e26f9fc30 did not help – the pipeline instead started failing with: curl: (22) The requested URL returned error: 400{"detail":"Could not parse tarball name: calls-v48.0.tar.xz."} Since it is not possible to use shell or other replacement mechanisms in `variables`, let’s obtain the produced dist tarball path in `script` and pass it to `deploy` through `dotenv` artifact: https://docs.gitlab.com/ci/variables/#pass-an-environment-variable-to-another-job Part-of: --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9203702..46c9ac5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,6 @@ variables: DEBIAN_IMAGE: $CI_REGISTRY/gnome/calls/debian:v0.0.2024-11-10 GIT_SUBMODULE_STRATEGY: normal MESON_BUILD_DIR: "_build" - TARBALL_ARTIFACT_PATH: "${MESON_BUILD_DIR}/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz" build:native: stage: build @@ -58,11 +57,13 @@ build:tarball: artifacts: name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" paths: - - "${TARBALL_ARTIFACT_PATH}" + - "${MESON_BUILD_DIR}/meson-dist" + reports: + dotenv: build.env script: - meson setup . "${MESON_BUILD_DIR}" - xvfb-run -s -noreset meson dist --include-subprojects -C "${MESON_BUILD_DIR}" - - mv ${MESON_BUILD_DIR}/meson-dist/calls*.tar.xz ${TARBALL_ARTIFACT_PATH} + - echo "TARBALL_ARTIFACT_PATH=$(ls ${MESON_BUILD_DIR}/meson-dist/*.tar.xz)" >> build.env only: - tags