I have configured Renovate Bot in my self-hosted GitLab CE instance using a renovate.json
file. My project contains two different Dockerfiles located at:
project root
/build-1/Dockerfile
/build-2/Dockerfile
- In
/build-1/Dockerfile
, I want to use the latest AlmaLinux 8 version. - In
/build-2/Dockerfile
, I want to use the latest AlmaLinux 9 version.
However, Renovate Bot is incorrectly attempting to update the AlmaLinux 8 image to version 9.
How can I configure Renovate Bot to ensure that /build-1/Dockerfile
only receives updates within AlmaLinux 8, and /build-2/Dockerfile
only updates within AlmaLinux 9?
My current renovate.json
file:
{
"packageRules": [
{
"packageNames": ["almalinux"],
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"schedule": ["after 6pm"],
"automerge": true
}
]
}
Any guidance would be greatly appreciated.
I have configured Renovate Bot in my self-hosted GitLab CE instance using a renovate.json
file. My project contains two different Dockerfiles located at:
project root
/build-1/Dockerfile
/build-2/Dockerfile
- In
/build-1/Dockerfile
, I want to use the latest AlmaLinux 8 version. - In
/build-2/Dockerfile
, I want to use the latest AlmaLinux 9 version.
However, Renovate Bot is incorrectly attempting to update the AlmaLinux 8 image to version 9.
How can I configure Renovate Bot to ensure that /build-1/Dockerfile
only receives updates within AlmaLinux 8, and /build-2/Dockerfile
only updates within AlmaLinux 9?
My current renovate.json
file:
{
"packageRules": [
{
"packageNames": ["almalinux"],
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"schedule": ["after 6pm"],
"automerge": true
}
]
}
Any guidance would be greatly appreciated.
Share Improve this question edited Feb 18 at 19:11 Gaël J 15.2k5 gold badges22 silver badges44 bronze badges asked Feb 16 at 21:35 JasperJasper 1411 silver badge7 bronze badges 2 |1 Answer
Reset to default 1You can implement a package rule dedicated to one file where you restrict the max version using matchFileNames
and allowedVersions
.
Something like this:
"packageRules": [
{
"packageNames": ["almalinux"],
"matchFileNames": ["/build-1/Dockerfile"],
"allowedVersions": "<9"
}
]
This can be combined with other rules that you already have, you don't need to merge everything in a single rule.
Renovate PRs normally have some "uniqueness" in their title relating to the version in the upgrade. When you close a "unique" PR, Renovate assumes you don't want to see that PR again in future
– Chris Doyle Commented Feb 18 at 7:38