Skip to content
Snippets Groups Projects
Commit ca5e57f9 authored by Martin's avatar Martin
Browse files

adjust jenkinsfile deletion handling

parent bc604e9e
No related branches found
No related tags found
No related merge requests found
......@@ -643,11 +643,13 @@ Boolean hasNamespaceFile(String bezeichner) {
Void waitForDeletion(String bezeichner) {
try {
sh "kubectl wait --for=delete applications/by-${bezeichner}-dev-application -n argocd --timeout=900s"
sh "oc patch applications.argoproj.io by-${bezeichner}-dev-application -n argocd --type=json -p '[{"op": "remove", "path": "/metadata/finalizers"}]'"
sh "kubectl wait --for=delete applications/by-${bezeichner}-dev-application -n argocd --timeout=900s"
} catch (Exception e) {
error("Application by-${bezeichner}-dev-application konnte nicht gelöscht werden")
try {
sh "kubectl patch applications.argoproj.io by-${bezeichner}-dev-application -n argocd --type=json -p '[{"op": "remove", "path": "/metadata/finalizers"}]'"
sh "kubectl wait --for=delete applications/by-${bezeichner}-dev-application -n argocd --timeout=900s"
} catch (Exception e2) {
error("Application by-${bezeichner}-dev-application konnte nicht gelöscht werden")
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment