From ba95b4a44d45d6ca69ab7b067f2606f19804d812 Mon Sep 17 00:00:00 2001 From: Erik Godding Boye Date: Tue, 9 Sep 2025 18:53:39 +0200 Subject: [PATCH] Bootstrap new preset Renovate config Signed-off-by: Erik Godding Boye --- modules/repository-base/01_mod.mk | 7 +- .../base/.github/renovate.json5 | 165 ------------------ .../renovate-bootstrap-config.json5 | 6 + 3 files changed, 12 insertions(+), 166 deletions(-) delete mode 100644 modules/repository-base/base/.github/renovate.json5 create mode 100644 modules/repository-base/renovate-bootstrap-config.json5 diff --git a/modules/repository-base/01_mod.mk b/modules/repository-base/01_mod.mk index 0d094c23..5b7831e3 100644 --- a/modules/repository-base/01_mod.mk +++ b/modules/repository-base/01_mod.mk @@ -16,7 +16,8 @@ ifndef repo_name $(error repo_name is not set) endif -repository_base_dir := $(dir $(lastword $(MAKEFILE_LIST)))/base/ +_repository_base_module_dir := $(dir $(lastword $(MAKEFILE_LIST))) +repository_base_dir := $(_repository_base_module_dir)base/ .PHONY: generate-base ## Generate base files in the repository @@ -27,5 +28,9 @@ generate-base: find . -type f | while read file; do \ sed "s|{{REPLACE:GH-REPOSITORY}}|$(repo_name:github.com/%=%)|g" "$$file" > "$(CURDIR)/$$file"; \ done + if [ ! -e ./.github/renovate.json5 ]; then \ + mkdir -p ./.github; \ + cp $(_repository_base_module_dir)/renovate-bootstrap-config.json5 ./.github/renovate.json5; \ + fi shared_generate_targets += generate-base diff --git a/modules/repository-base/base/.github/renovate.json5 b/modules/repository-base/base/.github/renovate.json5 deleted file mode 100644 index a4fe8df9..00000000 --- a/modules/repository-base/base/.github/renovate.json5 +++ /dev/null @@ -1,165 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. -// Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base/.github/renovate.json5 instead. - -{ - $schema: 'https://docs.renovatebot.com/renovate-schema.json', - enabled: true, - gitAuthor: 'Renovate Bot ', - gitIgnoredAuthors: [ - '157150467+octo-sts[bot]@users.noreply.github.com', - ], - enabledManagers: [ - 'github-actions', - 'gomod', - ], - extends: [ - 'config:best-practices', - ':gitSignOff', - ':semanticCommits', - ':disableVulnerabilityAlerts', - ':rebaseStalePrs', - ':prConcurrentLimit10', // Set a limit to avoid too many PRs, at least on the first run - ':prHourlyLimitNone', - ], - timezone: 'Europe/London', - labels: [ - 'dependencies', - 'kind/cleanup', - 'ok-to-test', - 'release-note-none', - ], - // packageRules uses globs for matchPackageNames. Some packages have a separate major version i.e. /v on them which is when we would need package**/**. - packageRules: [ - { - groupName: 'Misc GitHub actions', - matchManagers: [ - 'github-actions', - ], - }, - { - matchManagers: [ - 'gomod', - ], - postUpgradeTasks: { - commands: [ - 'make vendor-go generate', - ], - executionMode: 'branch', - } - }, - { - groupName: 'Misc Go deps', - matchManagers: [ - 'gomod', - ], - matchUpdateTypes: [ - 'minor', - 'patch', - ], - }, - { - groupName: 'Testing Go deps', - matchManagers: [ - 'gomod', - ], - matchPackageNames: [ - 'github.com/onsi/ginkgo/**', - 'github.com/onsi/gomega', - 'github.com/stretchr/testify', - ], - matchUpdateTypes: [ - 'minor', - 'patch', - ] - }, - { - groupName: 'Cloud Go deps', - matchManagers: [ - 'gomod', - ], - matchPackageNames: [ - 'github.com/akamai/**', - 'github.com/aws/**', - 'github.com/Azure/**', - 'github.com/AzureAD/**', - 'github.com/cloudflare/**', - 'github.com/digitalocean/**', - 'google.golang.org/api', - ], - matchUpdateTypes: [ - 'minor', - 'patch', - ] - }, - { - groupName: 'Kubernetes Go deps', - matchManagers: [ - 'gomod', - ], - matchPackageNames: [ - 'sigs.k8s.io/**', - 'k8s.io/**', - ], - matchUpdateTypes: [ - 'minor', - 'patch', - ] - }, - { - groupName: 'Kubernetes Go patches', - matchManagers: [ - 'gomod', - ], - matchPackageNames: [ - 'k8s.io/**', - ], - matchUpdateTypes: [ - 'patch', - ], - addLabels: [ - 'skip-review', // Adding label to allow PRs to automerge - ] - }, - { - groupName: 'golang.org/x deps', - matchManagers: [ - 'gomod', - ], - matchPackageNames: [ - 'golang.org/x/**', - ], - addLabels: [ - 'skip-review', // Adding label to allow PRs to automerge - ], - }, - { - matchManagers: [ - 'gomod', - ], - matchUpdateTypes: [ - 'major', - 'digest', - ], - dependencyDashboardApproval: true - }, - { - description: 'Disable (internal) cert-manager pseudo-version updates', - matchManagers: [ - 'gomod', - ], - matchPackageNames: [ - 'github.com/cert-manager/**', - ], - matchCurrentValue: 'v0.0.0*', - enabled: false, - }, - ], - ignorePaths: [ - '**/vendor/**', - // Exclude files that are mastered from makefile-modules and shouldn't be upgraded in projects using makefile-modules. - 'make/_shared/**', - '.github/workflows/govulncheck.yaml', - '.github/workflows/make-self-upgrade.yaml', - '.github/workflows/renovate.yaml', - ], -} diff --git a/modules/repository-base/renovate-bootstrap-config.json5 b/modules/repository-base/renovate-bootstrap-config.json5 new file mode 100644 index 00000000..ce9d622f --- /dev/null +++ b/modules/repository-base/renovate-bootstrap-config.json5 @@ -0,0 +1,6 @@ +{ + $schema: 'https://docs.renovatebot.com/renovate-schema.json', + extends: [ + 'github>cert-manager/renovate-config:default.json5', + ], +}