Created
June 2, 2026 13:31
-
-
Save nickboldt/6dd4b94bf553b3bfaad57f94a9731750 to your computer and use it in GitHub Desktop.
kill running PLRs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| oc get pipelineruns \ | |
| -n rhdh-tenant -l 'appstudio.openshift.io/application=rhdh-plugin-catalog-1' -o json | \ | |
| jq -r '.items[] | select(.status.conditions[0].reason == "Running" or .status.conditions[0].reason == "PipelineRunPending") | select(.metadata.name | test("-on-pull-")) | .metadata.name' \ | |
| | xargs -r -n 25 -P 4 sh -c 'for pr; do tkn pipelinerun cancel "$pr" -n rhdh-tenant 2>/dev/null || \ | |
| oc delete pipelinerun "$pr" -n rhdh-tenant --wait=false 2>/dev/null; done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment