ci: fetch GITHUB_API_TOKEN from Jenkins credential store

Fetch the named credential "github-api-token" from the Jenkins
configuration. This is a "personal access token" that has been created
with the ceph-csi-bot user account.

CC: @ceph-csi-bot
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-10-13 11:57:04 +02:00 committed by mergify[bot]
parent b27b2ee074
commit e0d49908f8
3 changed files with 12 additions and 0 deletions

View File

@ -28,6 +28,10 @@ node('cico-workspace') {
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)

View File

@ -25,6 +25,10 @@ node('cico-workspace') {
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)

View File

@ -25,6 +25,10 @@ node('cico-workspace') {
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)