ci(renovate): validate the config in Lint, bump Renovate's own image weekly, run on push to main #525

Merged
Defame1297 merged 6 commits from ci/188-172-renovate-self-bump into main 2026-12-06 17:56:38 +00:00
Owner

What and why

Closes #188
Closes #172

#188

  • Lint gains a renovate-config job. It runs renovate-config-validator --strict --no-global renovate.json in the same pinned renovate/renovate:…-full@sha256 image as renovate.yml.
    • --no-global is needed because without it the validator checks the file as global self-hosted config.
    • The clone and the validation are separate steps, so the clone credential is not in the environment that reads the PR's renovate.json.
  • The enabled: false rule for renovate.yml is replaced. Renovate now proposes its own image bump weekly (Mondays), after a 3-day release age, and never automerges it.
    • The description names the real reason: the container holds the write-capable Renovate bot token. The issue says "job token", which is wrong: renovate.yml passes RENOVATE_BOT_TOKEN.
  • check_bot_pr_diff.py lets a bot PR move only the tag and digest of that image line. The name and the -full flavour are fixed, because slim has no python3.
    • This goes beyond #188's wording: the allowance also covers lint.yml. Its validator job copies the same pin, so the self-bump PR moves both copies. A unit test keeps the two copies equal.
    • The moved-line check now covers every workflow whose image pins a bot may change, not only renovate.yml. That is a deliberate widening.
  • RENOVATE_DOCKER_MAX_PAGES: "10" is set in renovate.yml. This is not in either issue, but without it the 3-day wait never applies to renovate/renovate:
    • Docker Hub refuses anonymous tag paging past page 10, so Renovate gets no release timestamps.
    • With timestamp-optional, an update with no timestamp gets no wait.
    • A local run confirmed the wait applies once the setting is in place.

