fix(renovate): run the image bump task on every branch #216
No files matched your search
+12
-18
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.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).",
|
"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 top-level postUpgradeTasks runs scripts/bump_image_versions.py on every branch, lock refreshes included, which carry no package a packageRule could match (allowed by RENOVATE_ALLOWED_COMMANDS of .gitea/workflows/renovate.yml, where Renovate runs).",
|
||||||
"extends": [
|
"extends": [
|
||||||
"config:recommended",
|
"config:recommended",
|
||||||
":enablePreCommit"
|
":enablePreCommit"
|
||||||
@@ -22,6 +22,15 @@
|
|||||||
"prHourlyLimit": 5,
|
"prHourlyLimit": 5,
|
||||||
"minimumReleaseAge": "3 days",
|
"minimumReleaseAge": "3 days",
|
||||||
"minimumReleaseAgeBehaviour": "timestamp-optional",
|
"minimumReleaseAgeBehaviour": "timestamp-optional",
|
||||||
|
"postUpgradeTasks": {
|
||||||
|
"commands": [
|
||||||
|
"python3 scripts/bump_image_versions.py origin/main"
|
||||||
|
],
|
||||||
|
"fileFilters": [
|
||||||
|
".gitea/workflows/image.yml"
|
||||||
|
],
|
||||||
|
"executionMode": "branch"
|
||||||
|
},
|
||||||
"timezone": "UTC",
|
"timezone": "UTC",
|
||||||
"ansible-galaxy": {
|
"ansible-galaxy": {
|
||||||
"managerFilePatterns": [
|
"managerFilePatterns": [
|
||||||
@@ -53,7 +62,7 @@
|
|||||||
"customManagers": [
|
"customManagers": [
|
||||||
{
|
{
|
||||||
"customType": "regex",
|
"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).",
|
"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 the top-level postUpgradeTasks.",
|
||||||
"managerFilePatterns": [
|
"managerFilePatterns": [
|
||||||
"/^images/ci/Dockerfile$/"
|
"/^images/ci/Dockerfile$/"
|
||||||
],
|
],
|
||||||
@@ -90,27 +99,12 @@
|
|||||||
],
|
],
|
||||||
"packageRules": [
|
"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).",
|
"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 the top-level postUpgradeTasks.",
|
||||||
"matchManagers": [
|
"matchManagers": [
|
||||||
"dockerfile"
|
"dockerfile"
|
||||||
],
|
],
|
||||||
"automerge": true
|
"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, requirements.yml, .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).",
|
"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": [
|
"matchFileNames": [
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ order; an entry that cannot be parsed unambiguously is an error); comments, quot
|
|||||||
the rest of the file are kept. Untracked files count as inputs unless git ignores them, so a cache
|
the rest of the file are kept. Untracked files count as inputs unless git ignores them, so a cache
|
||||||
under images/ must be in .gitignore.
|
under images/ must be in .gitignore.
|
||||||
|
|
||||||
It runs as a Renovate `postUpgradeTasks` command: renovate.json sets it on a catch-all
|
It runs as a Renovate `postUpgradeTasks` command: renovate.json sets it at the top level
|
||||||
packageRule (matches every package, executionMode branch, fileFilters limited to .gitea/workflows/image.yml),
|
(so it runs on every branch, a lock refresh with no package included), with executionMode branch and fileFilters limited to
|
||||||
|
.gitea/workflows/image.yml,
|
||||||
allowed by RENOVATE_ALLOWED_COMMANDS of .gitea/workflows/renovate.yml. It is a no-op when no image
|
allowed by RENOVATE_ALLOWED_COMMANDS of .gitea/workflows/renovate.yml. It is a no-op when no image
|
||||||
input changed, so a dependency bump that changes an image input carries its version bump and
|
input changed, so a dependency bump that changes an image input carries its version bump and
|
||||||
passes the `bump` check without a human edit.
|
passes the `bump` check without a human edit.
|
||||||
|
|||||||
Reference in new issue
Block a user