ci: skip mini-e2e jobs if PR has the 'ci/skip/e2e' label

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-08-24 09:33:35 +02:00 committed by mergify[bot]
parent d172010e52
commit 8806d8e69b

View File

@ -5,6 +5,7 @@ def ci_git_branch = 'ci/centos'
def git_repo = 'https://github.com/ceph/ceph-csi' def git_repo = 'https://github.com/ceph/ceph-csi'
def ref = "master" def ref = "master"
def git_since = 'master' def git_since = 'master'
def skip_e2e = 0
def doc_change = 0 def doc_change = 0
def ssh(cmd) { def ssh(cmd) {
@ -18,6 +19,21 @@ node('cico-workspace') {
changelog: false changelog: false
} }
stage('skip ci/skip/e2e label') {
if (params.ghprbPullId == null) {
skip_e2e = 1
return
}
skip_e2e = sh(
script: "./scripts/get_github_labels.py --id=${ghprbPullId} --has-label=ci/skip/e2e",
returnStatus: true)
}
// if skip_e2e returned 0, do not run full tests
if (skip_e2e == 0) {
currentBuild.result = 'SUCCESS'
return
}
stage('checkout PR') { stage('checkout PR') {
if (params.ghprbPullId != null) { if (params.ghprbPullId != null) {
ref = "pull/${ghprbPullId}/head" ref = "pull/${ghprbPullId}/head"