[tracker/wip/carlosg/ci-pipelines: 3/7] ci: Run check-commits job in normal pipelines too
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/ci-pipelines: 3/7] ci: Run check-commits job in normal pipelines too
- Date: Mon, 7 Mar 2022 11:28:22 +0000 (UTC)
commit 7392468c935c56321c6df7c6ac4d4ce6e8fc94fd
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Feb 19 10:50:15 2022 +0100
ci: Run check-commits job in normal pipelines too
Make it non-failable there though, so contributors can check the
errors before filing a merge request, but still being able to run
the rest of the pipeline.
.gitlab-ci.yml | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8138a8279..2b6f55c48 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -50,12 +50,16 @@ check-commit-log:
GIT_DEPTH: "100"
stage: review
script:
- - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
+ - ci-fairy check-commits --junit-xml=check-junit-report.xml && exit 0;
+ if [[ -z "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]] ;
then
- ci-fairy check-commits --junit-xml=check-junit-report.xml ;
- else
- echo "Not a merge request" ;
- fi
+ echo "'ci-fairy check-commits' found errors. Please fix those before filing a merge request, this
will be handled as a pipeline failure there." ;
+ exit 255 ;
+ fi ;
+ exit 1
+ allow_failure:
+ exit_codes:
+ - 255
<<: *check
check-merge-request:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]