ci(lint): run amtool check-config in CI (checksum-pinned amtool) #131

Merged
jfraeys merged 1 commit from jfraeys/ci/amtool-in-lint into main 2026-10-13 17:41:13 -04:00
Owner

The Alertmanager config test (#128) validated routing everywhere but only ran amtool check-config where Docker exists; the ephemeral lint runners have none, so CI printed SKIP and never asked Alertmanager itself whether the rendered file is valid.

  • lint.yml installs amtool v0.34.1 from the prometheus/alertmanager release, SHA-256 verified (265b9d1e... matches the published sha256sums.txt and my own download), same pattern as sops in staging-validate. 0.34.1 is what production runs.
  • scripts/tests/test-alertmanager-config.sh: uses a local amtool when on PATH (url_file pointed at a real file in the work dir), else Docker, else SKIP.
  • docs/tool-versions.yml: new alertmanager_amtool entry (tier C, checksum) so the upstream survey tracks the pin and its regex must keep matching.
  • Verified by running the workflow's own install step (extracted from lint.yml) inside a plain python:3.11 container with no Docker: checksum OK, amtool 0.34.1, and the test passes 10/10 on the local-amtool path. Also still passes with the Docker path locally.

🤖 Generated with Claude Code

The Alertmanager config test (#128) validated routing everywhere but only ran amtool check-config where Docker exists; the ephemeral lint runners have none, so CI printed SKIP and never asked Alertmanager itself whether the rendered file is valid. - lint.yml installs amtool v0.34.1 from the prometheus/alertmanager release, SHA-256 verified (265b9d1e... matches the published sha256sums.txt and my own download), same pattern as sops in staging-validate. 0.34.1 is what production runs. - scripts/tests/test-alertmanager-config.sh: uses a local amtool when on PATH (url_file pointed at a real file in the work dir), else Docker, else SKIP. - docs/tool-versions.yml: new alertmanager_amtool entry (tier C, checksum) so the upstream survey tracks the pin and its regex must keep matching. - Verified by running the workflow's own install step (extracted from lint.yml) inside a plain python:3.11 container with no Docker: checksum OK, amtool 0.34.1, and the test passes 10/10 on the local-amtool path. Also still passes with the Docker path locally. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci(lint): run amtool check-config in CI with a checksum-pinned amtool
All checks were successful
Lint / lint (pull_request) Successful in 1m30s
Secret scan / scan (pull_request) Successful in 12s
59ce6cc4b5
The lint runners have no Docker, so the Alertmanager config test skipped its amtool step there. The job now installs a pinned
amtool (v0.34.1, SHA-256 checked, registered in docs/tool-versions.yml); the test uses a local amtool, else Docker, else skips.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfraeys/infra!131
No description provided.