diff --git a/configuration/pipelines/build.groovy b/configuration/pipelines/build.groovy index 4fbf2f0..a917f8e 100644 --- a/configuration/pipelines/build.groovy +++ b/configuration/pipelines/build.groovy @@ -72,6 +72,15 @@ try { sh "cat configuration/kubernetes/deployment.yaml" } + 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/${env.APPLICATION_NAME}" + } + stage('Tag Repository') { withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) { @@ -83,15 +92,6 @@ 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/${env.APPLICATION_NAME}" - } } } } catch ( exception ) { diff --git a/configuration/scripts/mapVarsToConfigs.sh b/configuration/scripts/mapVarsToConfigs.sh index 322def7..ad52c5d 100755 --- a/configuration/scripts/mapVarsToConfigs.sh +++ b/configuration/scripts/mapVarsToConfigs.sh @@ -5,8 +5,6 @@ APPLICATION_NAME=$2 APPLICATION_VERSION=$3 APPLICATION_LABEL=$4 -pwd - sed -i "s/REPOSITORY/${DOCKER_REPOSITORY}/g" configuration/kubernetes/deployment.yaml sed -i "s/IMAGE/${APPLICATION_NAME}:${APPLICATION_VERSION}/g" configuration/kubernetes/deployment.yaml sed -i "s/RESOURCE_NAME/${APPLICATION_NAME}/g" configuration/kubernetes/deployment.yaml