1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Bring kubeConfigRoot in scope

This commit is contained in:
Ewout Prangsma 2018-03-08 13:19:27 +01:00
parent 52731f5735
commit 8942d2e2c8
No known key found for this signature in database
GPG key ID: 4DBAD380D93D0698

View file

@ -19,9 +19,9 @@ def notifySlack(String buildStatus = 'STARTED') {
slackSend(color: color, channel: '#status-k8s', message: msg)
}
def kubeConfigRoot = "/home/jenkins/.kube/"
def kubeConfigRoot = "/home/jenkins/.kube"
def buildTestSteps(String kubeconfig) {
def buildTestSteps(String kubeConfigRoot, String kubeconfig) {
return {
timestamps {
lock("${kubeconfig}-${params.TESTNAMESPACE}-${env.GIT_COMMIT}") {
@ -42,7 +42,7 @@ def buildTestSteps(String kubeconfig) {
}
}
def buildCleanupSteps(String kubeconfig) {
def buildCleanupSteps(String kubeConfigRoot, String kubeconfig) {
return {
timestamps {
withEnv([
@ -85,7 +85,7 @@ pipeline {
def configs = "${params.KUBECONFIGS}".split(",")
def testTasks = [:]
for (kubeconfig in configs) {
testTasks["${kubeconfig}"] = buildTestSteps(kubeconfig)
testTasks["${kubeconfig}"] = buildTestSteps(kubeConfigRoot, kubeconfig)
}
parallel testTasks
}
@ -99,7 +99,7 @@ pipeline {
def configs = "${params.KUBECONFIGS}".split(",")
def cleanupTasks = [:]
for (kubeconfig in configs) {
cleanupTasks["${kubeconfig}"] = buildCleanupSteps(kubeconfig)
cleanupTasks["${kubeconfig}"] = buildCleanupSteps(kubeConfigRoot, kubeconfig)
}
parallel cleanupTasks
}