From cbc2daf93815a43ccdfa8ad7733ed7f2c28524ef Mon Sep 17 00:00:00 2001 From: andyjk15 Date: Tue, 18 Feb 2020 16:51:50 +0000 Subject: [PATCH] [18.02.20] Kubernetes check connections on slave node --- configuration/pipelines/build.groovy | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/configuration/pipelines/build.groovy b/configuration/pipelines/build.groovy index c1dd1a6..2bd29f5 100644 --- a/configuration/pipelines/build.groovy +++ b/configuration/pipelines/build.groovy @@ -54,19 +54,17 @@ try { mvn '--version' -// sh "doctl --version" - -// withCredentials( -// [usernamePassword( -// credentialsId: 'doctl', -// passwordVariable: 'DOCTL_TOKEN', -// usernameVariable: 'DOCTL_USERNAME' -// )] -// ) { -// sh "doctl auth init --access-token ${DOCTL_TOKEN}" -// sh "snap connect doctl:kube-config" -// sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster" -// } + withCredentials( + [usernamePassword( + credentialsId: 'doctl', + passwordVariable: 'DOCTL_TOKEN', + usernameVariable: 'DOCTL_USERNAME' + )] + ) { + sh "doctl auth init --access-token '${DOCTL_TOKEN}'" + sh "snap connect doctl:kube-config" + sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster" + } sh "kubectl get serviceaccounts/cicd -o yaml" }