Remove a pipelinerun if cleanup is about to start
This commit is contained in:
parent
0d33733693
commit
3a55008066
@ -29,6 +29,11 @@ else
|
||||
export SP_ENVIRONMENT=$(jq -r .[0].object.metadata.name $BINDING_CONTEXT_PATH)
|
||||
echo "removing the ${SP_ENVIRONMENT} owned by ${SP_CUSTOMER_ID}"
|
||||
|
||||
# -- Remove the pipelinerun, if not removed yet
|
||||
kubectl delete pipelinerun -n "${SP_TEKTON_RUNTIME_NS}" \
|
||||
-l softplayer.net/user-uuid="${SP_CUSTOMER_ID}" \
|
||||
-l softplayer.net/env_name="${SP_ENVIRONMENT}" || true
|
||||
|
||||
envsubst < /tpls/${SP_PROVIDER}-cleanup.yaml | kubectl create -f -
|
||||
|
||||
# -- Removing the finalizer
|
||||
|
@ -3,6 +3,9 @@ kind: PipelineRun
|
||||
metadata:
|
||||
generateName: hetzner-k3s
|
||||
namespace: "${SP_TEKTON_RUNTIME_NS}"
|
||||
labels:
|
||||
softplayer.net/user-uuid: "${SP_CUSTOMER_ID}"
|
||||
softplayer.net/env_name: "${SP_ENVIRONMENT}"
|
||||
spec:
|
||||
params:
|
||||
- name: namespace
|
||||
|
Loading…
Reference in New Issue
Block a user