kaniko runs inside the job container and unpacks the image it builds over it, so the job container must be the same Ubuntu release as the image's FROM lines. A single ubuntu:26.04 job container broke the molecule-ubuntu2404 build (run 2529: GLIBC_2.42 not found, then the credential cleanup step died too). Each matrix entry now names job_image, check_image_versions.py pins fails when it differs from the Dockerfile's release, the bot-diff guard allows tag and digest edits of job_image lines, Renovate tracks them with a regex manager (never automerged), and major ubuntu updates are disabled everywhere: a new release is a deliberate edit. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
182 lines
8.0 KiB
JSON
182 lines
8.0 KiB
JSON
{
|
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
"description": "Run by .gitea/workflows/renovate.yml on the kamino-runner. Policy: automerge minor and patch, majors by hand. Every bot pull request must pass scripts/check_bot_pr_diff.py (lint workflow), which allows only version, tag, digest and pin lines. The image-input rule runs scripts/bump_image_versions.py as a postUpgradeTasks command (allowed by RENOVATE_ALLOWED_COMMANDS of .gitea/workflows/renovate.yml, where Renovate runs).",
|
|
"extends": [
|
|
"config:recommended",
|
|
":enablePreCommit"
|
|
],
|
|
"branchPrefix": "renovate/",
|
|
"semanticCommits": "enabled",
|
|
"semanticCommitType": "chore",
|
|
"semanticCommitScope": "deps",
|
|
"enabledManagers": [
|
|
"pip_requirements",
|
|
"pre-commit",
|
|
"github-actions",
|
|
"dockerfile",
|
|
"custom.regex"
|
|
],
|
|
"automerge": true,
|
|
"automergeType": "pr",
|
|
"minimumReleaseAge": "3 days",
|
|
"minimumReleaseAgeBehaviour": "timestamp-optional",
|
|
"timezone": "UTC",
|
|
"pip_requirements": {
|
|
"managerFilePatterns": [
|
|
"/^requirements-dev\\.txt$/"
|
|
]
|
|
},
|
|
"pre-commit": {
|
|
"enabled": true,
|
|
"managerFilePatterns": [
|
|
"/^\\.pre-commit-config\\.yaml$/"
|
|
]
|
|
},
|
|
"github-actions": {
|
|
"managerFilePatterns": [
|
|
"/^\\.gitea/workflows/.+\\.ya?ml$/"
|
|
]
|
|
},
|
|
"dockerfile": {
|
|
"managerFilePatterns": [
|
|
"/^images/[^/]+/Dockerfile$/"
|
|
]
|
|
},
|
|
"customManagers": [
|
|
{
|
|
"customType": "regex",
|
|
"description": "The uv pin that installs the build-stage Python interpreters of the ci image (images/ci/Dockerfile). It is an image input: the version bump comes from scripts/bump_image_versions.py via postUpgradeTasks (rule below).",
|
|
"managerFilePatterns": [
|
|
"/^images/ci/Dockerfile$/"
|
|
],
|
|
"matchStrings": [
|
|
"\\buv==(?<currentValue>[0-9][0-9A-Za-z.+!_-]*)"
|
|
],
|
|
"depNameTemplate": "uv",
|
|
"datasourceTemplate": "pypi"
|
|
},
|
|
{
|
|
"customType": "regex",
|
|
"description": "The job container of each image of image.yml (matrix job_image, ubuntu by digest). kaniko unpacks the image over the job container, so its release must equal the Dockerfile's (check_image_versions.py pins). Tag and digest updates within a release arrive here; a new release is a deliberate edit of both (rule below disables major ubuntu updates). Never automerged: the job holds the registry push credential (image.yml rule below).",
|
|
"managerFilePatterns": [
|
|
"/^\\.gitea/workflows/image\\.yml$/"
|
|
],
|
|
"matchStrings": [
|
|
"job_image:\\s*(?<depName>ubuntu):(?<currentValue>[0-9][^@\\s]*)@(?<currentDigest>sha256:[0-9a-f]{64})"
|
|
],
|
|
"datasourceTemplate": "docker",
|
|
"versioningTemplate": "ubuntu"
|
|
},
|
|
{
|
|
"customType": "regex",
|
|
"description": "The MOLECULE_IMAGE value of molecule.yml is a multi-line `>-` scalar, which the github-actions manager does not read; matched here by its exact shape. Used by the pin-follow rule below.",
|
|
"managerFilePatterns": [
|
|
"/^\\.gitea/workflows/molecule\\.yml$/"
|
|
],
|
|
"matchStrings": [
|
|
"MOLECULE_IMAGE:\\s*>-\\s*\\n\\s*(?<depName>git\\.rkdr\\.net/mortis/[a-z0-9._-]+):(?<currentValue>[^@\\s]+)@(?<currentDigest>sha256:[0-9a-f]{64})"
|
|
],
|
|
"datasourceTemplate": "docker",
|
|
"versioningTemplate": "semver"
|
|
}
|
|
],
|
|
"packageRules": [
|
|
{
|
|
"description": "Dockerfile base-image tag and digest bumps (images/*/Dockerfile) MAY automerge. Kamino is the untrusted side and the bump pull request's own CI exercises the new image before the merge. Placed first so the major-version rule below still turns automerge off. The image version bump in image.yml comes from scripts/bump_image_versions.py via postUpgradeTasks (rule below).",
|
|
"matchManagers": [
|
|
"dockerfile"
|
|
],
|
|
"automerge": true
|
|
},
|
|
{
|
|
"description": "Every update runs scripts/bump_image_versions.py against origin/main as a postUpgradeTasks command (the base ref and clone depth in Renovate's checkout are verified by the first dry run). The rule matches every package (matchPackageNames *, which strict validation requires as a selector) on purpose: with executionMode branch only the FIRST upgrade's postUpgradeTasks of a branch counts and a branch can carry several upgrades; the script is a no-op when no image input (requirements-dev.txt, .pre-commit-config.yaml, images/**) changed and otherwise makes the PATCH bump of the image version in image.yml. The command must match RENOVATE_ALLOWED_COMMANDS in renovate.yml exactly.",
|
|
"matchPackageNames": [
|
|
"*"
|
|
],
|
|
"postUpgradeTasks": {
|
|
"commands": [
|
|
"python3 scripts/bump_image_versions.py origin/main"
|
|
],
|
|
"fileFilters": [
|
|
".gitea/workflows/image.yml"
|
|
],
|
|
"executionMode": "branch"
|
|
}
|
|
},
|
|
{
|
|
"description": "The Renovate job container of renovate.yml runs with the job token: hand-bumped, never by the bot (the bot-diff gate would refuse a change to that file anyway).",
|
|
"matchFileNames": [
|
|
".gitea/workflows/renovate.yml"
|
|
],
|
|
"enabled": false
|
|
},
|
|
{
|
|
"description": "A new Ubuntu release is a deliberate edit, never a bump. The molecule-ubuntu<NNNN> images are one release by name and by contract (extensions/molecule/image-smoke* assert it), and every image's job container must run the same release as its Dockerfile (check_image_versions.py pins), so a base-image major in one file alone would fail the check or the build. Tag and digest updates within a release still arrive.",
|
|
"matchPackageNames": [
|
|
"ubuntu"
|
|
],
|
|
"matchUpdateTypes": [
|
|
"major"
|
|
],
|
|
"enabled": false
|
|
},
|
|
{
|
|
"description": "Majors are reviewed by hand.",
|
|
"matchUpdateTypes": [
|
|
"major"
|
|
],
|
|
"automerge": false,
|
|
"labels": [
|
|
"breaking-change"
|
|
]
|
|
},
|
|
{
|
|
"description": "ansible-core and ansible-lint move together (the lint rules follow the core version). A new ansible-core minor can bring new sanity findings (the shared tests/sanity/ignore-common.txt covers the known ones), so its minor and major bumps are manual; patches of both follow the global automerge.",
|
|
"groupName": "ansible tooling",
|
|
"matchDatasources": [
|
|
"pypi"
|
|
],
|
|
"matchPackageNames": [
|
|
"ansible-core",
|
|
"ansible-lint"
|
|
]
|
|
},
|
|
{
|
|
"description": "ansible-core minor and major bumps: a new core can bring new sanity findings, so a human reviews them.",
|
|
"matchDatasources": [
|
|
"pypi"
|
|
],
|
|
"matchPackageNames": [
|
|
"ansible-core"
|
|
],
|
|
"matchUpdateTypes": [
|
|
"minor",
|
|
"major"
|
|
],
|
|
"automerge": false
|
|
},
|
|
{
|
|
"description": "The job container of image.yml (ubuntu by digest) holds the org registry push credential while the image job runs: never automerged, and kept in its own branch so the Dockerfile base-image bumps are not held back with it.",
|
|
"matchFileNames": [
|
|
".gitea/workflows/image.yml"
|
|
],
|
|
"automerge": false,
|
|
"additionalBranchPrefix": "job-container-"
|
|
},
|
|
{
|
|
"description": "Safety net only: kaniko is pinned by layer digests in image.yml and no Renovate manager reads them, so it is updated by hand. If a manager ever starts to read it, its bumps are not automerged.",
|
|
"matchPackageNames": [
|
|
"/kaniko/"
|
|
],
|
|
"automerge": false
|
|
},
|
|
{
|
|
"description": "Pin follow-up for our own images (git.rkdr.net/mortis/*): moves the image:<version>@sha256:<digest> pins of lint.yml, build.yml and molecule.yml to the newest published version and its digest, and automerges (PR 2 of the update loop). The pull request's own Lint and Build run in the new image before the merge, scripts/check_bot_pr_diff.py allows only these pin lines, and scripts/check_image_versions.py pins fails a pin that is newer than the matrix. The registry lists tags and digests anonymously, so no hostRules are needed. A major version stays manual (rule above).",
|
|
"matchPackageNames": [
|
|
"git.rkdr.net/mortis/**"
|
|
],
|
|
"automerge": true
|
|
}
|
|
]
|
|
}
|