fix(ci): Add Gitlab-CI sledgehammer deployment removal

This commit is contained in:
Dominik Kaminski
2023-09-28 10:01:01 +02:00
parent d4c39025b6
commit 6fd655a0b1
2 changed files with 16 additions and 2 deletions

View File

@@ -183,8 +183,16 @@ env-cleanup:
$ENV_STOP_BEFORE != "no" $ENV_STOP_BEFORE != "no"
when: "always" when: "always"
script: script:
- "helmfile destroy --namespace ${NAMESPACE}" - |
- "kubectl delete pvc --all --namespace ${NAMESPACE}" if [ "${OPENDESK_SLEDGEHAMMER_DESTROY_ENABLED}" = "yes" ]; then
for OPENDESK_RELEASE in $(helm ls -n ${NAMESPACE} -aq); do
helm uninstall -n ${NAMESPACE} ${OPENDESK_RELEASE};
done
kubectl delete pvc --all --namespace ${NAMESPACE};
kubectl delete jobs --all --namespace ${NAMESPACE};
else
helmfile destroy --namespace ${NAMESPACE};
fi
stage: "env-cleanup" stage: "env-cleanup"
env-start: env-start:

View File

@@ -156,6 +156,12 @@ and wait a little. After the deployment is finished some bootstrapping is
executed which might take some more minutes before you can log in your new executed which might take some more minutes before you can log in your new
instance. instance.
Deployments can be removed with:
```shell
helmfile destroy -n <NAMESPACE>
```
## Offline deployment ## Offline deployment
Before executing a [local deployment](#local-deployment), you can set following Before executing a [local deployment](#local-deployment), you can set following