|
@@ -34,9 +34,9 @@ pipeline {
|
|
|
echo "Creando las PVC..."
|
|
echo "Creando las PVC..."
|
|
|
container('kubectl') {
|
|
container('kubectl') {
|
|
|
withCredentials([file(credentialsId: env.Destino, variable: 'KUBECONFIG')]) {
|
|
withCredentials([file(credentialsId: env.Destino, variable: 'KUBECONFIG')]) {
|
|
|
- sh 'kubectl create -f K8S/pvc-${NOMBRE_APP}.yaml'
|
|
|
|
|
- sh 'kubectl create -f K8S/pvc-static.yaml'
|
|
|
|
|
- sh 'kubectl create -f K8S/pvc-postgresql.yaml'
|
|
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify create -f K8S/pvc-${NOMBRE_APP}.yaml'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify create -f K8S/pvc-static.yaml'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify create -f K8S/pvc-postgresql.yaml'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -51,9 +51,9 @@ pipeline {
|
|
|
container('kubectl') {
|
|
container('kubectl') {
|
|
|
withCredentials([file(credentialsId: env.Destino, variable: 'KUBECONFIG')]) {
|
|
withCredentials([file(credentialsId: env.Destino, variable: 'KUBECONFIG')]) {
|
|
|
sh 'sh K8S/patchPVC.sh||true'
|
|
sh 'sh K8S/patchPVC.sh||true'
|
|
|
- sh 'kubectl delete -f K8S/pvc-${NOMBRE_APP}.yaml||true'
|
|
|
|
|
- sh 'kubectl delete -f K8S/pvc-static.yaml||true'
|
|
|
|
|
- sh 'kubectl delete -f K8S/pvc-postgresql.yaml||true'
|
|
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/pvc-${NOMBRE_APP}.yaml||true'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/pvc-static.yaml||true'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/pvc-postgresql.yaml||true'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -67,15 +67,15 @@ pipeline {
|
|
|
echo "Borrando todo..."
|
|
echo "Borrando todo..."
|
|
|
container('kubectl') {
|
|
container('kubectl') {
|
|
|
withCredentials([file(credentialsId: env.Destino, variable: 'KUBECONFIG')]) {
|
|
withCredentials([file(credentialsId: env.Destino, variable: 'KUBECONFIG')]) {
|
|
|
- sh 'kubectl delete -f K8S/db-deployment.yaml||true'
|
|
|
|
|
- sh 'kubectl delete -f K8S/db-service.yaml||true'
|
|
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/db-deployment.yaml||true'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/db-service.yaml||true'
|
|
|
|
|
|
|
|
- sh 'kubectl delete -f K8S/${NOMBRE_APP}-deployment.yaml||true'
|
|
|
|
|
- sh 'kubectl delete -f K8S/${NOMBRE_APP}-ingress.yaml||true'
|
|
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/${NOMBRE_APP}-deployment.yaml||true'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/${NOMBRE_APP}-ingress.yaml||true'
|
|
|
|
|
|
|
|
- sh 'kubectl delete -f K8S/reg-secret.yaml||true'
|
|
|
|
|
- sh 'kubectl delete -f K8S/env-prod-configmap.yaml||true'
|
|
|
|
|
- sh 'kubectl delete -f K8S/env-prod-db-configmap.yaml||true'
|
|
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/reg-secret.yaml||true'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/env-prod-configmap.yaml||true'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/env-prod-db-configmap.yaml||true'
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -141,16 +141,16 @@ pipeline {
|
|
|
echo "Creando todo..."
|
|
echo "Creando todo..."
|
|
|
container('kubectl') {
|
|
container('kubectl') {
|
|
|
withCredentials([file(credentialsId: env.Destino, variable: 'KUBECONFIG')]) {
|
|
withCredentials([file(credentialsId: env.Destino, variable: 'KUBECONFIG')]) {
|
|
|
- sh 'kubectl create -f K8S/reg-secret.yaml'
|
|
|
|
|
- sh 'kubectl create -f K8S/env-prod-configmap.yaml'
|
|
|
|
|
- sh 'kubectl create -f K8S/env-prod-db-configmap.yaml'
|
|
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify create -f K8S/reg-secret.yaml'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify create -f K8S/env-prod-configmap.yaml'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify create -f K8S/env-prod-db-configmap.yaml'
|
|
|
|
|
|
|
|
- sh 'kubectl create -f K8S/db-deployment.yaml'
|
|
|
|
|
- sh 'kubectl create -f K8S/db-service.yaml'
|
|
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify create -f K8S/db-deployment.yaml'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify create -f K8S/db-service.yaml'
|
|
|
|
|
|
|
|
sh 'sed -i "s/<TAG>/${BUILD_NUMBER}/" K8S/${NOMBRE_APP}-deployment.yaml'
|
|
sh 'sed -i "s/<TAG>/${BUILD_NUMBER}/" K8S/${NOMBRE_APP}-deployment.yaml'
|
|
|
- sh 'kubectl apply -f K8S/${NOMBRE_APP}-deployment.yaml'
|
|
|
|
|
- sh 'kubectl create -f K8S/${NOMBRE_APP}-ingress.yaml'
|
|
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify apply -f K8S/${NOMBRE_APP}-deployment.yaml'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify create -f K8S/${NOMBRE_APP}-ingress.yaml'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -172,8 +172,8 @@ pipeline {
|
|
|
container('kubectl') {
|
|
container('kubectl') {
|
|
|
withCredentials([file(credentialsId: env.Destino, variable: 'KUBECONFIG')]) {
|
|
withCredentials([file(credentialsId: env.Destino, variable: 'KUBECONFIG')]) {
|
|
|
sh 'sed -i "s/<TAG>/${BUILD_NUMBER}/" K8S/${NOMBRE_APP}-deployment.yaml'
|
|
sh 'sed -i "s/<TAG>/${BUILD_NUMBER}/" K8S/${NOMBRE_APP}-deployment.yaml'
|
|
|
- sh 'kubectl delete -f K8S/${NOMBRE_APP}-deployment.yaml || true'
|
|
|
|
|
- sh 'kubectl apply -f K8S/${NOMBRE_APP}-deployment.yaml'
|
|
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify delete -f K8S/${NOMBRE_APP}-deployment.yaml || true'
|
|
|
|
|
+ sh 'kubectl --insecure-skip-tls-verify apply -f K8S/${NOMBRE_APP}-deployment.yaml'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|