how to restrict a package to a specific version when using custom manager #30916
-
What would you like help with?I would like help with my configuration How are you running Renovate?Self-hosted If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.GitLab: 17.1.2; Renovate: 38 Please tell us more about your question or problemHi, I have setup a preset containing customManagers: [
// Manager that extracts version information from Dockerfile ARG or ENV statements using a custom comment format
// This allows RenovateBot to manage these for updates.
{
customType: "regex",
fileMatch: [
// match standard Dockerfile pattern (see: https://docs.renovatebot.com/modules/manager/dockerfile/)
"(^|/|\\.)Dockerfile$",
"(^|/)Dockerfile[^/]*$"
],
matchStrings: [
"#\\srenovate:\\sdatasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?( extractVersion=(?<extractVersion>.*?))?\\s(ENV|ARG) .*?_VERSION=(?<currentValue>.*)\\s"
]
}
] This preset is being used in many of my projects and is working well so far. In one project where I applied this has a special requirement. The snippet of dockerfile in that project is as shown below: # renovate: datasource=node depName=node
ARG IMAGE_VERSION=22.6.0
# renovate: datasource=npm depName=yarn
ARG YARN_VERSION=1.22.22
# renovate: datasource=docker depName=python
ARG PYTHON3_11_VERSION=3.11.6 Notice the last config in the docker file is about managing deps of Python, specifically for version 3.11. The dockerfile uses Amazon Linux 2023 as the base image and python is installed using the command As of right now, Amazon Linux 2023 is not available in repology. That's why the renovate config for the I'm wondering if in this commented string I hope I explained it clearly. If you need more clarification, please let me know. Thanks. Logs (if relevant)Logs
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You can use Footnotes |
Beta Was this translation helpful? Give feedback.
You can use
allowedVersions
.1Footnotes
https://docs.renovatebot.com/configuration-options/#allowedversions ↩