CI require a 'lgtm' or 'ok-to-test' labels to pass (#11251)
- Require a 'lgtm' or 'ok-to-test' label for running CI after the moderator stage Signed-off-by: ant31 <2t.antoine@gmail.com>pull/11281/head
parent
6cf11a9c72
commit
ef6d24a49e
|
@ -2,8 +2,8 @@
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- unit-tests
|
- unit-tests
|
||||||
- deploy-part1
|
|
||||||
- moderator
|
- moderator
|
||||||
|
- deploy-part1
|
||||||
- deploy-part2
|
- deploy-part2
|
||||||
- deploy-part3
|
- deploy-part3
|
||||||
- deploy-special
|
- deploy-special
|
||||||
|
@ -65,14 +65,30 @@ before_script:
|
||||||
|
|
||||||
# For failfast, at least 1 job must be defined in .gitlab-ci.yml
|
# For failfast, at least 1 job must be defined in .gitlab-ci.yml
|
||||||
# Premoderated with manual actions
|
# Premoderated with manual actions
|
||||||
ci-authorized:
|
ci-not-authorized:
|
||||||
extends: .job
|
|
||||||
stage: moderator
|
stage: moderator
|
||||||
|
before_script: []
|
||||||
|
after_script: []
|
||||||
|
rules:
|
||||||
|
# LGTM or ok-to-test labels
|
||||||
|
- if: $PR_LABELS =~ /.*,(lgtm|ok-to-test).*|^(lgtm|ok-to-test).*/i
|
||||||
|
variables:
|
||||||
|
CI_OK_TO_TEST: '0'
|
||||||
|
when: always
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "trigger"
|
||||||
|
variables:
|
||||||
|
CI_OK_TO_TEST: '0'
|
||||||
|
- if: $CI_COMMIT_BRANCH == "master"
|
||||||
|
variables:
|
||||||
|
CI_OK_TO_TEST: '0'
|
||||||
|
- when: always
|
||||||
|
variables:
|
||||||
|
CI_OK_TO_TEST: '1'
|
||||||
script:
|
script:
|
||||||
- /bin/sh scripts/premoderator.sh
|
- exit $CI_OK_TO_TEST
|
||||||
except: ['triggers', 'master']
|
tags:
|
||||||
# Disable ci moderator
|
- light
|
||||||
only: []
|
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- .gitlab-ci/build.yml
|
- .gitlab-ci/build.yml
|
||||||
|
|
Loading…
Reference in New Issue