-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Docker Replacement Rules: Not working as expected #20128
Comments
Workaround preset clashing with packageRules?Stupid idea, but could it be that a
{
"extends": [
":dependencyDashboard",
":semanticPrefixFixDepsChoreOthers",
":ignoreModulesAndTests",
":autodetectRangeStrategy",
":prHourlyLimit2",
":prConcurrentLimit10",
"group:monorepos",
"group:recommended",
"workarounds:all"
]
}
{
"packageRules": [
{
"allowedVersions": "/^(?:8|11|17)(?:\\.|-|$)/",
"description": "Limit Java runtime versions to LTS releases. To receive all major releases add `workarounds:javaLTSVersions` to the `ignorePresets` array.",
"matchDatasources": [
"docker",
"adoptium-java"
],
"matchPackageNames": [
"eclipse-temurin",
"amazoncorretto",
"adoptopenjdk",
"openjdk",
"java",
"java-jre",
"sapmachine"
],
"versioning": "regex:^(?<major>\\d+)?(\\.(?<minor>\\d+))?(\\.(?<patch>\\d+))?([\\._+](?<build>\\d+))?(-(?<compatibility>.*))?$"
}
]
} So maybe things are not working together in the way you expected? Code snippet for Bitnami to try maybe?Our docs mention a code snippet for Bitnami, maybe that can help you? 1 {
"packageRules": [
{
"matchDatasources": ["docker"],
"matchPackagePrefixes": ["bitnami/"],
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(:?-(?<compatibility>.*-r)(?<build>\\d+))?$"
}
]
} Footnotes |
Forked the reproduction to our |
Interesting suggestion @HonkingGoose - To test I've updated my demo repo to remove the |
I deleted the previous branches Renovate had created and re-ran. replacement PR for bitname/redis is now working as expected - https://github.com/setchy/renovate-replacements-docker/pull/7 However the replacement PR for java is not yet 😬 |
I was interested to see what would happen if I ran a similar configuration on Bitbucket Cloud. Turns out that it does identify a replacement, but then later fails with a WARN when trying to push the branch
|
How are you running Renovate?
Mend Renovate hosted app on github.com
If you're self-hosting Renovate, tell us what version of Renovate you run.
No response
If you're self-hosting Renovate, select which platform you are using.
None
If you're self-hosting Renovate, tell us what version of the platform you run.
No response
Was this something which used to work for you, and then stopped?
I never saw this working
Describe the bug
I have had this demonstration repository for a while in eager anticipation of the recently released support for Docker replacement rules
I have a single
Dockerfile
with two images and two replacement rules.My expected behavior is
FROM java:8
replaced withFROM eclipse-temurin:8
FROM bitnami/redis:6.2
replaced withFROM mcr.microsoft.com/oss/bitnami/redis:6.0.8
However, observed behavior is
java
bitnami/redis
PR only updates version number, doesn't update dependency name - see PRLogs excerpt
Relevant debug logs
Logs
Have you created a minimal reproduction repository?
I have linked to a minimal reproduction repository in the bug description
The text was updated successfully, but these errors were encountered: