forked from orange-cloudfoundry/k3s-boshrelease
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrenovate.json5
137 lines (137 loc) · 5.07 KB
/
renovate.json5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
$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
':disableRateLimiting',
'github>orange-cloudfoundry/renovate-public-presets:boshreleases-default.json5',
],
enabledManagers: [
'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
baseBranches: [
// don't run on renovate branches
'$default',
'/^release-1\.[3-9].*/', // include release starting with 1.30, see https://regex101.com/r/JVIEpD/2
// '/^release-1\.2[89].*/', // match branch 1.28 and 1.28
// 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
packageRules: [
{
matchManagers: [
'custom.regex',
],
matchFileNames: [
'vendir.yml',
],
addLabels: [
'bump-from/vendir',
],
},
{
description: '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',
matchPackageNames: [
'k3s-io/k3s',
],
separateMinorPatch: true,
versioning: 'semver',
//separateMultipleMinor: true, // Pending merge of https://github.com/renovatebot/renovate/pull/24538 to be effective
},
{
description: 'Only ask for patch updates for k8s releases, ie. disable getting minor updates',
matchFileNames: [
'vendir.yml',
],
//See https://github.com/renovatebot/renovate/discussions/15861
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/',
automerge: true,
//see https://docs.renovatebot.com/key-concepts/automerge/#absence-of-tests
ignoreTests: true,
},
{
description: 'Add common labels',
addLabels: [
'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
],
matchDepNames: [
'*',
],
},
{
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',
matchPackageNames: [
'kubernetes/kubernetes',
],
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
},
],
customManagers: [
{
customType: 'regex',
description: 'https://regex101.com/r/ms9hZL/1 for matchstring and https://regex101.com/r/NVqoci/1 for version',
fileMatch: [
'vendir.yml$',
],
matchStrings: [
' +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
},
{
customType: 'regex',
fileMatch: [
'vendir.yml$',
],
matchStrings: [
' +git:\\n +url: https:\\/\\/github\\.com\\/(?<depName>[a-z0-9\\.\\/\\-:]*?)\\n +ref: (?<currentValue>[a-z0-9\\.\\/\\-\\+]*?) *\\n',
],
datasourceTemplate: 'github-tags',
versioningTemplate: 'regex:v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)?$',
},
{
customType: 'regex',
fileMatch: [
'.github/workflows/.*\\.yml',
],
matchStrings: [
// For GitHub workflows: https://regex101.com/r/wjGoU0/2
'repo: (?<depName>[\\w\\d\\//\\-\\_]+)\\n\\s*tag:[\\s*|=]??\\"?v(?<currentValue>[\\w\\d\\/\\-\\.\\_]+)\\"?',
],
versioningTemplate: 'regex:v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)?$',
extractVersionTemplate: '^v?(?<version>.*)$',
datasourceTemplate: 'github-tags',
},
],
}