#172

  • renovate.yml:
    • Runs on push to main, live (not a dry run).
    • timeout-minutes drops from 30 to 10.
    • concurrency: renovate still never cancels a running run.
    • The comments are updated, and run numbers and investigation notes are removed.
  • renovate.json:
    • A new zero-wait rule for our own Docker images (git.rkdr.net/mortis/**).
    • Every description is two sentences or fewer, and the top-level one states the timestamp-optional caveat.
    • The two review-held rules from #172 comment 9591 move to docs/contributing/making-a-change.md.
  • Departure from #210 / #172 comment 10882 (maintainer decision):
    • The pin-follow and dockerfile rules keep automerge. Their descriptions say they merge once a code owner approves: a code owner approves, then Gitea completes the merge.
    • The uv== pin also keeps automerging.
  • AGENTS.md, .gitea/workflows/AGENTS.md and making-a-change.md now say Lint checks the syntax, and that renovate --platform=local is still for behaviour changes.

There is no changelog fragment, because every path touched is in galaxy.yml build_ignore, so Collection consumers see no change (making-a-change.md: a pure CI or docs change needs none).

Verified

  • python3 -m unittest discover -s tests/scripts: 380 tests OK. The tests include accepted and refused bot-diff cases for both files: a changed name or flavour, a dropped digest, latest, a moved, added or re-indented line, and edits to the env or run lines. The pin-equality test is new.
  • pre-commit run --all-files: every hook passed, including actionlint, zizmor, yamllint, ruff and REUSE.
  • git push ran ansible-test sanity in the pre-push hook, and it passed.
  • renovate-config-validator --strict --no-global renovate.json at 44.161.0 (Node 24) exits 0. A copy with an unknown key exits 1.
  • renovate --platform=local at 44.161.0 with RENOVATE_DOCKER_MAX_PAGES=10 proposes renovate/renovate 44.161.0-full → 44.264.1-full, released 2026-11-26. It moves renovate.yml and lint.yml on one branch, and the 45.x major goes to a separate branch.
  • CI on 2c9221e:

Not verified

  • A real self-bump PR that moves both pins and passes the bot-diff check in CI.
  • The Monday schedule and no-automerge for the self-bump. A local run doesn't show them, so they rest on the config alone.
  • That a merge to main (including the bot's scheduled merge) starts a Renovate run. This is inferred from Gitea's source, not observed.
  • That main's branch protection requires code-owner approval. Automerging the code-owned bumps is only safe while it does.

Human steps after merge:

  • Add Lint / renovate-config (pull_request) to main's required checks.
  • Watch the first push-triggered Renovate run.
  • Change #173's "job token" wording to "Renovate bot token".

  • I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.

Assisted-by: Claude Code

## What and why Closes #188 Closes #172 **#188** - Lint gains a `renovate-config` job. It runs `renovate-config-validator --strict --no-global renovate.json` in the same pinned `renovate/renovate:…-full@sha256` image as `renovate.yml`. - `--no-global` is needed because without it the validator checks the file as global self-hosted config. - The clone and the validation are separate steps, so the clone credential is not in the environment that reads the PR's `renovate.json`. - The `enabled: false` rule for `renovate.yml` is replaced. Renovate now proposes its own image bump weekly (Mondays), after a 3-day release age, and never automerges it. - The description names the real reason: the container holds the write-capable Renovate **bot token**. The issue says "job token", which is wrong: `renovate.yml` passes `RENOVATE_BOT_TOKEN`. - `check_bot_pr_diff.py` lets a bot PR move only the tag and digest of that image line. The name and the `-full` flavour are fixed, because slim has no python3. - **This goes beyond #188's wording:** the allowance also covers `lint.yml`. Its validator job copies the same pin, so the self-bump PR moves both copies. A unit test keeps the two copies equal. - The moved-line check now covers every workflow whose image pins a bot may change, not only `renovate.yml`. That is a deliberate widening. - `RENOVATE_DOCKER_MAX_PAGES: "10"` is set in `renovate.yml`. This is not in either issue, but without it the 3-day wait never applies to `renovate/renovate`: - Docker Hub refuses anonymous tag paging past page 10, so Renovate gets no release timestamps. - With `timestamp-optional`, an update with no timestamp gets no wait. - A local run confirmed the wait applies once the setting is in place. **#172** - `renovate.yml`: - Runs on `push` to `main`, live (not a dry run). - `timeout-minutes` drops from 30 to 10. - `concurrency: renovate` still never cancels a running run. - The comments are updated, and run numbers and investigation notes are removed. - `renovate.json`: - A new zero-wait rule for our own Docker images (`git.rkdr.net/mortis/**`). - Every description is two sentences or fewer, and the top-level one states the `timestamp-optional` caveat. - The two review-held rules from #172 comment 9591 move to `docs/contributing/making-a-change.md`. - **Departure from #210 / #172 comment 10882 (maintainer decision):** - The pin-follow and `dockerfile` rules **keep automerge**. Their descriptions say they merge once a code owner approves: a code owner approves, then Gitea completes the merge. - The `uv==` pin also keeps automerging. - `AGENTS.md`, `.gitea/workflows/AGENTS.md` and `making-a-change.md` now say Lint checks the syntax, and that `renovate --platform=local` is still for behaviour changes. There is no changelog fragment, because every path touched is in `galaxy.yml` `build_ignore`, so Collection consumers see no change (`making-a-change.md`: a pure CI or docs change needs none). ## Verified - `python3 -m unittest discover -s tests/scripts`: 380 tests OK. The tests include accepted and refused bot-diff cases for both files: a changed name or flavour, a dropped digest, `latest`, a moved, added or re-indented line, and edits to the env or run lines. The pin-equality test is new. - `pre-commit run --all-files`: every hook passed, including actionlint, zizmor, yamllint, ruff and REUSE. - `git push` ran `ansible-test sanity` in the pre-push hook, and it passed. - `renovate-config-validator --strict --no-global renovate.json` at 44.161.0 (Node 24) exits 0. A copy with an unknown key exits 1. - `renovate --platform=local` at 44.161.0 with `RENOVATE_DOCKER_MAX_PAGES=10` proposes `renovate/renovate` 44.161.0-full → 44.264.1-full, released 2026-11-26. It moves `renovate.yml` and `lint.yml` on one branch, and the 45.x major goes to a separate branch. - CI on 2c9221e: - Build: https://git.rkdr.net/Mortis/Kamino/actions/runs/7424 - Lint: https://git.rkdr.net/Mortis/Kamino/actions/runs/7425 - `lint` passed. - The new `renovate-config` job passed in 2m42s, including the cold pull of the image. So the validator is on PATH in the image, and `$RUNNER_TEMP` is writable by the image's user. - Molecule: https://git.rkdr.net/Mortis/Kamino/actions/runs/7426. It selected no scenarios, as expected. ## Not verified - A real self-bump PR that moves both pins and passes the bot-diff check in CI. - The Monday schedule and no-automerge for the self-bump. A local run doesn't show them, so they rest on the config alone. - That a merge to `main` (including the bot's scheduled merge) starts a Renovate run. This is inferred from Gitea's source, not observed. - That `main`'s branch protection requires code-owner approval. Automerging the code-owned bumps is only safe while it does. **Human steps after merge:** - Add `Lint / renovate-config (pull_request)` to `main`'s required checks. - Watch the first push-triggered Renovate run. - Change #173's "job token" wording to "Renovate bot token". --- - [ ] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none. Assisted-by: Claude Code
Claude added this to the Continuous delivery milestone 2026-12-06 17:37:09 +00:00
Claude added 6 commits 2026-12-06 17:37:10 +00:00
Add a renovate-config job to Lint that runs renovate-config-validator
--strict --no-global in a copy of renovate.yml's Renovate image, so the
config is checked by the Renovate that runs it and the check can be
required. The ci image stays without Node.

check_bot_pr_diff.py now lets a bot pull request move the tag and digest
of the renovate/renovate image line in renovate.yml and lint.yml, in
place, keeping the name and the -full flavour. A test holds the two pins
equal.

Refs: #188
Assisted-by: Claude Code
Renovate runs on every push to main, so after each merge the next bot
pull request is rebased without waiting for the daily schedule; the
renovate concurrency group still queues at most one run. The job timeout
drops from 30 to 10 minutes.

The rule that disabled updates to renovate.yml is replaced by a weekly
rule for renovate/renovate: a 3-day release age, never automerged, since
the job runs with the write-capable bot token. One pull request moves
the pin in renovate.yml and its copy in lint.yml. RENOVATE_DOCKER_MAX_PAGES
stays within Docker Hub's anonymous paging limit, so the image's release
timestamps are found and the wait applies.

Our own Docker images get an explicit zero release age. Every rule
description is cut to at most two sentences, and the top-level one now
says that an update with no release timestamp gets no wait.

Closes: #172
Closes: #188
Assisted-by: Claude Code
Syntax is now checked by Lint's renovate-config job; a local
renovate --platform=local run stays for behaviour changes.
making-a-change.md also gains the two review-held rules for
renovate.json: descriptions of at most two short sentences, and a test or
check before an automerge exception.

Refs: #172
Refs: #188
Assisted-by: Claude Code
The renovate-config job clones in its own step and validates in a second
step, so the job token is not in the environment that reads the pull
request's renovate.json.

check_bot_pr_diff.py now refuses a moved image line in every workflow
whose pins a bot may move, lint.yml included, not only in image.yml and
renovate.yml. Tests cover a moved lint.yml line, an added second
Renovate line and a changed indentation.

Refs: #188
Assisted-by: Claude Code
The dockerfile rule no longer claims the bump's own CI builds the new
image: Images builds it only after the merge, and the pin-follow pull
request's CI runs on it. The top-level description says code-owned files
automerge only once a code owner approves.

making-a-change.md quotes the full validator command and marks it a
control only once Lint / renovate-config is a required check. The
renovate.yml concurrency comment drops an unverified queueing claim.

Refs: #172
Refs: #188
Assisted-by: Claude Code
ci(lint): give renovate-config room for a cold image pull
Build / build (pull_request) Successful in 36s
Lint / lint (pull_request) Successful in 3m7s
Molecule / select (pull_request) Successful in 6s
Molecule / scenarios (pull_request) Skipped
Lint / renovate-config (pull_request) Successful in 2m42s
Molecule / Result (pull_request) Successful in 1s
2c9221ef45
Raise the renovate-config timeout to 15 minutes: after a self-bump the
runner pulls the large -full image first. The comment on the validator
step now says the clone credential is kept out of it, not the job token,
which the runner may still pass to every step. The workflow rules note
that renovate-config is the Lint job outside the ci image.

Refs: #188
Assisted-by: Claude Code
CODEOWNERS rules requested review from Defame1297 2026-12-06 17:37:10 +00:00
Defame1297 approved these changes 2026-12-06 17:56:31 +00:00
Defame1297 merged commit d6037df6e4 into main 2026-12-06 17:56:38 +00:00
Defame1297 deleted branch ci/188-172-renovate-self-bump 2026-12-06 17:56:40 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#525