Wrong order of packageRules #31087
-
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.Github Renovate:37.440.4 Please tell us more about your question or problemI’m facing an issue with packageRules when I'm running it through Jenkins. agent {
docker {
label 'Agent'
image 'renovate/renovate:latest'
}
}
...
stages {
stage('init') {
steps {
script {
withCredentials([
usernamePassword(credentialsId: 'artifactoryJwt', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_JWT'),
usernamePassword(credentialsId: 'githubToken', usernameVariable: 'GITHUB_TOKEN_ID', passwordVariable: 'GITHUB_TOKEN')
]) {
env.RENOVATE_CONFIG = """{
"globalExtends": ["config:recommended"],
"platform": "github",
"dockerUser": "root",
"baseBranches": ["branch"],
"repositories": ["repository"],
"packageRules": [
{
"matchBaseBranches": ["branch"],
"groupName": "all patch dependencies",
"groupSlug": "all-patch",
"matchPackageNames": ["*"],
"matchUpdateTypes": ["patch"],
},
{
"matchBaseBranches": ["branch"],
"matchUpdateTypes": ["major", "minor"],
"dependencyDashboardApproval": true,
},
{
"matchFileNames": ["**/samples/**"],
"enabled": false,
}
],
"endpoint": "https://github_host/api/v3",
"printConfig": true,
"dependencyDashboard": true,
"prHourlyLimit": 0,
"npmrcMerge": false,
"commitMessagePrefix": "[Renovate] ",
"labels": ["dependencies"],
"dependencyDashboardLabels": ["dependencies"],
"ignoreDeps": ["dependency"],
"token": "${GITHUB_TOKEN}",
"githubTokenWarn": false,
"constraints": {"java": "^17.0.0",
"node": "^18.16.0",
"npm": "^10.0.0",
},
"hostRules": [
{
"hostType": "npm",
"matchHost": "https://artifactory_host/artifactory/api/npm/npm-sdk/",
"token": '${ARTIFACTORY_JWT}',
}],
"npmrc": "registry=https://artifactory_host/artifactory/api/npm/npm-sdk/\\nalways-auth=true",
}"""
... Logs (if relevant)The part from log with an error
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This happens because we while merging preset configs to the main config we concat the values. So the You should remove |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply, Also from what I understand, I would want the dependencies to be grouped, when I would want to approve major or minor version via checkboxes in the dashboard. |
Beta Was this translation helpful? Give feedback.
So for anybody, who has same problem.
It seems like the problem was really because of renovate version, which looks like a bug.
Not sure, why when I set latest version it procced with version
37.440.4
. I manually switch to the new version and it works as it should.Quick Edit:
using
alwaysPull true
before setting image did help me, to use ofrenovate:latest
.