-
Notifications
You must be signed in to change notification settings - Fork 18
Make Renovate upgrade base images #746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,12 +7,11 @@ | |||||||
| { | ||||||||
| customType: 'regex', | ||||||||
| managerFilePatterns: [ | ||||||||
| 'modules/cert-manager/**/*.mk', | ||||||||
| 'modules/tools/**/*.mk', | ||||||||
| 'modules/**/*.mk', | ||||||||
| ], | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new base image PRs will not auto-merge, and there will be two of them per rebuild. The deleted workflow added the cert-manager has the rule to copy (renovate.json5#L47-L58). Place it after the ungroup rule so it wins: {
groupName: 'Base images',
matchManagers: ['custom.regex'],
matchFileNames: ['modules/oci-build/**'],
addLabels: ['skip-review'], // Adding label to allow PRs to automerge
},If the intent is that a human now reviews base image bumps, please say so in the PR description. [Claude Fable 5.1] |
||||||||
| matchStrings: [ | ||||||||
| '(?:^|\\r\\n|\\r|\\n)#\\s*renovate:\\s*datasource=(?<datasource>\\S+)\\s+packageName=(?<packageName>\\S+)(?:^|\\r\\n|\\r|\\n)\\S+ \\+= \\S+=(?<currentValue>\\S+)', | ||||||||
| '(?:^|\\r\\n|\\r|\\n)#\\s*renovate:\\s*datasource=(?<datasource>\\S+)\\s+packageName=(?<packageName>\\S+)(?:^|\\r\\n|\\r|\\n)\\S+ (:|\\?)= (?<currentValue>\\S+)' | ||||||||
| '(?:^|\\r\\n|\\r|\\n)#\\s*renovate:\\s*datasource=(?<datasource>\\S+)\\s+packageName=(?<packageName>\\S+)(?:^|\\r\\n|\\r|\\n)\\S+\\s+(?:\\+=\\s+[^=]*=|(:|\\?)\\s*=\\s*)(?<currentValue>[^\\s:@]+)\\s*(?:\\r\\n|\\r|\\n|$)', | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new end-of-line terminator on this pattern makes Renovate skip any
Reproduced with Python new pattern: The rewrite is not needed for the exclusivity Copilot asked for. The old patterns already cannot match the two docker lines because they require
Suggested change
[Claude Fable 5.1] |
||||||||
| '(?:^|\\r\\n|\\r|\\n)#\\s*renovate:\\s*datasource=(?<datasource>\\S+)(?:\\s+packageName=(?<packageName>\\S+))?(?:^|\\r\\n|\\r|\\n)\\S+\\s+:=\\s+(?<depName>[^@:\\s]+):(?<currentValue>[^@\\s]+)(?:@(?<currentDigest>sha256:[a-f0-9]+))?', | ||||||||
| ], | ||||||||
| }, | ||||||||
| { | ||||||||
|
|
||||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,12 +13,12 @@ | |
| # limitations under the License. | ||
|
|
||
| # Use distroless as minimal base image to package the manager binary | ||
| # To get latest SHA run "crane digest quay.io/jetstack/base-static:latest" | ||
| base_image_static := quay.io/jetstack/base-static@sha256:dc719ea428e9b88843862bd8de896bbe974088bc838d000a33f091a835744c33 | ||
| # renovate: datasource=docker | ||
| base_image_static := quay.io/jetstack/base-static:latest@sha256:dc719ea428e9b88843862bd8de896bbe974088bc838d000a33f091a835744c33 | ||
|
erikgb marked this conversation as resolved.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding A separate manager scoped to this file would replace the second {
customType: 'regex',
managerFilePatterns: ['modules/oci-build/00_mod.mk'],
matchStrings: [
'(?<depName>quay\\.io/jetstack/[^@\\s]+)@(?<currentDigest>sha256:[a-f0-9]{64})',
],
datasourceTemplate: 'docker',
currentValueTemplate: 'latest',
},Why it matters:
[Claude Fable 5.1] |
||
|
|
||
| # Use custom apko-built image as minimal base image to package the manager binary | ||
| # To get latest SHA run "crane digest quay.io/jetstack/base-static-csi:latest" | ||
| base_image_csi-static := quay.io/jetstack/base-static-csi@sha256:83a2ffc4266da49036b08fef76e8f424a76b12ab870a702231bb4132ae3dbb88 | ||
| # renovate: datasource=docker | ||
| base_image_csi-static := quay.io/jetstack/base-static-csi:latest@sha256:83a2ffc4266da49036b08fef76e8f424a76b12ab870a702231bb4132ae3dbb88 | ||
|
|
||
| # Utility functions | ||
| fatal_if_undefined = $(if $(findstring undefined,$(origin $1)),$(error $1 is not set)) | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the manager widened to
modules/**/*.mk, the firstpackageRulesentry (matchManagers: ['custom.regex']withpostUpgradeTasks: make vendor-go learn-image-shas) now also fires for the base image digest PRs.scripts/learn_image_shas.shreads onlymodules/cert-manager/00_mod.mkand runs eightcrane digestcalls against the cert-manager release images. For a base image PR that is a Go toolchain download, acranebuild and network round trips for a no-op. If quay.io is flaky the unrelated task fails the base image PR; if a release tag were ever re-pushed, cert-manager digest edits would land inside a base image PR. #748 shows the task does run and does rewrite that file.Scope the rule the same way the Tools rule below it already is:
[Claude Fable 5.1]