From 229163202dfc5e51b65c7c8e02b9df1880e1fb93 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 12 Apr 2023 22:29:47 +0200 Subject: release.sh: adjust check for gitlab-ci for changes in pipeline - We need to fetch more entries per page. 100 is the maximum without pagination, but that is enough for us. - Previously, we checked all stages. Now, let's skip the "prep" and "tier3" stages. This change should work both with old and new pipelines. --- contrib/fedora/rpm/release.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/fedora/rpm/release.sh b/contrib/fedora/rpm/release.sh index f4ee4cb65d..09e0417ceb 100755 --- a/contrib/fedora/rpm/release.sh +++ b/contrib/fedora/rpm/release.sh @@ -131,7 +131,7 @@ check_gitlab_pipeline() { return 1 fi - PIPELINE_STATUSES="$(curl --no-progress-meter "https://gitlab.freedesktop.org/api/v4/projects/411/pipelines/$PIPELINE_ID/jobs" 2>/dev/null | jq '.[].status')" + PIPELINE_STATUSES="$(curl --no-progress-meter "https://gitlab.freedesktop.org/api/v4/projects/411/pipelines/$PIPELINE_ID/jobs?per_page=100" 2>/dev/null | jq '.[] | select(.stage!="prep" and .stage!="tier3") | .status')" if ! echo "$PIPELINE_STATUSES" | grep -q '^"success"$' ; then echo "Cannot find successful jobs for branch $BRANCH. Check \"https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/pipelines/$PIPELINE_ID\"" @@ -414,6 +414,7 @@ fi if [ $CHECK_GITLAB = 1 ]; then if ! check_gitlab_pipeline "$CUR_BRANCH" "$CUR_HEAD" ; then echo "Check the pipelines for branch \"$CUR_BRANCH\" at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/pipelines?ref=$CUR_BRANCH" + echo "Wait for pipeline with \`ci-fairy wait-for-pipeline --project NetworkManager/NetworkManager --sha \"$CUR_HEAD\"\`" die "It seems not all gitlab-ci jobs were running/succeeding. Skip this check with --no-check-gitlab" fi fi -- cgit v1.2.1