diff --git a/configuration/pipelines/build.groovy b/configuration/pipelines/build.groovy index e8ceac8..5b9eaf2 100644 --- a/configuration/pipelines/build.groovy +++ b/configuration/pipelines/build.groovy @@ -46,10 +46,10 @@ def deploy( Integer replicas ) { } try { - timestamps { +// timestamps { node ("${env.SLAVE_LABEL}") { stage('Initialise') { - checkout([$class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'Github', url: 'https://github.com/andyjk15/db-gateway.git']]]) + checkout([$class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'Github', url: 'https://github.com/andyjk15/db-gateway.git']]]) env.APPLICATION_VERSION = get_application_version() @@ -64,7 +64,6 @@ try { ) { sh "doctl auth init --access-token '${DOCTL_TOKEN}'" sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster-production" - sh "kubectl get pods" } } @@ -116,17 +115,20 @@ try { } stage('Deploy') { - kubernetesDeploy configs: '**/configuration/kubernetes/*.yaml', - deleteResource: true, - dockerCredentials: [[credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]], - kubeConfig: [path: ''], - kubeconfigId: 'Kubernetes', -// secretName: '', - ssh: [sshCredentialsId: '*', sshServer: ''], - textCredentials: [certificateAuthorityData: '', clientCertificateData: '', clientKeyData: '', serverUrl: 'https://'] + sh "kubectl apply -f configuration/kubernetes/deployment.yaml" + sh "kubectl apply -f configuration/kubernetes/service.yaml" + + sh "kubectl get pods" +// kubernetesDeploy configs: '**/configuration/kubernetes/*.yaml', +// deleteResource: true, +// dockerCredentials: [[credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]], +// kubeConfig: [path: ''], +// kubeconfigId: 'Kubernetes', +//// secretName: '', +// ssh: [sshCredentialsId: '*', sshServer: ''], +// textCredentials: [certificateAuthorityData: '', clientCertificateData: '', clientKeyData: '', serverUrl: 'https://'] } } - } } catch ( exception ) { currentBuild.result = 'FAILURE' throw exception