Skip to content

Commit

Permalink
fix integration-cleanup.sh to match prefix only (#3885)
Browse files Browse the repository at this point in the history
The `-f` filter is a regex and should match the prefix `test-`, thus,
the regex should be `^test-`. Without `^`, the search string is looked
up in the entire release name.
  • Loading branch information
stefanwire authored Feb 13, 2024
1 parent 69cabcb commit 36f3ed5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.d/5-internal/integration-cleanup-sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix integration-cleanup.sh, now only cleans up releases with `test-` prefixes in
their names.
2 changes: 1 addition & 1 deletion hack/bin/integration-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -euo pipefail

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

releases=$(helm list -A -f 'test-' -o json |
releases=$(helm list -A -f '^test-' -o json |
jq -r -f "$DIR/filter-old-releases.jq")

if [ -n "$releases" ]; then
Expand Down

0 comments on commit 36f3ed5

Please sign in to comment.