From b5d30f297449f3c0bfeddd0dcad6577f67b48eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Mon, 23 Dec 2024 09:52:24 +0100 Subject: [PATCH] release.sh: check the right pipelines Now we are using scheduled pipelines for various purposes like regenerating the container images and triage the issues and MRs. That means that the last pipeline ran for main might not be the pipeline with the jobs building and testing the code. Use `source=push` to retrieve only pipelines that are not scheduled. (cherry picked from commit c5e51bd5d81dcebda3dcf095e1afc88b0546dbe3) (cherry picked from commit 2355aca95838af6ad75d7ca59b42dd79a7233b1d) (cherry picked from commit 5ce24447434b04d71b30398fe45c3510206aae63) --- contrib/fedora/rpm/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/fedora/rpm/release.sh b/contrib/fedora/rpm/release.sh index d59590904a..714f4a213c 100755 --- a/contrib/fedora/rpm/release.sh +++ b/contrib/fedora/rpm/release.sh @@ -131,7 +131,7 @@ check_gitlab_pipeline() { local SHA="$2" local PIPELINE_ID - PIPELINE_ID="$(curl --no-progress-meter "https://gitlab.freedesktop.org/api/v4/projects/411/pipelines?ref=$BRANCH&sha=$SHA&order_by=id" 2>/dev/null | jq '.[0].id')" + PIPELINE_ID="$(curl --no-progress-meter "https://gitlab.freedesktop.org/api/v4/projects/411/pipelines?ref=$BRANCH&sha=$SHA&source=push&order_by=id" 2>/dev/null | jq '.[0].id')" if ! [[ $PIPELINE_ID =~ [0-9]+ ]] ; then echo "Cannot find pipeline for branch $BRANCH. Check \"https://gitlab.freedesktop.org/NetworkManager/NetworkManager/pipelines?page=1&scope=branches&ref=$BRANCH\"" return 1