diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2020-11-04 20:48:54 +0100 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2020-11-16 14:13:07 +0100 |
commit | 815ed52ca1413b33e6e694502ca45d3aae7c6d7c (patch) | |
tree | a055e9d009535798ed2bfff9233fbc1153bdff25 | |
parent | 0c9f7c77350acad907882b3dd4e2ea5a7d1f3293 (diff) | |
download | mutter-815ed52ca1413b33e6e694502ca45d3aae7c6d7c.tar.gz |
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>
-rw-r--r-- | .gitlab-ci.yml | 26 | ||||
-rwxr-xr-x | .gitlab-ci/check-commit-log.sh | 4 |
2 files changed, 5 insertions, 25 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 98eb667d3..61d2af660 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,12 +18,10 @@ check-commit-log: - commit-message-junit-report.xml reports: junit: commit-message-junit-report.xml - only: - - merge_requests build-mutter: stage: build - needs: [] + needs: ["check-commit-log"] script: - meson . build -Dbuildtype=debugoptimized -Db_coverage=true -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr - ninja -C build @@ -32,13 +30,10 @@ build-mutter: expire_in: 1 day paths: - build - only: - - merge_requests - - /^.*$/ build-without-opengl-and-glx: stage: build - needs: [] + needs: ["check-commit-log"] script: - meson . build -Dbuildtype=debugoptimized -Dopengl=false -Dglx=false -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr - ninja -C build @@ -46,13 +41,10 @@ build-without-opengl-and-glx: artifacts: paths: - build/meson-logs - only: - - merge_requests - - /^.*$/ build-without-native-backend-and-wayland: stage: build - needs: [] + needs: ["check-commit-log"] script: - meson . build -Dbuildtype=debugoptimized -Dnative_backend=false -Dudev=false -Dwayland=false -Dcore_tests=false --werror --prefix /usr - ninja -C build @@ -60,9 +52,6 @@ build-without-native-backend-and-wayland: artifacts: paths: - build/meson-logs - only: - - merge_requests - - /^.*$/ test-mutter: stage: test @@ -77,9 +66,6 @@ test-mutter: NO_AT_BRIDGE: "1" script: - bash -x ./.gitlab-ci/run-tests.sh - only: - - merge_requests - - /^.*$/ artifacts: expire_in: 1 day reports: @@ -102,9 +88,6 @@ test-mutter-coverage: - build/meson-logs/coveragereport coverage: '/^TOTAL.*\s+(\d+\%)$/' when: always - only: - - merge_requests - - /^.*$/ can-build-gnome-shell: stage: test @@ -117,6 +100,3 @@ can-build-gnome-shell: - .gitlab-ci/checkout-gnome-shell.sh - meson gnome-shell gnome-shell/build --prefix /usr -Dman=false - ninja -C gnome-shell/build install - only: - - merge_requests - - /^.*$/ diff --git a/.gitlab-ci/check-commit-log.sh b/.gitlab-ci/check-commit-log.sh index c309ff225..b6ca39767 100755 --- a/.gitlab-ci/check-commit-log.sh +++ b/.gitlab-ci/check-commit-log.sh @@ -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 |