Remove a pipelinerun if cleanup is about to start
This commit is contained in:
@ -28,7 +28,12 @@ else
|
||||
export SP_CUSTOMER_ID=$(jq -r .[0].object.metadata.namespace $BINDING_CONTEXT_PATH)
|
||||
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
|
||||
|
Reference in New Issue
Block a user