ci: move skip-e2e-check after GitHub API usage

When the [ci/skip/e2e] label is set on PRs, the withCredentials()
statement is aborted, but the other stages still continue. This causes
the tests to run, which is not what we want when the label is added.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-10-20 08:20:19 +02:00 committed by mergify[bot]
parent ed671ec207
commit 126fcd4cb5
3 changed files with 18 additions and 15 deletions

View File

@ -35,11 +35,6 @@ node('cico-workspace') {
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("detect k8s-${k8s_version} patch release") {
k8s_release = sh(
@ -49,6 +44,12 @@ node('cico-workspace') {
}
}
// 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"

View File

@ -32,11 +32,6 @@ node('cico-workspace') {
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("detect k8s-${k8s_version} patch release") {
k8s_release = sh(
@ -46,6 +41,12 @@ node('cico-workspace') {
}
}
// 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"

View File

@ -32,11 +32,6 @@ node('cico-workspace') {
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("detect k8s-${k8s_version} patch release") {
k8s_release = sh(
@ -46,6 +41,12 @@ node('cico-workspace') {
}
}
// 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"