Skip to content
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

Migrate renovate config #87

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
86 changes: 42 additions & 44 deletions renovate.json5
@@ -1,34 +1,31 @@
{
$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/**',
'releases/**',
'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: [
Expand All @@ -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',
Expand All @@ -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$',
Expand All @@ -101,9 +98,10 @@
' +githubRelease:\\n +slug: (?<depName>[a-z0-9\\.\\/\\-]*?)\\n +tag: (?<currentValue>[a-z0-9\\.\\/\\-\\+]*?) *\\n',
],
datasourceTemplate: 'github-releases',
versioningTemplate: 'regex:v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(-(?<build>[a-z0-9]+))?(\\+(?<compatibility>[a-z0-9]+[a-z])(?<revision>[0-9]+))?$', // https://regex101.com/r/C1dICM/1
versioningTemplate: 'regex:v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(-(?<build>[a-z0-9]+))?(\\+(?<compatibility>[a-z0-9]+[a-z])(?<revision>[0-9]+))?$',
},
{
customType: 'regex',
fileMatch: [
'vendir.yml$',
],
Expand All @@ -114,4 +112,4 @@
versioningTemplate: 'regex:v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)?$',
},
],
}
}