From f7ff69ecd3fefc7fb41f499dbe1107b0e72e1f8e Mon Sep 17 00:00:00 2001 From: auricom <27022259+auricom@users.noreply.github.com> Date: Mon, 27 Jun 2022 11:48:07 +0200 Subject: [PATCH] feat: update renovate configuration --- .github/renovate.json5 | 69 ++---- .github/renovate/groups.json | 54 +++++ .github/renovate/semanticCommits.json | 201 +++++++++++------- .../inventory/group_vars/all/k3s-settings.yml | 1 + 4 files changed, 197 insertions(+), 128 deletions(-) create mode 100644 .github/renovate/groups.json diff --git a/.github/renovate.json5 b/.github/renovate.json5 index ea3c49182..1e6482173 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -58,45 +58,37 @@ ] }, "regexManagers": [ - // regexManager to read and process cert-manager CRD's { - "fileMatch": [ - "cluster/base-custom/crds/cert-manager/.+\\.yaml$" - ], + "description": "Process CRD dependencies", + "fileMatch": ["cluster/base-custom/crds/.+\\.ya?ml$"], "matchStrings": [ - "registryUrl=(?.*?) chart=(?.*?)\n.*\\/(?.*?)\\/", + // GitRepository where 'Git release/tag' matches 'Helm' version + "registryUrl=(?\\S+) chart=(?\\S+)\n.*?(?[^-\\s]*)\n", + // Kustomization where 'GitHub release artifact URL' matches 'Docker image' version + "datasource=(?\\S+) image=(?\\S+)\n.*?-\\s(.*?)\/(?[^/]+)\/[^/]+\n" ], - "datasourceTemplate": "helm" + "datasourceTemplate": "{{#if datasource}}{{{datasource}}}{{else}}helm{{/if}}" }, - // regexManager to read and process External Snapshotter CRDs { + "description": "Process various dependencies", "fileMatch": [ - "cluster/crds/external-snapshotter/.+\\.yaml$", + "ansible/.+\\.ya?ml$", + "cluster/.+\\.ya?ml$" ], "matchStrings": [ - "datasource=(?.*?)\n *url: https:\/\/github\\.com\/(?.*?)\\.git\n *ref:\n *tag: (?.*)\n" + "datasource=(?\\S+) depName=(?\\S+)( versioning=(?\\S+))?\n.*?\"(?.*)\"\n" ], - "datasourceTemplate": "github-releases" + "datasourceTemplate": "{{#if datasource}}{{{datasource}}}{{else}}github-releases{{/if}}", + "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}" }, - // regexManager to read and process kube-prometheus-stack CRDs { - "fileMatch": [ - "cluster/base-custom/crds/kube-prometheus-stack/.+\\.yaml$" - ], + "description": "Process raw GitHub URLs", + "fileMatch": ["cluster/.+\\.ya?ml$"], "matchStrings": [ - "registryUrl=(?.*?)\n *tag: (?[a-zA-Z-]+)-(?.*)\n" + "https:\\/\\/raw.githubusercontent.com\\/(?[\\w\\d\\-_]+\\/[\\w\\d\\-_]+)\\/(?[\\w\\d\\.\\-_]+)\\/.*" ], - "datasourceTemplate": "helm" - }, - // regexManager to read and process Rook-Ceph CRD's - { - "fileMatch": [ - "cluster/base-custom/crds/rook-ceph/.+\\.yaml$" - ], - "matchStrings": [ - "registryUrl=(?.*?) chart=(?.*?)\n *tag: (?.*)\n", - ], - "datasourceTemplate": "helm", + "datasourceTemplate": "github-releases", + "versioningTemplate": "semver" } ], "packageRules": [ @@ -158,31 +150,6 @@ ], "versioning": "regex:^version-(?\\d+)\\.(?\\d+)\\.(?\\d+)$", "matchPackageNames": ["ghcr.io/linuxserver/resilio-sync"] - }, - // group packages - { - "matchDatasources": [ - "helm", - "docker" - ], - "matchPackagePatterns": [ - "^rook.ceph" - ], - "groupName": "rook-ceph-suite", - "additionalBranchPrefix": "", - "separateMinorPatch": true - }, - { - "matchDatasources": [ - "github-tags", - "docker" - ], - "matchPackagePatterns": [ - "rancher/system-upgrade-controller" - ], - "groupName": "system-upgrade-controller-suite", - "additionalBranchPrefix": "", - "separateMinorPatch": true } ] } \ No newline at end of file diff --git a/.github/renovate/groups.json b/.github/renovate/groups.json new file mode 100644 index 000000000..cc3ff23f5 --- /dev/null +++ b/.github/renovate/groups.json @@ -0,0 +1,54 @@ +{ + "packageRules": [ + { + "description": "Cert-Manager image (for CRDs) and chart", + "groupName": "Cert-Manager", + "matchPackagePatterns": ["cert-manager"], + "matchDatasources": ["docker", "helm"], + "group": { "commitMessageTopic": "{{{groupName}}} group" }, + "separateMinorPatch": true + }, + { + "description": "External Snapshotter kustomization (for CRDs) and chart", + "groupName": "External Snapshotter", + "matchPackagePatterns": ["external-snapshotter", "snapshot-controller"], + "matchDatasources": ["docker", "github-tags"], + "group": { "commitMessageTopic": "{{{groupName}}} group" }, + "separateMinorPatch": true + }, + { + "description": "Node Feature Discovery kustomization (for CRDs) and chart", + "groupName": "Node Feature Discovery", + "matchPackagePatterns": ["node-feature-discovery"], + "matchDatasources": ["helm", "github-tags"], + "group": { "commitMessageTopic": "{{{groupName}}} group" }, + "separateMinorPatch": true + }, + { + "description": "Rook-Ceph image and chart", + "groupName": "Rook-Ceph", + "matchPackagePatterns": ["rook.ceph"], + "matchDatasources": ["docker", "helm"], + "group": { "commitMessageTopic": "{{{groupName}}} group" }, + "separateMinorPatch": true + }, + { + "description": "Thanos image and chart - mismatched versions", + "groupName": "Thanos", + "matchPackagePatterns": ["thanos"], + "matchDatasources": ["docker", "github-releases", "helm"], + "matchUpdateTypes": ["minor", "patch"], + "group": { "commitMessageTopic": "{{{groupName}}} group" }, + "separateMinorPatch": false + }, + { + "description": "Vector image and chart - mismatched versions", + "groupName": "Vector", + "matchPackagePatterns": ["vector"], + "matchDatasources": ["docker", "github-releases", "helm"], + "matchUpdateTypes": ["minor", "patch"], + "group": { "commitMessageTopic": "{{{groupName}}} group" }, + "separateMinorPatch": false + } + ] + } \ No newline at end of file diff --git a/.github/renovate/semanticCommits.json b/.github/renovate/semanticCommits.json index 6ed51dba9..5c454b03c 100644 --- a/.github/renovate/semanticCommits.json +++ b/.github/renovate/semanticCommits.json @@ -1,78 +1,125 @@ { - "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": ["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": ["terraform-provider"], - "matchUpdateTypes": ["major"], - "commitMessagePrefix": "feat(terraform)!: " - }, - { - "matchDatasources": ["terraform-provider"], - "matchUpdateTypes": ["minor"], - "semanticCommitType": "feat", - "semanticCommitScope": "terraform" - }, - { - "matchDatasources": ["terraform-provider"], - "matchUpdateTypes": ["patch"], - "semanticCommitType": "fix", - "semanticCommitScope": "terraform" - }, - { - "matchManagers": ["github-actions"], - "semanticCommitType": "ci" - } - ] - } \ No newline at end of file + "packageRules": [ + { + "matchDatasources": ["docker"], + "matchUpdateTypes": ["major"], + "commitMessagePrefix": "feat(container)!: " + }, + { + "matchDatasources": ["docker"], + "matchUpdateTypes": ["minor"], + "semanticCommitType": "feat", + "semanticCommitScope": "container" + }, + { + "matchDatasources": ["docker"], + "matchUpdateTypes": ["digest", "patch"], + "semanticCommitType": "fix", + "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": ["terraform-provider"], + "matchUpdateTypes": ["major"], + "commitMessagePrefix": "feat(terraform)!: " + }, + { + "matchDatasources": ["terraform-provider"], + "matchUpdateTypes": ["minor"], + "semanticCommitType": "feat", + "semanticCommitScope": "terraform" + }, + { + "matchDatasources": ["terraform-provider"], + "matchUpdateTypes": ["patch"], + "semanticCommitType": "fix", + "semanticCommitScope": "terraform" + }, + { + "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" + }, + { + "matchDatasources": ["pypi"], + "matchUpdateTypes": ["major"], + "commitMessagePrefix": "feat(pip)!: " + }, + { + "matchDatasources": ["pypi"], + "matchUpdateTypes": ["minor"], + "semanticCommitType": "feat", + "semanticCommitScope": "pip" + }, + { + "matchDatasources": ["pypi"], + "matchUpdateTypes": ["patch"], + "semanticCommitType": "fix", + "semanticCommitScope": "pip" + } + ] +} diff --git a/server/ansible/inventory/group_vars/all/k3s-settings.yml b/server/ansible/inventory/group_vars/all/k3s-settings.yml index 19bc449b4..5c71c4f77 100644 --- a/server/ansible/inventory/group_vars/all/k3s-settings.yml +++ b/server/ansible/inventory/group_vars/all/k3s-settings.yml @@ -5,6 +5,7 @@ # # Use a specific version of k3s +# renovate: datasource=github-releases depName=k3s-io/k3s k3s_release_version: "v1.21.3+k3s1" # Install using hard links rather than symbolic links.