From c7195d490826038c19843733d9b5fc557baf875e Mon Sep 17 00:00:00 2001 From: andyjk15 Date: Tue, 18 Feb 2020 12:10:10 +0000 Subject: [PATCH] [18.02.20] Kubernetes check connections on slave node --- configuration/pipelines/build.groovy | 32 ++++------------------------ 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/configuration/pipelines/build.groovy b/configuration/pipelines/build.groovy index f6bacb0..a59d158 100644 --- a/configuration/pipelines/build.groovy +++ b/configuration/pipelines/build.groovy @@ -53,8 +53,9 @@ try { env.APPLICATION_VERSION = get_application_version() mvn '--version' - sh "java -version" - sh "python3 --version" + + sh "apt install -y kubectl" + sh "kubectl get serviceaccounts/cicd -o yaml" } stage('Build Artifact') { @@ -82,31 +83,6 @@ try { } stage('Deploy') { - -// withCredentials([kubeconfigFile(credentialsId: 'Kubernetes', variable: 'KUBECONFIG')]) { -// sh '''cat $KUBECONFIG''' -// } - -// 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_URL}"], -// ] -// ) -// deploy() - kubernetesDeploy configs: '**/configuration/kubernetes/*.yaml', deleteResource: true, dockerCredentials: [[credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]], @@ -119,7 +95,7 @@ try { stage('Tag Repository') { - withDockerServer([uri: "tcp://registry.cryptosky.me:4243"]) { + withDockerServer([uri: "${env.DOCKER_REPOSITORY_URL}"]) { withDockerRegistry([credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]) { def image = docker.build("${env.DOCKER_REPOSITORY}/db-gateway:${env.APPLICATION_VERSION}") image.push()