Skip to content

Commit

Permalink
chore(renovate): restore comments
Browse files Browse the repository at this point in the history
  • Loading branch information
o-orand committed Sep 5, 2024
1 parent 6122bb8 commit a533aa1
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions renovate.json5
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:best-practices',
'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: [
Expand Down Expand Up @@ -49,12 +51,13 @@
{
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: [
'/*/',
'*',
],
},
{
Expand All @@ -65,10 +68,12 @@
],
},
{
// 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',
Expand Down Expand Up @@ -107,10 +112,11 @@
customManagers: [
{
customType: 'regex',
fileMatch: [
'.*/.*_spec\\.rb',
],
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\\.\\/\\-\\+]*)".*',
],
depNameTemplate: 'ruby',
Expand All @@ -123,9 +129,15 @@
'.*/.*_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>.*)$',
},
{
Expand All @@ -135,9 +147,12 @@
'.*/.*_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>.*)$',
},
Expand Down

0 comments on commit a533aa1

Please sign in to comment.