CI fails a PR that changes a base image without raising the Rebuild #47

Closed
opened 2026-10-10 11:33:18 +00:00 by piscis · 0 comments
Owner

Parent

#45

What to build

CI fails a pull request that changes a base image of the Image without changing the Image tag. Without this, merging the change would silently publish nothing. The failure message names the exact Pin edit to make, following the Pin's header comment: either raise the Rebuild, or set the Rebuild's reference Upstream Version to the current one and the Rebuild number to 2. That makes fixing a Renovate pull request a one-line edit in review. The same guard catches base-image changes made by hand.

  • A local Makefile target, make check-rebuild, compares the base-image references in the Dockerfile and the Image tag from the Pin against the base branch.
  • It fails only when a base-image reference changed and the Image tag didn't. Other Dockerfile changes, and base-image changes that come with a new Image tag, pass.
  • CI runs it on pull requests.
  • The Rebuild number is still raised by a person in review (ADR 0003). Nothing raises it automatically.

Acceptance criteria

  • make check-rebuild passes on a branch with no base-image change
  • It passes when a base-image change comes with a raised Rebuild
  • It fails, naming the Pin edit, when a base-image changes and the Image tag doesn't
  • A Dockerfile change that doesn't touch a FROM reference doesn't trigger it
  • CI runs the check on pull requests. A throwaway commit on the pull request (a base-image change without a Rebuild) shows CI failing, and the commit is reverted afterwards

Blocked by

None (can start immediately).

## Parent #45 ## What to build CI fails a pull request that changes a base image of the Image without changing the Image tag. Without this, merging the change would silently publish nothing. The failure message names the exact Pin edit to make, following the Pin's header comment: either raise the Rebuild, or set the Rebuild's reference Upstream Version to the current one and the Rebuild number to 2. That makes fixing a Renovate pull request a one-line edit in review. The same guard catches base-image changes made by hand. - A local Makefile target, `make check-rebuild`, compares the base-image references in the Dockerfile and the Image tag from the Pin against the base branch. - It fails only when a base-image reference changed and the Image tag didn't. Other Dockerfile changes, and base-image changes that come with a new Image tag, pass. - CI runs it on pull requests. - The Rebuild number is still raised by a person in review (ADR 0003). Nothing raises it automatically. ## Acceptance criteria - [ ] `make check-rebuild` passes on a branch with no base-image change - [ ] It passes when a base-image change comes with a raised Rebuild - [ ] It fails, naming the Pin edit, when a base-image changes and the Image tag doesn't - [ ] A Dockerfile change that doesn't touch a `FROM` reference doesn't trigger it - [ ] CI runs the check on pull requests. A throwaway commit on the pull request (a base-image change without a Rebuild) shows CI failing, and the commit is reverted afterwards ## Blocked by None (can start immediately).
Sign in to join this conversation.
No description provided.