docs: describe the Renovate automation, the two-PR image loop and the bot-diff gate
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
1 parent
aab4079a9a
commit
c03e492f81
2 files changed
+56
No files matched your search
@@ -58,3 +58,40 @@ protection, or create tags: those are the operator's.
|
||||
- `image.yml` tries the job token first with a write probe; Gitea 28 refuses it for the org's packages
|
||||
(HTTP 401, run 2237), so the push uses the org Actions secrets `PACKAGE_PUSH_USER` and
|
||||
`PACKAGE_PUSH_TOKEN`. Never print or use them anywhere else.
|
||||
|
||||
## Dependency automation (Renovate, Phase 0: configured, not active)
|
||||
|
||||
`renovate.json` is inert until the operator adds Kamino to the self-hosted instance's repository
|
||||
list. Nothing below runs yet unless it says so.
|
||||
|
||||
- **Policy:** minor and patch bumps automerge, majors are manual. `ansible-core` minor and major
|
||||
are manual too (a new minor needs a `tests/sanity/ignore-2.NN.txt`), and `ansible-core` and
|
||||
`ansible-lint` bump in one group. The `ubuntu` job container of `image.yml` and anything
|
||||
naming kaniko never automerge: that job holds the registry push credential.
|
||||
- **Two-PR loop for an image input** (`requirements-dev.txt`, `.pre-commit-config.yaml`,
|
||||
`images/**`): PR 1 carries the input change plus the PATCH bump of the image `version:` in
|
||||
`image.yml` (`scripts/bump_image_versions.py [<base-ref>]`, idempotent, edits only the
|
||||
version line; `check_image_versions.py bump` then passes). The merge builds the image on
|
||||
`main`. PR 2 moves the consumers' `image:<version>@sha256:<digest>` pins to that digest.
|
||||
Until Phase 2/3 enables the script as a `postUpgradeTasks` command (the cluster allows no
|
||||
commands yet, and `renovate.json` must not list any), the bump in PR 1 is a hand edit, and
|
||||
PR 2 stays a hand edit until Phase 4 (pin-follow for `git.rkdr.net/mortis/*` is
|
||||
`enabled: false`; it needs a dry run against the registry first).
|
||||
- **Bot-diff gate:** the `lint` workflow runs `scripts/check_bot_pr_diff.py` on pull requests. A
|
||||
head ref starting `renovate/` may only change version lines in `requirements-dev.txt`, `rev:`
|
||||
lines in `.pre-commit-config.yaml`, FROM tags/digests and the `uv==` pin in `images/*/Dockerfile`,
|
||||
the matrix `version:` lines and the ubuntu job container pin in `image.yml`, and the image
|
||||
pins in `lint.yml`, `build.yml` and `molecule.yml`. Anything else fails, `renovate.json` included.
|
||||
The branch name is attacker-controlled, so this only constrains the bot's own pull requests; its
|
||||
purpose is that automerging them cannot alter workflow logic or reach the org secrets.
|
||||
- **No Collection release from tooling bumps:** everything involved is in `galaxy.yml`
|
||||
`build_ignore`, so the Collection archive and version do not change. A role-visible change needs
|
||||
a changelog fragment and a new `galaxy.yml` version, and only the operator tags.
|
||||
- **No production images:** `check_image_versions.py pins` fails when anything under
|
||||
`.gitea/workflows` mentions `git.rkdr.net/defame1297/`.
|
||||
- **Not enabled yet:** the Renovate run itself, `postUpgradeTasks`, credentials for the
|
||||
`git.rkdr.net` registry (`hostRules`), pin-follow, and a validated `renovate.json` on the
|
||||
instance's Renovate version. The `pre-commit` manager is beta; the hooks come from github.com.
|
||||
- A pin-only pull request (only `lint.yml`, `build.yml`, `molecule.yml`) does not match any
|
||||
`image.yml` push path (`images/**`, `requirements-dev.txt`, `.pre-commit-config.yaml`,
|
||||
`.gitea/workflows/image.yml`), so it rebuilds nothing.
|
||||
@@ -21,6 +21,25 @@
|
||||
(commit the generated `CHANGELOG.rst` and `changelogs/.plugin-cache.yaml`), then
|
||||
push an annotated `vX.Y.Z` tag.
|
||||
|
||||
## Dependency and image updates
|
||||
|
||||
- `requirements-dev.txt`, `.pre-commit-config.yaml` and `images/**` are inputs of the CI and
|
||||
molecule images. A pull request that changes one needs a higher `version:` for that image in
|
||||
`.gitea/workflows/image.yml` (`python3 scripts/bump_image_versions.py` makes the edit; the
|
||||
`Check image versions were bumped` step enforces it). After the merge, `image.yml` builds the
|
||||
image on `main`, and a second pull request moves the `image:<version>@sha256:<digest>` pins in
|
||||
`lint.yml`, `build.yml` and `molecule.yml` to the printed digest. That second pull request
|
||||
touches no `image.yml` trigger path, so it rebuilds nothing.
|
||||
- These files are in `galaxy.yml` `build_ignore`: such bumps do not change the Collection or its
|
||||
version. A change consumers can see needs a changelog fragment, and only the maintainer
|
||||
bumps the version and tags.
|
||||
- `renovate.json` configures dependency bumps (minor and patch automerge, majors by hand). It is
|
||||
not active yet: Renovate does not run against this repository, and until it does the bumps above
|
||||
are made by hand. Pull requests from `renovate/` branches must pass
|
||||
`scripts/check_bot_pr_diff.py`, which only allows version, tag, digest and pin lines.
|
||||
- Workflows must not mention `git.rkdr.net/defame1297/` (the production image set); the
|
||||
`Check image pins` step fails if they do.
|
||||
|
||||
## Maintainer setup
|
||||
|
||||
Settings the workflows cannot enforce and the repository needs before it accepts
|
||||
|
||||
Reference in new issue
Block a user