Initial commit.

This commit is contained in:
2023-01-09 11:25:07 +02:00
parent 5d06e769fb
commit 4ddb9ceb60
4 changed files with 36 additions and 26 deletions

View File

@@ -24,10 +24,13 @@ spec:
stage('Kubernetes Deploy') {
steps {
container("deploy") {
withCredentials([string(credentialsId: "{{deploySecret}}", variable: "postgresPassword")]) {
sh 'curl -LO "https://storage.googleapis.com/kubernetes-release/release/v1.24.3/bin/linux/arm64/kubectl"'
sh 'chmod u+x ./kubectl'
sh 'sed -ie "s/{{replaceMe}}/`date +%s`/g" `pwd`/cicd/'+env.BRANCH_NAME+'/deployment.yaml'
sh './kubectl replace -f `pwd`/cicd/'+env.BRANCH_NAME+'/deployment.yaml'
sh 'sed -ie "s/{{postgresPassword}}/${postgresPassword}/g" `pwd`/cicd/'+env.BRANCH_NAME+'/deployment.yaml'
sh './kubectl apply -f `pwd`/cicd/'+env.BRANCH_NAME+'/deployment.yaml'
}
}
}
}