From 2db631fc6e45d0b75f3b6aa77bda2536cecff095 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 17:50:09 +0000 Subject: [PATCH] Migrate config renovate.json5 --- renovate.json5 | 86 ++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/renovate.json5 b/renovate.json5 index 081e355b..2db23b21 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -1,12 +1,12 @@ { $schema: 'https://docs.renovatebot.com/renovate-schema.json', extends: [ - 'config:best-practices', //See https://docs.renovatebot.com/upgrade-best-practices/#use-the-configbest-practices-preset + 'config:best-practices', ':disableRateLimiting', ], enabledManagers: [ - "github-actions", - "regex" + 'github-actions', + 'custom.regex', ], ignorePaths: [ 'packages/**', @@ -14,21 +14,18 @@ 'manifests/**', 'jobs/**', ], - automergeStrategy: "merge-commit", // use a merge commit so that generated release notes can list the merged PRs + automergeStrategy: 'merge-commit', baseBranches: [ - // don't run on renovate branches - "$default", - "/^release-.*/", //regexp test syntax - "/^upstream-release-1\..*/" - // See https://docs.renovatebot.com/configuration-options/#basebranches - // baseBranches supports Regular Expressions that must begin and end with / - ], //See also possible support for multiple base branches, one per K8S minor version https://docs.renovatebot.com/configuration-options/#basebranches + '$default', + '/^release-.*/', + '/^upstream-release-1..*/', + ], packageRules: [ { matchManagers: [ - 'regex', + 'custom.regex', ], - matchPaths: [ + matchFileNames: [ 'vendir.yml', ], addLabels: [ @@ -41,43 +38,43 @@ 'k3s-io/k3s', ], separateMinorPatch: true, - versioning: "semver", - //separateMultipleMinor: true, // Pending merge of https://github.com/renovatebot/renovate/pull/24538 to be effective + versioning: 'semver', }, { description: 'Only ask for patch updates for k8s releases, ie. disable getting minor updates', - matchPaths: [ + matchFileNames: [ 'vendir.yml', ], - //See https://github.com/renovatebot/renovate/discussions/15861 - "matchUpdateTypes": ["minor"], - "enabled": false + matchUpdateTypes: [ + 'minor', + ], + enabled: false, }, { description: 'Auto-merge patch releases, e.g. from 1.25.1 to 1.25.2', matchPackageNames: [ 'k3s-io/k3s', - 'kubernetes/kubernetes' - ], - - //see https://docs.renovatebot.com/key-concepts/automerge/#automerge-non-major-updates - "matchUpdateTypes": ["patch"], - "matchCurrentVersion": "!/-rc/", // exclude release candidate from automerge - "automerge": true, - //see https://docs.renovatebot.com/key-concepts/automerge/#absence-of-tests - ignoreTests: true + 'kubernetes/kubernetes', + ], + matchUpdateTypes: [ + 'patch', + ], + matchCurrentVersion: '!/-rc/', + automerge: true, + ignoreTests: true, }, { - description: "Add common labels", - matchDepPatterns: ["*"], + description: 'Add common labels', + matchDepPatterns: [ + '*', + ], addLabels: [ - // See full list of fields available at https://docs.renovatebot.com/templates/#other-available-fields - "datasource/{{datasource}}", - "depName/{{depNameSanitized}}", - "manager/{{manager}}", - "hasReleaseNotes/{{hasReleaseNotes}}", - "target/{{baseBranch}}", // To easily filter PR on base branch, like all PR related to k3s 1.25 - ] + 'datasource/{{datasource}}', + 'depName/{{depNameSanitized}}', + 'manager/{{manager}}', + 'hasReleaseNotes/{{hasReleaseNotes}}', + 'target/{{baseBranch}}', + ], }, { description: 'Kubectl: Get distinct branches for each minor, e.g. 1.22.x and 1.23.x. See https://docs.renovatebot.com/presets-default/#separatepatchreleases and https://docs.renovatebot.com/faq/#separate-patch-releases-from-minor-releases', @@ -86,13 +83,13 @@ ], separateMinorPatch: true, addLabels: [ - "depName/kubernetes-kubectl", //override common labels for kubectl, as we have to scan kubernetes releases - ] - //separateMultipleMinor: true, // Pending merge of https://github.com/renovatebot/renovate/pull/24538 to be effective - } + 'depName/kubernetes-kubectl', + ], + }, ], - regexManagers: [ + customManagers: [ { + customType: 'regex', description: 'https://regex101.com/r/ms9hZL/1 for matchstring and https://regex101.com/r/NVqoci/1 for version', fileMatch: [ 'vendir.yml$', @@ -101,9 +98,10 @@ ' +githubRelease:\\n +slug: (?[a-z0-9\\.\\/\\-]*?)\\n +tag: (?[a-z0-9\\.\\/\\-\\+]*?) *\\n', ], datasourceTemplate: 'github-releases', - versioningTemplate: 'regex:v?(?\\d+)\\.(?\\d+)\\.(?\\d+)(-(?[a-z0-9]+))?(\\+(?[a-z0-9]+[a-z])(?[0-9]+))?$', // https://regex101.com/r/C1dICM/1 + versioningTemplate: 'regex:v?(?\\d+)\\.(?\\d+)\\.(?\\d+)(-(?[a-z0-9]+))?(\\+(?[a-z0-9]+[a-z])(?[0-9]+))?$', }, { + customType: 'regex', fileMatch: [ 'vendir.yml$', ], @@ -114,4 +112,4 @@ versioningTemplate: 'regex:v?(?\\d+)\\.(?\\d+)\\.(?\\d+)?$', }, ], -} \ No newline at end of file +}