diff options
author | Thomas Haller <thaller@redhat.com> | 2023-04-12 22:29:47 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-04-13 13:18:27 +0200 |
commit | 229163202dfc5e51b65c7c8e02b9df1880e1fb93 (patch) | |
tree | 2e791a99475c5ce729db00ad09f2bfe5183c0cdd | |
parent | 5475f57d397122f885f71cedf5c9890f187fc324 (diff) | |
download | NetworkManager-229163202dfc5e51b65c7c8e02b9df1880e1fb93.tar.gz |
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.
-rwxr-xr-x | contrib/fedora/rpm/release.sh | 3 |
1 files changed, 2 insertions, 1 deletions
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 |