From 693eea4ddb11c0db961d4f2e2ca4b06e3d2ca301 Mon Sep 17 00:00:00 2001 From: andyjk15 Date: Mon, 17 Feb 2020 16:26:31 +0000 Subject: [PATCH] [17.02.20] Kubernetes deployment settings --- configuration/pipelines/build.groovy | 42 +++++++++++++++------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/configuration/pipelines/build.groovy b/configuration/pipelines/build.groovy index 6226e42..00aef9e 100644 --- a/configuration/pipelines/build.groovy +++ b/configuration/pipelines/build.groovy @@ -83,27 +83,29 @@ try { stage('Deploy') { - withCredentials( - [kubeconfigContent( - credentialsId: 'Kubernetes', - variable: 'CONFIG' - )] - ) { - echo ${CONFIG} + withCredentials([kubeconfigFile(credentialsId: 'Kubernetes', variable: 'KUBECONFIG')]) { + sh '''cat $KUBECONFIG''' } -// kubernetesDeploy(kubeconfigId: 'Kubernetes', // REQUIRED -// -// configs: '', // REQUIRED -// enableConfigSubstitution: false, -// -// secretNamespace: "${env.NAMESPACE}", -// secretName: '', -// dockerCredentials: [ -// [credentialsId: ''], -// [credentialsId: '', url: ''], -// ] -// ) - deploy() + +// withCredentials( +// [kubeconfigContent( +// credentialsId: 'Kubernetes', +// variable: 'CONFIG' +// )] +// ) { +// echo ${CONFIG} +// } + kubernetesDeploy(kubeconfigId: 'Kubernetes', // REQUIRED + + configs: '/configuration/kubernetes/service.yaml', '/configuration/kubernetes/deployment.yaml', // REQUIRED + enableConfigSubstitution: false, + + secretNamespace: "${env.NAMESPACE}", + dockerCredentials: [ + [credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY}"], + ] + ) +// deploy() } stage('Tag Repository') {