diff --git a/configuration/kubernetes/deployment.yaml b/configuration/kubernetes/deployment.yaml index d55dacf..e6c6a12 100644 --- a/configuration/kubernetes/deployment.yaml +++ b/configuration/kubernetes/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: RESOURCE_NAME namespace: production spec: - replicas: 0 + replicas: 1 selector: matchLabels: app: RESOURCE_NAME diff --git a/configuration/pipelines/build.groovy b/configuration/pipelines/build.groovy index 812dc87..09e83d9 100644 --- a/configuration/pipelines/build.groovy +++ b/configuration/pipelines/build.groovy @@ -92,16 +92,8 @@ try { } stage('Deploy') { - - sh "kubectl apply -f configuration/kubernetes/deployment.yaml" - sh "kubectl apply -f configuration/kubernetes/service.yaml" - - sh "kubectl get pods" - - sh "kubectl rollout status deployment/${APPLICATION_NAME}" - -// executeShellScript("configuration/scripts/deployToKubernetes.sh", -// env.APPLICATION_NAME) + executeShellScript("configuration/scripts/deployToKubernetes.sh", + env.APPLICATION_NAME) } } } diff --git a/configuration/scripts/deployToKubernetes.sh b/configuration/scripts/deployToKubernetes.sh index e49527e..ae18ff2 100755 --- a/configuration/scripts/deployToKubernetes.sh +++ b/configuration/scripts/deployToKubernetes.sh @@ -7,4 +7,4 @@ kubectl apply -f configuration/kubernetes/service.yaml kubectl get pods -kubectl rollout status deployment/${APPLICATION_NAME} \ No newline at end of file +kubectl rollout status deployment/${APPLICATION_NAME} --namespace=production \ No newline at end of file