Skip to content
Snippets Groups Projects
Commit 9adbee77edb9 authored by Alexander Trost's avatar Alexander Trost
Browse files

Use apply instead of replace

parent deea67e79737
No related branches found
No related tags found
No related merge requests found
...@@ -67,5 +67,5 @@ ...@@ -67,5 +67,5 @@
- sed -i "s/__VERSION__/${CI_COMMIT_REF_NAME}/" deployment.yaml ingress.yaml service.yaml - sed -i "s/__VERSION__/${CI_COMMIT_REF_NAME}/" deployment.yaml ingress.yaml service.yaml
- kubectl cluster-info - kubectl cluster-info
- kubectl get deployments -l app=${CI_ENVIRONMENT_SLUG} - kubectl get deployments -l app=${CI_ENVIRONMENT_SLUG}
- kubectl create -f deployment.yaml || (kubectl delete -f deployment.yaml && kubectl create -f deployment.yaml) - kubectl create -f deployment.yaml || (kubectl delete -f deployment.yaml && kubectl apply -f deployment.yaml)
- kubectl create -f service.yaml || true - kubectl create -f service.yaml || true
...@@ -71,5 +71,5 @@ ...@@ -71,5 +71,5 @@
- kubectl create -f service.yaml || true - kubectl create -f service.yaml || true
- kubectl create -f ingress.yaml || kubectl replace -f ingress.yaml - kubectl apply -f ingress.yaml
deploy_live: deploy_live:
image: registry.gitlab.com/gitlab-examples/kubernetes-deploy image: registry.gitlab.com/gitlab-examples/kubernetes-deploy
...@@ -90,5 +90,5 @@ ...@@ -90,5 +90,5 @@
- sed -i "s/__VERSION__/${CI_COMMIT_REF_NAME}/" deployment.yaml ingress.yaml service.yaml - sed -i "s/__VERSION__/${CI_COMMIT_REF_NAME}/" deployment.yaml ingress.yaml service.yaml
- kubectl cluster-info - kubectl cluster-info
- kubectl get deployments -l app=${CI_ENVIRONMENT_SLUG} - kubectl get deployments -l app=${CI_ENVIRONMENT_SLUG}
- kubectl create -f deployment.yaml || kubectl replace -f deployment.yaml - kubectl apply -f deployment.yaml
- kubectl create -f service.yaml || true - kubectl create -f service.yaml || true
...@@ -94,2 +94,2 @@ ...@@ -94,2 +94,2 @@
- kubectl create -f service.yaml || true - kubectl create -f service.yaml || true
- kubectl create -f ingress.yaml || kubectl replace -f ingress.yaml - kubectl apply -f ingress.yaml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment