From b8114646db74ca1f536550f00b604148b2ea605f Mon Sep 17 00:00:00 2001 From: Willian Paixao Date: Fri, 29 Nov 2024 14:19:02 +0100 Subject: [PATCH] fix(renovate): rewrite renovate config --- .github/renovate.json5 | 376 +++-------------------------------------- 1 file changed, 19 insertions(+), 357 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index ed42f4d2f..9401e3d22 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,380 +1,42 @@ { $schema: 'https://docs.renovatebot.com/renovate-schema.json', extends: [ + 'config:recommended', + 'docker:enableMajor', + 'docker:pinDigests', + 'helpers:pinGitHubActionDigests', ':automergeBranch', ':automergeDigest', ':dependencyDashboard', ':disableRateLimiting', ':semanticCommits', - 'config:recommended', - 'docker:enableMajor', - 'docker:pinDigests', - 'helpers:pinGitHubActionDigests', ], assignees: ['willianpaixao'], reviewers: ['willianpaixao'], assignAutomerge: true, dependencyDashboard: true, dependencyDashboardTitle: 'Renovate Dashboard 🤖', + ignorePaths: ['**/*.sops.*', '**/docs/**'], suppressNotifications: [ 'prEditedNotification', 'prIgnoreNotification', ], rebaseWhen: 'conflicted', - schedule: [ - 'on saturday', - ], - flux: { - fileMatch: [ - '(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$', - ], + schedule: ['on saturday',], + "flux": { + "fileMatch": [ + "(^|/)kubernetes/.+\\.ya?ml$" + ] }, - 'helm-values': { - fileMatch: [ - '(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$', + "helm-values": { + "fileMatch": [ + "(^|/)kubernetes/.+\\.ya?ml$" ], + "pinDigests": false }, - kubernetes: { - fileMatch: [ - '(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$', - ], - }, - kustomize: { - fileMatch: [ - '(^|/)kustomization\\.ya?ml(\\.j2)?$', - ], - }, - pip_requirements: { - fileMatch: [ - '(^|/)[\\w-]*requirements(-\\w+)?\\.(txt|pip)(\\.j2)?$', - ], - }, - 'ansible-galaxy': { - fileMatch: [ - '(^|/)(galaxy|requirements)(\\.ansible)?\\.ya?ml(\\.j2)?$', - ], - }, - commitMessageTopic: '{{depName}}', - commitMessageExtra: 'to {{newVersion}}', - commitMessageSuffix: '', - packageRules: [ - { - description: [ - 'Auto merge Github Actions', - ], - matchManagers: [ - 'github-actions', - ], - automerge: true, - automergeType: 'branch', - ignoreTests: true, - matchUpdateTypes: [ - 'minor', - 'patch', - ], - }, - { - description: [ - 'Flux Group', - ], - groupName: 'Flux', - matchDatasources: [ - 'docker', - 'github-tags', - ], - versioning: 'semver', - group: { - commitMessageTopic: '{{{groupName}}} group', - }, - separateMinorPatch: true, - matchPackageNames: [ - '/flux/', - ], - }, - { - description: [ - 'System Upgrade Controller Group', - ], - groupName: 'System Upgrade Controller', - matchDatasources: [ - 'docker', - 'github-releases', - ], - group: { - commitMessageTopic: '{{{groupName}}} group', - }, - separateMinorPatch: true, - matchPackageNames: [ - '/system-upgrade-controller/', - ], - }, - { - description: [ - 'Use custom versioning for k3s', - ], - matchDatasources: [ - 'github-releases', - ], - versioning: 'regex:^v(?\\d+)\\.(?\\d+)\\.(?\\d+)(?\\+k.s)\\.?(?\\d+)$', - matchPackageNames: [ - '/k3s/', - ], - }, - { - matchDatasources: [ - 'helm', - ], - commitMessageTopic: 'chart {{depName}}', - }, - { - matchDatasources: [ - 'docker', - ], - commitMessageTopic: 'image {{depName}}', - }, - { - matchDatasources: [ - 'docker', - ], - matchUpdateTypes: [ - 'major', - ], - commitMessagePrefix: 'feat(container)!: ', - }, - { - matchDatasources: [ - 'docker', - ], - matchUpdateTypes: [ - 'minor', - ], - semanticCommitType: 'feat', - semanticCommitScope: 'container', - }, - { - matchDatasources: [ - 'docker', - ], - matchUpdateTypes: [ - 'patch', - ], - semanticCommitType: 'fix', - semanticCommitScope: 'container', - }, - { - matchDatasources: [ - 'docker', - ], - matchUpdateTypes: [ - 'digest', - ], - semanticCommitType: 'chore', - semanticCommitScope: 'container', - }, - { - matchDatasources: [ - 'helm', - ], - matchUpdateTypes: [ - 'major', - ], - commitMessagePrefix: 'feat(helm)!: ', - }, - { - matchDatasources: [ - 'helm', - ], - matchUpdateTypes: [ - 'minor', - ], - semanticCommitType: 'feat', - semanticCommitScope: 'helm', - }, - { - matchDatasources: [ - 'helm', - ], - matchUpdateTypes: [ - 'patch', - ], - semanticCommitType: 'fix', - semanticCommitScope: 'helm', - }, - { - matchDatasources: [ - 'galaxy', - 'galaxy-collection', - ], - matchUpdateTypes: [ - 'major', - ], - commitMessagePrefix: 'feat(ansible)!: ', - }, - { - matchDatasources: [ - 'galaxy', - 'galaxy-collection', - ], - matchUpdateTypes: [ - 'minor', - ], - semanticCommitType: 'feat', - semanticCommitScope: 'ansible', - }, - { - matchDatasources: [ - 'galaxy', - 'galaxy-collection', - ], - matchUpdateTypes: [ - 'patch', - ], - semanticCommitType: 'fix', - semanticCommitScope: 'ansible', - }, - { - matchDatasources: [ - 'github-releases', - 'github-tags', - ], - matchUpdateTypes: [ - 'major', - ], - commitMessagePrefix: 'feat(github-release)!: ', - }, - { - matchDatasources: [ - 'github-releases', - 'github-tags', - ], - matchUpdateTypes: [ - 'minor', - ], - semanticCommitType: 'feat', - semanticCommitScope: 'github-release', - }, - { - matchDatasources: [ - 'github-releases', - 'github-tags', - ], - matchUpdateTypes: [ - 'patch', - ], - semanticCommitType: 'fix', - semanticCommitScope: 'github-release', - }, - { - matchManagers: [ - 'github-actions', - ], - matchUpdateTypes: [ - 'major', - ], - commitMessagePrefix: 'feat(github-action)!: ', - }, - { - matchManagers: [ - 'github-actions', - ], - matchUpdateTypes: [ - 'minor', - ], - semanticCommitType: 'feat', - semanticCommitScope: 'github-action', - }, - { - matchManagers: [ - 'github-actions', - ], - matchUpdateTypes: [ - 'patch', - ], - semanticCommitType: 'fix', - semanticCommitScope: 'github-action', - }, - { - matchUpdateTypes: [ - 'major', - ], - labels: [ - 'type/major', - ], - }, - { - matchUpdateTypes: [ - 'minor', - ], - labels: [ - 'type/minor', - ], - }, - { - matchUpdateTypes: [ - 'patch', - ], - labels: [ - 'type/patch', - ], - }, - { - matchDatasources: [ - 'docker', - ], - addLabels: [ - 'renovate/container', - ], - }, - { - matchDatasources: [ - 'helm', - ], - addLabels: [ - 'renovate/helm', - ], - }, - { - matchDatasources: [ - 'galaxy', - 'galaxy-collection', - ], - addLabels: [ - 'renovate/ansible', - ], - }, - { - matchDatasources: [ - 'github-releases', - 'github-tags', - ], - addLabels: [ - 'renovate/github-release', - ], - }, - { - matchManagers: [ - 'github-actions', - ], - addLabels: [ - 'renovate/github-action', - ], - }, - ], - customManagers: [ - { - customType: 'regex', - description: [ - 'Process custom dependencies', - ], - fileMatch: [ - '(^|/)ansible/.+\\.ya?ml(\\.j2)?$', - '(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$', - ], - matchStrings: [ - '(?m:# renovate: datasource=(?\\S+) depName=(?\\S+)( repository=(?\\S+))?\\n.+?: "?(?\\S+?)"?$)', - '(?m:# renovate: datasource=(?\\S+) depName=(?\\S+)\\n.+?/(?(v|\\d)[^/]+)\\S+$)', - ], - datasourceTemplate: '{{#if datasource}}{{{datasource}}}{{else}}github-releases{{/if}}', - }, - ], + "kubernetes": { + "fileMatch": [ + "(^|/)kubernetes/.+\\.ya?ml$" + ] + } }