How To Bump Container Image Multiple Version Parts #44138
-
How are you running Renovate?Self-hosted Renovate CLI Which platform you running Renovate on?Gitea Which version of Renovate are you using?43.234.0 Please tell us more about your question or problemI have multiple container images in use which have, themselves, multiple versions in play, such as: I cannot seem to find a solid guide how to be able to process these multiple versions in my Renovate configurations. I have only been able to get the non-Alpine version bump PRs reliably created. I have three methods in which I am bumping these:
Renovate seems to stop on one pass, and for some of these images in play I need it to make a second pass against a second set of matching criteria. Any tips? Here's the custom regex definition: customManagers: [
{
customType: "regex",
datasourceTemplate: "docker",
managerFilePatterns: [
"/\\.yml$/",
"/\\.yaml$/",
],
matchStrings: [
"#[ \\t]+renovate:[ \\t]+datasource=(?<datasource>[a-z-]+?)[ \\t]*(?:[ \\t]+versioning=(?<versioning>[^ \\t\\n]+?))?[ \\t]*\\n[ \\t]*-[ \\t]+name:[ \\t]+\"?[^\"\\n]+\"?[ \\t]*\\n[ \\t]+type:[ \\t]+\"?registry-image\"?[ \\t]*\\n([ \\t]+icon:[ \\t]+\"?[^\"\\n]+\"?[ \\t]*\\n)?[ \\t]+source:[ \\t]*\\n[ \\t]+repository:[ \\t]*\"?(?<registryUrl>[^/]+?)/(?<packageName>[^\"\\n#]+?)\"?[ \\t]*\\n[ \\t]+tag:[ \\t]*\"?(?<currentValue>[^ \\t\"\\n#]+)\"?[ \\t]*",
],
versioningTemplate: "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}",
registryUrlTemplate: "{{#if registryUrl}}https://{{{registryUrl}}}{{else}}https://docker.io{{/if}}",
},
...Logs (if relevant)No response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Tested this on 43.234.0 and it's the docker versioning doing it, not your regex. Renovate splits a tag like There's no single dependency that bumps both parts at once. You need a second manager that owns just the alpine portion as its own dep (e.g. datasource=docker, packageName=alpine, versioning=docker), so each version part has its own matcher. |
Beta Was this translation helpful? Give feedback.
Tested this on 43.234.0 and it's the docker versioning doing it, not your regex. Renovate splits a tag like
golang:1.26.3-alpine3.22into a version (1.26.3) and a compatibility suffix (alpine3.22), and it only accepts updates that keep that suffix identical.isCompatible('1.26.4-alpine3.23', '1.26.3-alpine3.22')returns false, whileisCompatible('1.26.4-alpine3.22', '1.26.3-alpine3.22')is true. So it happily bumps1.26.3insidealpine3.22but never moves you toalpine3.23, which is the one-pass behavior you're hitting.There's no single dependency that bumps both parts at once. You need a second manager that owns just the alpine portion as its own dep (e.g. datasource=docker, packageName…