Skip to content

Commit

Permalink
chore: move grafana dashboard into own reno file
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Dec 8, 2023
1 parent 0d804f1 commit 0360d0b
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 0 additions & 5 deletions .github/renovate/commitMessage.json5
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
{
"matchDatasources": ["docker"],
"commitMessageTopic": "image {{depName}}"
},
{
"matchDatasources": ["custom.grafana-dashboards"],
"commitMessageTopic": "dashboard {{depName}}",
"commitMessageExtra": "to revision {{newVersion}}"
}
]
}
12 changes: 0 additions & 12 deletions .github/renovate/customDatasources.json5

This file was deleted.

12 changes: 0 additions & 12 deletions .github/renovate/customManagers.json5
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@
],
"datasourceTemplate": "docker",
"versioningTemplate": "redhat"
},
{
"customType": "regex",
"description": "Process Grafana dashboards",
"fileMatch": [
"(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$"
],
"matchStrings": [
"depName=\"(?<depName>\\S+)\"\\n.*?gnetId: (?<packageName>\\d+)\\n.*?revision: (?<currentValue>\\d+)"
],
"datasourceTemplate": "custom.grafana-dashboards",
"versioningTemplate": "regex:^(?<major>\\d+)$"
}
]
}
37 changes: 37 additions & 0 deletions .github/renovate/grafanaDashboards.json5
Original file line number Diff line number Diff line change
@@ -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=\"(?<depName>\\S+)\"\\n.*?gnetId: (?<packageName>\\d+)\\n.*?revision: (?<currentValue>\\d+)"
],
"datasourceTemplate": "custom.grafana-dashboards",
"versioningTemplate": "regex:^(?<revision>\\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"
}
]
}
4 changes: 0 additions & 4 deletions .github/renovate/labels.json5
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
{
"matchDatasources": ["pypi"],
"addLabels": ["renovate/pip"]
},
{
"matchDatasources": ["grafana-dashboards", "custom.grafana-dashboards"],
"addLabels": ["renovate/grafana-dashboard"]
}
]
}
6 changes: 0 additions & 6 deletions .github/renovate/semanticCommits.json5
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "github-action"
},
{
"matchDatasources": ["custom.grafana-dashboards"],
"matchUpdateTypes": ["major"],
"semanticCommitType": "chore",
"semanticCommitScope": "grafana-dashboards"
}
]
}

0 comments on commit 0360d0b

Please sign in to comment.