ci: Wait for review stage before continuing

If review fails, it'll fail very early in the pipeline, but we won't see
the test case failure until the whole pipeline succeeds, which might be
10 minutes later.

To avoid sitting there wondering why it failed, let the time consuming
jobs wait until the review stage, which tends to take less than 20
seconds, succeeds. This way the review test result will be presented
earlier.

This changes the pipeline to run the check-commit-log job also for
non-merge requests, with the difference being that it will pass
immediately if it's not a merge request.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
This commit is contained in:
Jonas Ådahl
2020-11-04 20:48:54 +01:00
parent 0c9f7c7735
commit 815ed52ca1
2 changed files with 5 additions and 25 deletions

View File

@@ -1,8 +1,8 @@
#!/usr/bin/env bash
if [ -z "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
echo Cannot review non-merge request
exit 1
echo This is not a merge request, skipping
exit 0
fi
git fetch $CI_MERGE_REQUEST_PROJECT_URL.git $CI_MERGE_REQUEST_TARGET_BRANCH_NAME