Skip to content

Commit

Permalink
ci: better regex pattern to detect ci namespaces older than 1 hour (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
vvagaytsev authored Jan 23, 2025
1 parent cbb10d2 commit bcd9700
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .circleci/continue-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,11 @@ commands:
when: always
- run:
name: Delete namespaces older than 1 hour
# hack: find namespaces that contain '-ci' and their age ends with h or d, e.g. 1d5h or 24h
command: kubectl get ns | grep -E '(d|h)$' | grep -- '-testing' | awk '{print $1}' | xargs -n 1 kubectl delete namespace --wait=false || true
# hack: find namespaces that contain '-testing' and their age ends with:
# 1) h or d, e.g. 1d5h or 24h
# 2) m and has some h, e.g. 3h30m
# 3) m and is longer than 100 mins
command: kubectl get ns | grep -E -e '(d|h)$' -e '(\d+h\d+m)$' -e '(\d{3}m)$' | grep -- '-testing' | awk '{print $1}' | xargs -n 1 kubectl delete namespace --wait=false || true
when: always

install_rust:
Expand Down

0 comments on commit bcd9700

Please sign in to comment.