ci(renovate): run Renovate from a cron workflow on the kamino-runner
Add .gitea/workflows/renovate.yml (daily 03:17 UTC and workflow_dispatch with a dry_run choice), using the job token and a digest-pinned renovate/renovate container, so no Kamino code runs in the production cluster. renovate.json runs scripts/bump_image_versions.py origin/main as a postUpgradeTasks command for the image inputs, and the workflow's own container pin is excluded from bot bumps. Document the dry run, the unverified points and the open decision on CI triggering for job-token pull requests. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
1 parent
e8ae9dcbcb
commit
7730440759
4 files changed
+128
-20
No files matched your search
@@ -59,10 +59,9 @@ protection, or create tags: those are the operator's.
|
||||
(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)
|
||||
## Dependency automation (Renovate)
|
||||
|
||||
`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.
|
||||
`renovate.json` is run by `.gitea/workflows/renovate.yml` (see below). Items marked unverified have not run yet.
|
||||
|
||||
- **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
|
||||
@@ -76,10 +75,10 @@ list. Nothing below runs yet unless it says so.
|
||||
`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).
|
||||
`renovate.json` runs the script as a `postUpgradeTasks` command (branch mode, file filter
|
||||
`image.yml`; allowed by the one anchored regex in `RENOVATE_ALLOWED_COMMANDS` of `renovate.yml`),
|
||||
so PR 1 carries the bump. 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`,
|
||||
@@ -94,13 +93,31 @@ list. Nothing below runs yet unless it says so.
|
||||
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, so it
|
||||
needs `GITHUB_COM_TOKEN` on the Renovate instance. Unverified: that bot PRs are held by `main`'s
|
||||
required status checks (check the branch protection before enabling automerge), and that
|
||||
`github.head_ref` is populated on this Gitea (the gate fails closed on an empty one, via
|
||||
`EVENT_NAME`).
|
||||
- **Where Renovate runs:** `.gitea/workflows/renovate.yml`, a daily cron (03:17 UTC) plus
|
||||
`workflow_dispatch`, on the `kamino-runner` (`kamino-docker`): the untrusted side, so code from this
|
||||
repository never runs in the production cluster (ADR 0004). It authenticates with the workflow's own
|
||||
job token (`secrets.GITHUB_TOKEN`): no new account, no secret, and no org secret (only `image.yml` may
|
||||
reference those). The job container is `renovate/renovate:<version>-full@sha256:...` from Docker Hub
|
||||
(the `-full` flavour for `python3`), same version as the cluster's CronJob, hand-bumped (renovate.json
|
||||
disables updates for the workflow file). Lookups of the github.com pre-commit hooks are
|
||||
unauthenticated (no `RENOVATE_GITHUB_COM_TOKEN` exists) and may hit rate limits: best effort.
|
||||
- **Dry run:** Actions > Renovate > Run workflow with `dry_run=true` (the default for a manual run;
|
||||
sets `RENOVATE_DRY_RUN=full`, `LOG_LEVEL=debug`). Read the debug log: no branch or PR is created. The
|
||||
schedule runs live.
|
||||
- **Unverified (settle with the first dry run and first live run):** that the job token can run Renovate on
|
||||
Gitea (user lookup, branch push, PR creation); that `origin/main` exists and the clone is deep enough
|
||||
for the merge-base in Renovate's checkout (the script fails with its one-line error otherwise); that
|
||||
`python3` is in the image; that the `permissions:` block is enforced on this Gitea. Also unverified:
|
||||
that PRs opened with the job token trigger the PR workflows. Gitea, like GitHub, may not start
|
||||
workflows for events created by the job token, in which case the required `Lint` and `Build` checks
|
||||
never run and automerge cannot work.
|
||||
- **Open decision (do not pick without the operator):** if job-token PRs do not trigger CI, either
|
||||
(a) push the PR with a user token held as a repo secret from a Kamino-only user, or (b) have
|
||||
`renovate.yml` dispatch lint against the branch. Until decided, bot PRs need a manual run.
|
||||
- **Not enabled yet:** credentials for the `git.rkdr.net` registry (`hostRules`) and pin-follow. The
|
||||
`pre-commit` manager is beta. Unverified: that bot PRs are held by `main`'s required status checks
|
||||
(check the branch protection before enabling automerge), and that `github.head_ref` is populated on
|
||||
this Gitea (the gate fails closed on an empty one, via `EVENT_NAME`).
|
||||
- **Hand edits on a bot branch:** a commit pushed by hand to a `renovate/` branch makes Renovate treat
|
||||
the branch as modified: it stops rebasing it, so merge that pull request by hand.
|
||||
- **The guard runs from `main`:** the lint step extracts `scripts/` from `origin/main` and runs the
|
||||
|
||||
Reference in new issue
Block a user