Skip to content

Commit

Permalink
Migrate config .github/renovate.json5
Browse files Browse the repository at this point in the history
  • Loading branch information
gardener-ci-robot committed Nov 12, 2024
1 parent d37e91e commit 4af5605
Showing 1 changed file with 78 additions and 56 deletions.
134 changes: 78 additions & 56 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,88 +1,110 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
"config:recommended",
":semanticCommitsDisabled",
"regexManagers:githubActionsVersions"
'config:recommended',
':semanticCommitsDisabled',
'customManagers:githubActionsVersions',
],
labels: ["kind/enhancement"],
postUpdateOptions: ["gomodTidy"],
automergeStrategy: "squash",
labels: [
'kind/enhancement',
],
postUpdateOptions: [
'gomodTidy',
],
automergeStrategy: 'squash',
customManagers: [
{
// Generic detection for pod-like image specifications.
customType: "regex",
fileMatch: ["^\.ci\/pipeline_definitions$"],
matchStrings: ["image: ['\"]?(?<depName>.*?):(?<currentValue>.*?)['\"]?\\s"],
datasourceTemplate: "docker"
customType: 'regex',
fileMatch: [
'^.ci/pipeline_definitions$',
],
matchStrings: [
'image: [\'"]?(?<depName>.*?):(?<currentValue>.*?)[\'"]?\\s',
],
datasourceTemplate: 'docker',
},
{
// Update `_VERSION` and `_version` variables in Makefiles and scripts.
// Inspired by `regexManagers:dockerfileVersions` preset.
customType: "regex",
fileMatch: ["Makefile$", "\\.mk$", "\\.sh$"],
customType: 'regex',
fileMatch: [
'Makefile$',
'\\.mk$',
'\\.sh$',
],
matchStrings: [
"# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s.+?_(VERSION|version) *[?:]?= *\"?(?<currentValue>.+?)\"?\\s"
]
'# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s.+?_(VERSION|version) *[?:]?= *"?(?<currentValue>.+?)"?\\s',
],
},
],
packageRules: [
{
matchUpdateTypes: ["patch"],
automerge: true
matchUpdateTypes: [
'patch',
],
automerge: true,
},
{
// bump go mod directive by default (https://github.com/renovatebot/renovate/blob/main/lib/modules/versioning/go-mod-directive/readme.md)
"matchDatasources": ["golang-version"],
"rangeStrategy": "bump"
matchDatasources: [
'golang-version',
],
rangeStrategy: 'bump',
},
{
// Group tool updates in one PR.
groupName: "Update tools",
matchFileNames: ["hack\/tools\\.mk"]
groupName: 'Update tools',
matchFileNames: [
'hack/tools\\.mk',
],
},
{
// gardener/gardener dictates these k8s dependencies. Ignore dependency updates for these packages.
matchDatasources: ["go"],
matchPackagePatterns: [
"k8s\\.io\/.+",
"sigs\\.k8s\\.io\/controller-runtime"
matchDatasources: [
'go',
],
enabled: false,
matchPackageNames: [
'/k8s\\.io/.+/',
'/sigs\\.k8s\\.io/controller-runtime/',
],
enabled: false
},
{
// Group golang dependencies in one PR, separate by major, minor and patch
groupName: "dependencies",
matchDatasources: ["go"],
groupName: 'dependencies',
matchDatasources: [
'go',
],
matchPackageNames: [
"github.com/gardener/gardener",
"github.com/go-logr/logr",
"github.com/onsi/ginkgo/v2",
"github.com/onsi/gomega",
"golang.org/x/oauth2"
'github.com/gardener/gardener',
'github.com/go-logr/logr',
'github.com/onsi/ginkgo/v2',
'github.com/onsi/gomega',
'golang.org/x/oauth2',
],
separateMajorMinor: true,
separateMinorPatch: true
separateMinorPatch: true,
},
{
// Do not update to patch versions of the Go Toolchain.
// Default golang images set the environment variable GOTOOLCHAIN=local
// and we don't want to enforce every (test-)image to be on the latest patch level.
matchManagers: ["gomod"],
matchUpdateTypes: ["patch"],
matchPackagePatterns: ["go"],
enabled: false
matchManagers: [
'gomod',
],
matchUpdateTypes: [
'patch',
],
enabled: false,
matchPackageNames: [
'/go/',
],
},
{
// Group github-actions in one PR.
groupName: "github-actions",
matchManagers: ["github-actions"]
groupName: 'github-actions',
matchManagers: [
'github-actions',
],
},
{
// Group golang package updates for .ci/pipeline_definitions separately
"matchFileNames": [".ci/pipeline_definitions"],
"matchPackageNames": ["golang"],
"groupName": "[pipeline_definitions] Golang Package Updates"
matchFileNames: [
'.ci/pipeline_definitions',
],
matchPackageNames: [
'golang',
],
groupName: '[pipeline_definitions] Golang Package Updates',
},
]
],
}

0 comments on commit 4af5605

Please sign in to comment.