ci: Fix dist tarball name

The release service does not allow `v` prefix in version part of the tarball:
263345eaa9/gnome_release_service/gnome_release_system/modules/module_release.py (L79-87)

So renaming of the tarball in e028cc5c62
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: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/770>
This commit is contained in:
Jan Tojnar
2025-03-23 14:31:53 +01:00
committed by Marge Bot
parent 7e9496d070
commit d46dd23e1c

View File

@@ -30,7 +30,6 @@ variables:
DEBIAN_IMAGE: $CI_REGISTRY/gnome/calls/debian:v0.0.2024-11-10 DEBIAN_IMAGE: $CI_REGISTRY/gnome/calls/debian:v0.0.2024-11-10
GIT_SUBMODULE_STRATEGY: normal GIT_SUBMODULE_STRATEGY: normal
MESON_BUILD_DIR: "_build" MESON_BUILD_DIR: "_build"
TARBALL_ARTIFACT_PATH: "${MESON_BUILD_DIR}/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz"
build:native: build:native:
stage: build stage: build
@@ -58,11 +57,13 @@ build:tarball:
artifacts: artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
paths: paths:
- "${TARBALL_ARTIFACT_PATH}" - "${MESON_BUILD_DIR}/meson-dist"
reports:
dotenv: build.env
script: script:
- meson setup . "${MESON_BUILD_DIR}" - meson setup . "${MESON_BUILD_DIR}"
- xvfb-run -s -noreset meson dist --include-subprojects -C "${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: only:
- tags - tags