Commit 8dec75e8 authored by Sandro Mathys's avatar Sandro Mathys
Browse files

do a precleanup just to be sure

parent c0e7c9c1
......@@ -24,11 +24,21 @@ cache:
stages:
- prepare
# - setup
- precleanup
- deploy
- verify
- cleanup
- postcleanup
- upload
.cleanup:
script:
- helm uninstall "${HELM_RELEASE}"
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" delete secret shibboleth-sp-helm-chart-certs 2>&1 || true
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" delete secret shibboleth-sp-helm-chart-sealer-keys 2>&1 || true
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" delete job shibboleth-sp-helm-chart-create-sealer-keys 2>&1 || true
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" delete rolebinding shibboleth-sp-helm-chart-sealer-keys-nanny 2>&1 || true
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" delete serviceaccount shibboleth-sp-helm-chart-sealer-keys-nanny 2>&1 || true
prepare staging:
stage: prepare
environment:
......@@ -52,6 +62,17 @@ prepare staging:
after_script:
- rm -f ".vault_password"
precleanup staging:
stage: precleanup
environment:
name: staging
only:
- staging
needs:
- verify staging
extends:
.cleanup
deploy staging:
stage: deploy
environment:
......@@ -82,21 +103,16 @@ verify staging:
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" logs "${HELM_RELEASE}-helm-test-curl" -c "root"
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" logs "${HELM_RELEASE}-helm-test-curl" -c "session"
cleanup staging:
stage: cleanup
postcleanup staging:
stage: postcleanup
environment:
name: staging
only:
- staging
needs:
- verify staging
script:
- helm uninstall "${HELM_RELEASE}"
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" delete secret shibboleth-sp-helm-chart-certs 2>&1 || true
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" delete secret shibboleth-sp-helm-chart-sealer-keys 2>&1 || true
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" delete job shibboleth-sp-helm-chart-create-sealer-keys 2>&1 || true
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" delete rolebinding shibboleth-sp-helm-chart-sealer-keys-nanny 2>&1 || true
- kubectl --namespace "${NAMESPACE}" --server "${KUBE_APISERVER}" --token="${KUBE_TOKEN}" delete serviceaccount shibboleth-sp-helm-chart-sealer-keys-nanny 2>&1 || true
extends:
.cleanup
# TODO: only run this in production
upload staging:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment