ci: skip mini-e2e-helm 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:45 +02:00 committed by mergify[bot]
parent 8806d8e69b
commit 199f5e7551

View File

@ -5,6 +5,7 @@ def ci_git_branch = 'ci/centos'
def git_repo = 'https://github.com/ceph/ceph-csi'
def ref = "master"
def git_since = "master"
def skip_e2e = 0
def doc_change = 0
def namespace = 'cephcsi-e2e-' + UUID.randomUUID().toString().split('-')[-1]
@ -21,6 +22,21 @@ node('cico-workspace') {
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') {
if (params.ghprbPullId != null) {
ref = "pull/${ghprbPullId}/head"