mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-12 17:30:19 +00:00
ci: get the GitHub API Token before starting a node
It still seems that the environment is not set when the GitHub API is called. Maybe things work better when the environment is set before starting the cico-workspace node. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
debb54a1dd
commit
a6ca8e31dc
@ -16,12 +16,12 @@ def ssh(cmd) {
|
|||||||
sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} \"${cmd}\""
|
sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} \"${cmd}\""
|
||||||
}
|
}
|
||||||
|
|
||||||
node('cico-workspace') {
|
environment {
|
||||||
environment {
|
// "github-api-token" is a secret text credential configured in Jenkins
|
||||||
// "github-api-token" is a secret text credential configured in Jenkins
|
GITHUB_API_TOKEN = credentials("github-api-token")
|
||||||
GITHUB_API_TOKEN = credentials("github-api-token")
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
node('cico-workspace') {
|
||||||
stage('checkout ci repository') {
|
stage('checkout ci repository') {
|
||||||
git url: "${ci_git_repo}",
|
git url: "${ci_git_repo}",
|
||||||
branch: "${ci_git_branch}",
|
branch: "${ci_git_branch}",
|
||||||
|
@ -13,12 +13,12 @@ def ssh(cmd) {
|
|||||||
sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} '${cmd}'"
|
sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} '${cmd}'"
|
||||||
}
|
}
|
||||||
|
|
||||||
node('cico-workspace') {
|
environment {
|
||||||
environment {
|
// "github-api-token" is a secret text credential configured in Jenkins
|
||||||
// "github-api-token" is a secret text credential configured in Jenkins
|
GITHUB_API_TOKEN = credentials("github-api-token")
|
||||||
GITHUB_API_TOKEN = credentials("github-api-token")
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
node('cico-workspace') {
|
||||||
stage('checkout ci repository') {
|
stage('checkout ci repository') {
|
||||||
git url: "${ci_git_repo}",
|
git url: "${ci_git_repo}",
|
||||||
branch: "${ci_git_branch}",
|
branch: "${ci_git_branch}",
|
||||||
|
Loading…
Reference in New Issue
Block a user