feat(renovate): per-cluster PRs, commit message, cleanup

This commit is contained in:
JJGadgets
2024-12-04 16:55:39 +08:00
parent 31d67ea862
commit 17182de54d
6 changed files with 53 additions and 100 deletions

14
.renovate/clusters.json5 Normal file
View File

@@ -0,0 +1,14 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"matchFileNames": ["**/clusters/**"],
"additionalBranchPrefix": ["{{ lookup (split (lookup (split packageFileDir 'clusters/') 1) '/') 0 }}/"]
}
//{
// "matchFileNames": ["kube/clusters/**"],
// "additionalBranchPrefix": ["{{ lookup (split packageFileDir '/') 2 }}/"]
//}
]
}

View File

@@ -1,16 +1,46 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "to {{newVersion}}",
"commitMessageTopic": "",
"semanticCommitScope": "{{datasource}}/{{depName}}",
"commitMessageExtra": "{{oldVersion}} ➼ {{newVersion}}",
"commitMessageSuffix": "",
"packageRules": [
{
"matchDatasources": ["helm"],
"commitMessageTopic": "chart {{depName}}"
"matchDatasources": ["docker", "helm"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat({{datasource}}/{{depName}})!: "
},
{
"matchDatasources": ["docker"],
"commitMessageTopic": "image {{depName}}"
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat"
},
{
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix"
},
{
"matchUpdateTypes": ["digest"],
"semanticCommitType": "chore"
},
{
"matchDatasources": ["github-releases", "github-tags"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(github/{{depName}})!: "
},
{
"matchDatasources": ["github-releases", "github-tags"],
"matchUpdateTypes": ["minor", "patch"],
"semanticCommitScope": "github/{{depName}}"
},
{
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(gha/{{depName}})!: "
},
{
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["minor", "patch"],
"semanticCommitScope": "gha/{{depName}}"
}
]
}
}

View File

@@ -26,7 +26,7 @@
},
{
"matchDatasources": ["docker"],
"addLabels": ["oci/registry/{{ lookup (split depName '/') 0 }}", "oci/owner/{{ lookup (split depName '/') 1 }}", "oci/image/{{ lookup (split depName '/') 2 }}"]
"addLabels": ["oci/registry/{{ lookup (split depName '/') 0 }}", "oci/owner/{{ lookup (split depName '/') 1 }}", "oci/image/{{ lookup (split depName '/') 2 }}{{ lookup (split depName '/') 3 }}{{ lookup (split depName '/') 4 }}"]
},
{
"addLabels": ["{{#if isVulnerabilityAlert}}security/{{vulnerabilitySeverity}}{{/if}}"]

View File

@@ -1,79 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"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": ["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"
}
]
}

View File

@@ -1,11 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"description": ["Custom versioning for VyOS build"],
"matchDatasources": ["github-tags"],
"versioning": "regex:^v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)((?<compatibility>\\-epa)(?<build>\\d+))?$",
"matchPackagePatterns": ["vyos"]
}
]
}

View File

@@ -12,12 +12,11 @@
":automergeDigest",
":automergeBranch",
":timezone(Asia/Singapore)",
"github>JJGadgets/Biohazard//.renovate/clusters.json5",
"github>JJGadgets/Biohazard//.renovate/commitMessage.json5",
"github>JJGadgets/Biohazard//.renovate/groups.json5",
"github>JJGadgets/Biohazard//.renovate/labels.json5",
"github>JJGadgets/Biohazard//.renovate/semanticCommits.json5",
"github>JJGadgets/Biohazard//.renovate/security.json5",
"github>JJGadgets/Biohazard//.renovate/vyos.json5",
"security:openssf-scorecard",
"helpers:pinGitHubActionDigests"
],