Skip to content

Commit

Permalink
chore: prepare for multiple clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
martinohmann committed Apr 14, 2024
1 parent 9ca11c8 commit 10f6544
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 22 deletions.
9 changes: 9 additions & 0 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
area/ansible:
- changed-files:
- any-glob-to-any-file: ansible/**/*
area/docs:
- changed-files:
- any-glob-to-any-file: '*.md'
area/github:
- changed-files:
- any-glob-to-any-file: .github/**/*
Expand All @@ -11,3 +14,9 @@ area/kubernetes:
area/terraform:
- changed-files:
- any-glob-to-any-file: terraform/**/*
cluster/main:
- changed-files:
- any-glob-to-any-file: kubernetes/main/**/*
cluster/storage:
- changed-files:
- any-glob-to-any-file: kubernetes/storage/**/*
13 changes: 11 additions & 2 deletions .github/labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
color: "72ccf3"
description: >-
Changes made in the ansible directory
- name: area/docs
color: "0e8a16"
description: >-
Documentation changes
- name: area/github
color: "72ccf3"
description: >-
Expand All @@ -24,6 +28,11 @@
color: "72ccf3"
description: >-
Changes related to storage
# Clusters
- name: cluster/main
color: "ffc300"
- name: cluster/storage
color: "ffc300"
# Renovate
- name: renovate/ansible
color: "ffc300"
Expand All @@ -40,14 +49,14 @@
- name: renovate/terraform
color: "ffc300"
# Semantic Type
- name: type/digest
color: "ffeC19"
- name: type/patch
color: "ffec19"
- name: type/minor
color: "ff9800"
- name: type/major
color: "f6412d"
- name: type/break
color: "f6412d"
# Uncategorized
- name: bug
color: "ee0701"
Expand Down
1 change: 1 addition & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
":semanticCommits",
":timezone(Europe/Berlin)",
"github>martinohmann/home-ops//.github/renovate/autoMerge.json5",
"github>martinohmann/home-ops//.github/renovate/clusters.json5",
"github>martinohmann/home-ops//.github/renovate/commitMessage.json5",
"github>martinohmann/home-ops//.github/renovate/customDatasources.json5",
"github>martinohmann/home-ops//.github/renovate/customManagers.json5",
Expand Down
21 changes: 21 additions & 0 deletions .github/renovate/clusters.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"description": ["Separate PRs for main cluster"],
"matchFileNames": [
"**/kubernetes/main/**",
"**/ansible/kubernetes/**",
],
"additionalBranchPrefix": "main-"
},
{
"description": ["Separate PRs for storage cluster"],
"matchFileNames": [
"**/kubernetes/storage/**",
"**/ansible/storage/**",
],
"additionalBranchPrefix": "storage-"
}
]
}
4 changes: 4 additions & 0 deletions .github/renovate/labels.json5
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"matchUpdateTypes": ["patch"],
"labels": ["type/patch"]
},
{
"matchUpdateTypes": ["digest"],
"labels": ["type/digest"]
},
{
"matchDatasources": ["docker"],
"addLabels": ["renovate/container"]
Expand Down
80 changes: 60 additions & 20 deletions .github/renovate/semanticCommits.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,116 +4,156 @@
{
"matchDatasources": ["docker"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(container)!: "
"commitMessagePrefix": "feat(container)!: ",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": " ( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["docker"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat",
"semanticCommitScope": "container"
"semanticCommitScope": "container",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["docker"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "container"
"semanticCommitScope": "container",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["docker"],
"matchUpdateTypes": ["digest"],
"semanticCommitType": "chore",
"semanticCommitScope": "container"
"semanticCommitScope": "container",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentDigestShort}} → {{newDigestShort}} )"
},
{
"matchDatasources": ["helm"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(helm)!: "
"commitMessagePrefix": "feat(helm)!: ",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["helm"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat",
"semanticCommitScope": "helm"
"semanticCommitScope": "helm",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["helm"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "helm"
"semanticCommitScope": "helm",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["terraform-provider"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(terraform)!: "
"commitMessagePrefix": "feat(terraform)!: ",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["terraform-provider"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat",
"semanticCommitScope": "terraform"
"semanticCommitScope": "terraform",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["terraform-provider"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "terraform"
"semanticCommitScope": "terraform",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["galaxy", "galaxy-collection"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(ansible)!: "
"commitMessagePrefix": "feat(ansible)!: ",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["galaxy", "galaxy-collection"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat",
"semanticCommitScope": "ansible"
"semanticCommitScope": "ansible",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["galaxy", "galaxy-collection"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "ansible"
"semanticCommitScope": "ansible",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["github-releases", "github-tags"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(github-release)!: "
"commitMessagePrefix": "feat(github-release)!: ",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["github-releases", "github-tags"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat",
"semanticCommitScope": "github-release"
"semanticCommitScope": "github-release",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["github-releases", "github-tags"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "github-release"
"semanticCommitScope": "github-release",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(github-action)!: "
"commitMessagePrefix": "feat(github-action)!: ",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat",
"semanticCommitScope": "github-action"
"semanticCommitScope": "github-action",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "github-action"
"semanticCommitScope": "github-action",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
},
{
"matchDatasources": ["custom.grafana-dashboards"],
"matchUpdateTypes": ["major"],
"semanticCommitType": "chore",
"semanticCommitScope": "grafana-dashboards"
"semanticCommitScope": "grafana-dashboards",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "( {{currentVersion}} → {{newVersion}} )"
}
]
}

0 comments on commit 10f6544

Please sign in to comment.