fix(ops): ignore -linux-* suffixes when fetching distroless image tags - #2011
fix(ops): ignore -linux-* suffixes when fetching distroless image tags#2011bwplotka wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the gmpctl release automation tool, simplifying dependency management by installing tools locally to .bin/, removing the NVD API key requirement and severity-based sorting for vulnerability checks, and adding a -skip-tag-signing flag. Feedback on these changes includes addressing a performance bottleneck by avoiding redundant go install executions, correcting non-standard hyphen escaping in grep filters, and fixing inconsistent indentation and global EXIT trap usage in lib.sh.
…ap cleanup Signed-off-by: bwplotka <bwplotka@google.com>
avilevy18
left a comment
There was a problem hiding this comment.
LGTM!
AI mentioned a minor nit regarding the .bingo/variables.env trap cleanup in release-lib::manifests_regen():
Using a RETURN trap (trap '...' RETURN) in Bash functions automatically executes cleanup whenever the function finishes or returns (on both success or failure). This avoids needing trap - EXIT or touching process-wide EXIT traps:
if [[ -f "${dir}/.bingo/variables.env" ]]; then
cp "${dir}/.bingo/variables.env" "${dir}/.bingo/variables.env.bak"
trap 'mv "${dir}/.bingo/variables.env.bak" "${dir}/.bingo/variables.env" 2>/dev/null || true' RETURN
echo "#!/bin/bash" >"${dir}/.bingo/variables.env" # Clean the file.
fiNon-blocking, feel free to keep as-is or adjust.
Ignore
-linux-*architecture-specific tag suffixes when searching for latest distroless tags in gmpctl.