diff --git a/mini-e2e-helm.groovy b/mini-e2e-helm.groovy index ca3914eaf..f5ea50a75 100644 --- a/mini-e2e-helm.groovy +++ b/mini-e2e-helm.groovy @@ -24,14 +24,16 @@ node('cico-workspace') { } stage('skip ci/skip/e2e label') { + environment { + // "github-api-token" is a secret text credential configured in Jenkins + GITHUB_API_TOKEN = credentials("github-api-token") + } + if (params.ghprbPullId == null) { skip_e2e = 1 return } - // "github-api-token" is a secret text credential configured in Jenkins - env.GITHUB_API_TOKEN = credentials("github-api-token") - skip_e2e = sh( script: "./scripts/get_github_labels.py --id=${ghprbPullId} --has-label=ci/skip/e2e", returnStatus: true) diff --git a/mini-e2e.groovy b/mini-e2e.groovy index d4fc56a6a..ee7816436 100644 --- a/mini-e2e.groovy +++ b/mini-e2e.groovy @@ -21,14 +21,16 @@ node('cico-workspace') { } stage('skip ci/skip/e2e label') { + environment { + // "github-api-token" is a secret text credential configured in Jenkins + GITHUB_API_TOKEN = credentials("github-api-token") + } + if (params.ghprbPullId == null) { skip_e2e = 1 return } - // "github-api-token" is a secret text credential configured in Jenkins - env.GITHUB_API_TOKEN = credentials("github-api-token") - skip_e2e = sh( script: "./scripts/get_github_labels.py --id=${ghprbPullId} --has-label=ci/skip/e2e", returnStatus: true) diff --git a/upgrade-tests.groovy b/upgrade-tests.groovy index ad814cad1..37a8072af 100644 --- a/upgrade-tests.groovy +++ b/upgrade-tests.groovy @@ -21,14 +21,16 @@ node('cico-workspace') { } stage('skip ci/skip/e2e label') { + environment { + // "github-api-token" is a secret text credential configured in Jenkins + GITHUB_API_TOKEN = credentials("github-api-token") + } + if (params.ghprbPullId == null) { skip_e2e = 1 return } - // "github-api-token" is a secret text credential configured in Jenkins - env.GITHUB_API_TOKEN = credentials("github-api-token") - skip_e2e = sh( script: "./scripts/get_github_labels.py --id=${ghprbPullId} --has-label=ci/skip/e2e", returnStatus: true)