forked from alphagov/paas-docker-cloudfoundry-tools
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrenovate.json5
160 lines (160 loc) · 5.23 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
$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-actions': {
// We use dependa-bot for this
enabled: false,
},
bundler: {
// We use dependa-bot for this
enabled: false,
},
baseBranches: [
'main',
],
ignorePaths: [
'terraform/**',
'certstrap/**',
'cf-acceptance-tests/**',
'cf-uaac/**',
'concourse-keyval-resource/**',
'concourse-pool-resource/**',
'fast-startup-and-shutdown/**',
'golang/**',
'json-minify/**',
'keyval-resource/**',
'middleman/**',
'node/**',
'node-chromium/**',
'olhtbr-metadata-resource/**',
'paas-prometheus-exporter/**',
'psql/**',
'ruby/**',
'ruby-base/**',
'self-update-pipelines/**',
'spec/**',
'ubuntu/**',
],
packageRules: [
{
description: '@o-orand assignments',
assignees: [
'o-orand',
],
matchPackageNames: [
'*',
],
},
{
description: 'Add common labels',
addLabels: [
// See full list of fields available at https://docs.renovatebot.com/templates/#other-available-fields
'datasource/{{datasource}}',
'depName/{{depNameSanitized}}',
'manager/{{manager}}',
],
matchDepNames: [
'*',
],
},
{
description: 'Ruby: update spec files',
matchDepNames: 'ruby',
matchFileNames: [
'**/*_spec\\.rb',
],
},
{
// opt in for a PR for each K8S minor bump, e.G. 1.20.x to 1.21.y
matchDepNames: 'kubernetes/kubectl',
separateMultipleMinor: true,
},
{
// Add checksums extraction tip to yq packaqe
matchDepNames: 'mikefarah/yq',
prBodyNotes: [
'To easily extract checksums: yq_version=;curl -sSL https://github.com/mikefarah/yq/releases/download/v${jq_version}/checksums |grep "yq_linux_amd64 "|cut -d\' \' -f37',
],
},
{
matchDepNames: [
'mikefarah/yq',
'k14s/ytt',
'k14s/kapp',
'kudobuilder/kuttl',
],
description: 'Group k8s related clis bump unless it is a major version',
groupName: 'K8s related bumps',
matchUpdateTypes: [
'patch',
'minor',
],
},
{
matchDepNames: [
'cloudfoundry/credhub-cli',
'cloudfoundry/cli',
],
description: 'Group cloudfoundry org clis patch bump',
groupName: 'CF org bumps',
matchUpdateTypes: [
'patch',
],
},
],
schedule: [
'after 1pm on Monday',
'before 4pm on Monday',
],
customManagers: [
{
customType: 'regex',
fileMatch: ['.*/.*_spec\\.rb'], //https://regex101.com/r/rIOdcZ/1
matchStrings: [
// https://docs.renovatebot.com/modules/manager/regex/#regular-expression-capture-groups
// The regex manager matches are done per-file and not per-line,
// you should be aware when using the ^ and/or $ regex assertions.
'\\s*RUBY_VERSION\\s*=\\s*"(?<currentValue>[a-z0-9\\.\\/\\-\\+]*)".*', // https://regex101.com/r/hTyRlz/1
],
depNameTemplate: 'ruby',
datasourceTemplate: 'docker',
},
{
customType: 'regex',
fileMatch: [
'.*/Dockerfile$',
'.*/.*_spec\\.rb',
],
matchStrings: [
// For dockerfile: https://regex101.com/r/QUjPL3/3
'datasource=(?<datasource>github-tags) depName=(?<depName>kubernetes/kubectl)\\nENV .+_VERSION ?\\"?(?<currentValue>[\\w\\d\\/\\-\\.\\_]+)\\"?\\s*',
// For spec files: https://regex101.com/r/ifWHDK/2
'.+_VERSION\\s*=\\s*[\\"\\\']?(?<currentValue>[\\w\\d\\/\\-\\.\\_]+)?[\\"\\\']?\\s* #\\s*renovate: datasource=(?<datasource>github-tags) depName=(?<depName>kubernetes/kubectl)( versioning=(?<versioning>.+))?\\s*',
],
//versioningTemplate: "regex:(?<major>\\d+\\.\\d+)\\.(?<minor>\\d+)?$", => we cannot use this as renovate detect 1 instead of 1.24 as major
// Workaround for https://github.com/renovatebot/renovate/issues/6576#issuecomment-1233357263 New feature: separateMultiplePatch and separateMultipleMinor
//#6576
// versioningTemplate: "regex:^(\\d+\\.)?(?<major>\\d+)\\.(?<minor>\\d+)?$",
extractVersionTemplate: '^(kubernetes-)?v?(?<version>.*)$',
},
{
customType: 'regex',
fileMatch: [
'.*/Dockerfile$',
'.*/.*_spec\\.rb',
],
matchStrings: [
// For dockerfile: https://regex101.com/r/QUjPL3/3
'datasource=(?<datasource>github-releases) depName=(?<depName>[\\w\\d\\//\\-\\_]+)\\nENV .+_VERSION ?\\"?(?<currentValue>[\\w\\d\\/\\-\\.\\_]+)\\"?\\s*',
// For spec files: https://regex101.com/r/ifWHDK/2
'.+_VERSION\\s*=\\s*[\\"\\\']?(?<currentValue>[\\w\\d\\/\\-\\.\\_]+)?[\\"\\\']?\\s* #\\s*renovate: datasource=(?<datasource>github-releases) depName=(?<depName>[\\w\\d\\//\\-\\_]+)( versioning=(?<versioning>.+))?\\s*',
],
// datasourceTemplate: "{{datasource}}", // should not be required as we extract datasource
versioningTemplate: 'regex:(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)?$',
extractVersionTemplate: '^v?(?<version>.*)$',
},
],
}