From 0360d0bda70b16050fc5dca3e4cb277c0df6140a Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Fri, 8 Dec 2023 15:13:06 -0500 Subject: [PATCH] chore: move grafana dashboard into own reno file Signed-off-by: Devin Buhl --- .github/renovate.json5 | 2 +- .github/renovate/commitMessage.json5 | 5 ---- .github/renovate/customDatasources.json5 | 12 -------- .github/renovate/customManagers.json5 | 12 -------- .github/renovate/grafanaDashboards.json5 | 37 ++++++++++++++++++++++++ .github/renovate/labels.json5 | 4 --- .github/renovate/semanticCommits.json5 | 6 ---- 7 files changed, 38 insertions(+), 40 deletions(-) delete mode 100644 .github/renovate/customDatasources.json5 create mode 100644 .github/renovate/grafanaDashboards.json5 diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 1fcfd23065606..28ef325b7d636 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -17,8 +17,8 @@ "github>onedr0p/home-ops//.github/renovate/autoMerge.json5", "github>onedr0p/home-ops//.github/renovate/clusters.json5", "github>onedr0p/home-ops//.github/renovate/commitMessage.json5", - "github>onedr0p/home-ops//.github/renovate/customDatasources.json5", "github>onedr0p/home-ops//.github/renovate/customManagers.json5", + "github>onedr0p/home-ops//.github/renovate/grafanaDashboards.json5", "github>onedr0p/home-ops//.github/renovate/groups.json5", "github>onedr0p/home-ops//.github/renovate/labels.json5", "github>onedr0p/home-ops//.github/renovate/packageRules.json5", diff --git a/.github/renovate/commitMessage.json5 b/.github/renovate/commitMessage.json5 index ec34fdb01e5e6..3fea628721bd0 100644 --- a/.github/renovate/commitMessage.json5 +++ b/.github/renovate/commitMessage.json5 @@ -11,11 +11,6 @@ { "matchDatasources": ["docker"], "commitMessageTopic": "image {{depName}}" - }, - { - "matchDatasources": ["custom.grafana-dashboards"], - "commitMessageTopic": "dashboard {{depName}}", - "commitMessageExtra": "to revision {{newVersion}}" } ] } diff --git a/.github/renovate/customDatasources.json5 b/.github/renovate/customDatasources.json5 deleted file mode 100644 index 0c15007fda8dd..0000000000000 --- a/.github/renovate/customDatasources.json5 +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "customDatasources": { - "grafana-dashboards": { - "defaultRegistryUrlTemplate": "https://grafana.com/api/dashboards/{{packageName}}", - "format": "json", - "transformTemplates": [ - "{\"releases\":[{\"version\": $string(revision)}]}" - ] - } - } -} diff --git a/.github/renovate/customManagers.json5 b/.github/renovate/customManagers.json5 index 9c72e4819b494..d096a07e69153 100644 --- a/.github/renovate/customManagers.json5 +++ b/.github/renovate/customManagers.json5 @@ -33,18 +33,6 @@ ], "datasourceTemplate": "docker", "versioningTemplate": "redhat" - }, - { - "customType": "regex", - "description": "Process Grafana dashboards", - "fileMatch": [ - "(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$" - ], - "matchStrings": [ - "depName=\"(?\\S+)\"\\n.*?gnetId: (?\\d+)\\n.*?revision: (?\\d+)" - ], - "datasourceTemplate": "custom.grafana-dashboards", - "versioningTemplate": "regex:^(?\\d+)$" } ] } diff --git a/.github/renovate/grafanaDashboards.json5 b/.github/renovate/grafanaDashboards.json5 new file mode 100644 index 0000000000000..97deafa5056e4 --- /dev/null +++ b/.github/renovate/grafanaDashboards.json5 @@ -0,0 +1,37 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "customDatasources": { + "grafana-dashboards": { + "defaultRegistryUrlTemplate": "https://grafana.com/api/dashboards/{{packageName}}", + "format": "json", + "transformTemplates": [ + "{\"releases\":[{\"version\": $string(revision)}]}" + ] + } + }, + "customManagers": [ + { + "customType": "regex", + "description": "Process Grafana dashboards", + "fileMatch": [ + "(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$" + ], + "matchStrings": [ + "depName=\"(?\\S+)\"\\n.*?gnetId: (?\\d+)\\n.*?revision: (?\\d+)" + ], + "datasourceTemplate": "custom.grafana-dashboards", + "versioningTemplate": "regex:^(?\\d+)$" + } + ], + "packageRules": [ + { + "addLabels": ["renovate/grafana-dashboard"], + "commitMessageExtra": "to revision {{newVersion}}", + "commitMessageTopic": "dashboard {{depName}}", + "matchDatasources": ["grafana-dashboards", "custom.grafana-dashboards"], + "matchUpdateTypes": ["major"], + "semanticCommitScope": "grafana-dashboards", + "semanticCommitType": "chore" + } + ] +} diff --git a/.github/renovate/labels.json5 b/.github/renovate/labels.json5 index 485b2529bfc41..e359566bdbde9 100644 --- a/.github/renovate/labels.json5 +++ b/.github/renovate/labels.json5 @@ -44,10 +44,6 @@ { "matchDatasources": ["pypi"], "addLabels": ["renovate/pip"] - }, - { - "matchDatasources": ["grafana-dashboards", "custom.grafana-dashboards"], - "addLabels": ["renovate/grafana-dashboard"] } ] } diff --git a/.github/renovate/semanticCommits.json5 b/.github/renovate/semanticCommits.json5 index 334e5e306a7fc..62a3d7c0107ce 100644 --- a/.github/renovate/semanticCommits.json5 +++ b/.github/renovate/semanticCommits.json5 @@ -110,12 +110,6 @@ "matchUpdateTypes": ["patch"], "semanticCommitType": "fix", "semanticCommitScope": "github-action" - }, - { - "matchDatasources": ["custom.grafana-dashboards"], - "matchUpdateTypes": ["major"], - "semanticCommitType": "chore", - "semanticCommitScope": "grafana-dashboards" } ] }