ci: set GITHUB_API_TOKEN in the environment for all stages

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-10-15 09:31:33 +02:00 committed by mergify[bot]
parent dd7ac1f18e
commit 89783afcf5
3 changed files with 15 additions and 15 deletions

View File

@ -17,6 +17,11 @@ def ssh(cmd) {
}
node('cico-workspace') {
environment {
// "github-api-token" is a secret text credential configured in Jenkins
GITHUB_API_TOKEN = credentials("github-api-token")
}
stage('checkout ci repository') {
git url: "${ci_git_repo}",
branch: "${ci_git_branch}",
@ -24,11 +29,6 @@ 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

View File

@ -14,6 +14,11 @@ def ssh(cmd) {
}
node('cico-workspace') {
environment {
// "github-api-token" is a secret text credential configured in Jenkins
GITHUB_API_TOKEN = credentials("github-api-token")
}
stage('checkout ci repository') {
git url: "${ci_git_repo}",
branch: "${ci_git_branch}",
@ -21,11 +26,6 @@ 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

View File

@ -14,6 +14,11 @@ def ssh(cmd) {
}
node('cico-workspace') {
environment {
// "github-api-token" is a secret text credential configured in Jenkins
GITHUB_API_TOKEN = credentials("github-api-token")
}
stage('checkout ci repository') {
git url: "${ci_git_repo}",
branch: "${ci_git_branch}",
@ -21,11 +26,6 @@ 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