[tracker/wip/carlosg/ci-playground: 1/2] ci: Add review stage
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/ci-playground: 1/2] ci: Add review stage
- Date: Sun, 16 May 2021 22:00:06 +0000 (UTC)
commit a8282bb8f81e8225b14d2866ce4ebd69bec6d95e
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun May 16 15:54:47 2021 +0200
ci: Add review stage
And add checks for commit logs, and ensuring that merge requests
have "Allow edits from maintainers" checkbox enabled. Courtesy of
ci-fairy.
.gitlab-ci.yml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 81b7e60d4..9be92a68a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,12 +14,55 @@ variables:
MESON_TEST_EXTRA_ARGS: ""
stages:
+ - review
- prepare
- build
- test
- analysis
- website
+.check-template: &check
+ extends:
+ - .fdo.ci-fairy
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ - if: '$CI_COMMIT_TAG'
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
+ - if: '$CI_COMMIT_BRANCH =~ /^tracker-[0-9-]+$/'
+ - when: 'manual'
+ artifacts:
+ expire_in: 1 week
+ paths:
+ - check-junit-report.xml
+ reports:
+ junit: check-junit-report.xml
+
+check-commit-log:
+ variables:
+ GIT_DEPTH: "100"
+ stage: review
+ script:
+ - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
+ then
+ ci-fairy check-commits --junit-xml=check-junit-report.xml ;
+ else
+ echo "Not a merge request" ;
+ fi
+ <<: *check
+
+check-merge-request:
+ variables:
+ GIT_STRATEGY: none
+ stage: review
+ script:
+ - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
+ then
+ ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-junit-report.xml ;
+ else
+ echo "Not a merge request" ;
+ fi
+ <<: *check
+
.tracker.fedora@common:
variables:
BASE_TAG: '2021-05-15.8'
@@ -87,6 +130,9 @@ build-fedora-container@x86_64:
stage: prepare
variables:
GIT_STRATEGY: none
+ needs:
+ - check-commit-log
+ - check-merge-request
build-fedora-rawhide-container@x86_64:
extends:
@@ -95,6 +141,9 @@ build-fedora-rawhide-container@x86_64:
stage: prepare
variables:
GIT_STRATEGY: none
+ needs:
+ - check-commit-log
+ - check-merge-request
build-fedora-container@aarch64:
extends:
@@ -103,6 +152,9 @@ build-fedora-container@aarch64:
stage: prepare
variables:
GIT_STRATEGY: none
+ needs:
+ - check-commit-log
+ - check-merge-request
build-ubuntu-container@x86_64:
extends:
@@ -111,6 +163,9 @@ build-ubuntu-container@x86_64:
stage: prepare
variables:
GIT_STRATEGY: none
+ needs:
+ - check-commit-log
+ - check-merge-request
build-alpine-container@x86_64:
extends:
@@ -119,6 +174,9 @@ build-alpine-container@x86_64:
stage: prepare
variables:
GIT_STRATEGY: none
+ needs:
+ - check-commit-log
+ - check-merge-request
.build-template: &build
stage: build
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]