[19.02.20] Script extraction for kube deployment and script permissions

This commit is contained in:
andyjk15 2020-02-19 18:45:20 +00:00
parent 2cee2d52c7
commit 686cfcaddf
2 changed files with 10 additions and 6 deletions

View File

@ -94,12 +94,8 @@ try {
} }
stage('Deploy') { stage('Deploy') {
sh "kubectl apply -f configuration/kubernetes/deployment.yaml" executeShellScript("configuration/scripts/deployToKubernetes.sh",
sh "kubectl apply -f configuration/kubernetes/service.yaml" env.APPLICATION_NAME)
sh "kubectl get pods"
sh "kubectl rollout status deployment/${env.APPLICATION_NAME}"
} }
} }
} }

8
configuration/scripts/deployToKubernetes.sh Normal file → Executable file
View File

@ -1,2 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
APPLICATION_NAME=$1
kubectl apply -f configuration/kubernetes/deployment.yaml
kubectl apply -f configuration/kubernetes/service.yaml
kubectl get pods
kubectl rollout status deployment/${APPLICATION_NAME}