feat: renovate

This commit is contained in:
auricom
2022-09-12 22:09:33 +02:00
parent 0e046ad9ab
commit 5e5985997c
7 changed files with 123 additions and 95 deletions

149
.github/renovate.json5 vendored
View File

@@ -1,123 +1,118 @@
{ {
extends: [ "extends": [
":enableRenovate",
"config:base", "config:base",
"docker:enableMajor",
":disableRateLimiting", ":disableRateLimiting",
":dependencyDashboard", ":dependencyDashboard",
":semanticCommits", ":semanticCommits",
":separatePatchReleases",
"docker:enableMajor",
":enablePreCommit", ":enablePreCommit",
"github>auricom/home-ops//.github/renovate/autoMerge", ":automergeDigest",
"github>auricom/home-ops//.github/renovate/groups", ":automergeBranchPush",
"github>auricom/home-ops//.github/renovate/labels", "github>auricom/home-ops//.github/renovate/autoMerge.json5",
"github>auricom/home-ops//.github/renovate/semanticCommits", "github>auricom/home-ops//.github/renovate/commitMessage.json5",
"github>auricom/home-ops//.github/renovate/groups.json5",
"github>auricom/home-ops//.github/renovate/labels.json5",
"github>auricom/home-ops//.github/renovate/semanticCommits.json5"
], ],
platform: "github", "platform": "github",
username: "feisar-bot[bot]", "username": "feisar-bot[bot]",
repositories: ["auricom/home-ops"], "repositories": ["auricom/home-ops"],
assignees: ["auricom"], "assignees": ["auricom"],
onboarding: false, "onboarding": false,
requireConfig: false, "requireConfig": false,
gitAuthor: "feisar-bot <feisar-bot[bot]@users.noreply.github.com>", "gitAuthor": "feisar-bot <feisar-bot[bot]@users.noreply.github.com>",
dependencyDashboardTitle: "Renovate Dashboard 🤖", "dependencyDashboardTitle": "Renovate Dashboard 🤖",
suppressNotifications: ["prIgnoreNotification"], "suppressNotifications": ["prIgnoreNotification"],
rebaseWhen: "conflicted", "rebaseWhen": "conflicted",
ignorePaths: [ "commitBodyTable": true,
"ignorePaths": [
"cluster/base/", "cluster/base/",
"**/backup-job.yaml", "**/backup-job.yaml",
"**/trash-updater-job.yaml", "**/trash-updater-job.yaml"
"**/travelstories/**",
], ],
// set up renovate managers // set up renovate managers
"docker-compose": { "docker-compose": {
fileMatch: [ "fileMatch": ["ansible/.+/docker-compose.*\\.ya?ml(\\.j2)?$"]
"(^|/)docker-compose.*.ya?ml$", },
"(^|/)docker-compose.*.ya?ml.j2$", "flux": {
], "fileMatch": ["cluster/.+\\.ya?ml$"]
}, },
"helm-values": { "helm-values": {
fileMatch: ["cluster/.+/helm-release\\.yaml$"], "fileMatch": ["cluster/.+\\.ya?ml$"]
}, },
helmv3: { "kubernetes": {
fileMatch: ["charts/.+/Chart\\.yaml$"], "fileMatch": ["cluster/.+\\.ya?ml$"]
}, },
kubernetes: { "regexManagers": [
fileMatch: ["cluster/.+\\.yaml$"],
},
flux: {
fileMatch: ["cluster/.+\\.yaml$"],
},
regexManagers: [
{ {
description: "Process CRD dependencies", "description": "Process CRD dependencies",
fileMatch: ["cluster/configuration/crds/.+\\.ya?ml$"], "fileMatch": ["cluster/.+\\.ya?ml$"],
matchStrings: [ "matchStrings": [
// GitRepository where 'Git release/tag' matches 'Helm' version // GitRepository where 'Git release/tag' matches 'Helm' version
"registryUrl=(?<registryUrl>\\S+) chart=(?<depName>\\S+)\n.*?(?<currentValue>[^-\\s]*)\n", "registryUrl=(?<registryUrl>\\S+) chart=(?<depName>\\S+)\n.*?(?<currentValue>[^-\\s]*)\n",
// Kustomization where 'GitHub release artifact URL' matches 'Docker image' version // Kustomization where 'GitHub release artifact URL' matches 'Docker image' version
"datasource=(?<datasource>\\S+) image=(?<depName>\\S+)\n.*?-\\s(.*?)/(?<currentValue>[^/]+)/[^/]+\n", "datasource=(?<datasource>\\S+) image=(?<depName>\\S+)\n.*?-\\s(.*?)/(?<currentValue>[^/]+)/[^/]+\n"
], ],
datasourceTemplate: "{{#if datasource}}{{{datasource}}}{{else}}helm{{/if}}", "datasourceTemplate": "{{#if datasource}}{{{datasource}}}{{else}}helm{{/if}}"
}, },
{ {
description: "Process various dependencies", "description": "Process various dependencies",
fileMatch: ["ansible/.+\\.ya?ml$", "cluster/.+\\.ya?ml$"], "fileMatch": ["ansible/.+\\.ya?ml$", "cluster/.+\\.ya?ml$"],
matchStrings: [ "matchStrings": [
'datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)( versioning=(?<versioning>\\S+))?\n.*?"(?<currentValue>.*)"\n', "datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)( versioning=(?<versioning>\\S+))?\n.*?\"(?<currentValue>.*)\"\n"
], ],
datasourceTemplate: "{{#if datasource}}{{{datasource}}}{{else}}github-releases{{/if}}", "datasourceTemplate": "{{#if datasource}}{{{datasource}}}{{else}}github-releases{{/if}}",
versioningTemplate: "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}", "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
}, },
{ {
description: "Process raw GitHub URLs", "description": "Process raw GitHub URLs",
fileMatch: ["cluster/.+\\.ya?ml$"], "fileMatch": ["cluster/.+\\.ya?ml$"],
matchStrings: [ "matchStrings": [
"https:\\/\\/raw.githubusercontent.com\\/(?<depName>[\\w\\d\\-_]+\\/[\\w\\d\\-_]+)\\/(?<currentValue>[\\w\\d\\.\\-_]+)\\/.*", "https:\\/\\/raw.githubusercontent.com\\/(?<depName>[\\w\\d\\-_]+\\/[\\w\\d\\-_]+)\\/(?<currentValue>[\\w\\d\\.\\-_]+)\\/.*"
], ],
datasourceTemplate: "github-releases", "datasourceTemplate": "github-releases",
versioningTemplate: "semver", "versioningTemplate": "semver"
}, }
], ],
packageRules: [ "packageRules": [
// setup datasources // setup datasources
{ {
matchDatasources: ["helm"], "matchDatasources": ["helm"],
ignoreDeprecated: true, "ignoreDeprecated": true
}, },
{ {
matchDatasources: ["docker"], "matchDatasources": ["docker"],
commitMessageExtra: "to {{newVersion}}", "commitMessageExtra": "to {{newVersion}}"
}, },
// custom versioning // custom versioning
{ {
matchDatasources: ["docker"], "matchDatasources": ["docker"],
versioning: "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-(?<compatibility>.*)$", "versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-(?<compatibility>.*)$",
matchPackageNames: ["blakeblackshear/frigate"], "matchPackageNames": ["blakeblackshear/frigate"]
}, },
{ {
matchDatasources: ["docker"], "matchDatasources": ["docker"],
versioning: "regex:^RELEASE\\.(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)T.*Z(-(?<compatibility>.*))?$", "versioning": "regex:^RELEASE\\.(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)T.*Z(-(?<compatibility>.*))?$",
matchPackageNames: ["quay.io/minio/minio"], "matchPackageNames": ["quay.io/minio/minio"]
}, },
{ {
matchDatasources: ["docker"], "matchDatasources": ["docker"],
versioning: "loose", "versioning": "loose",
matchPackageNames: ["ghcr.io/k8s-at-home/qbittorrent"], "matchPackageNames": ["ghcr.io/k8s-at-home/qbittorrent"]
}, },
{ {
matchDatasources: ["docker"], "matchDatasources": ["docker"],
versioning: "regex:^version-v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$", "versioning": "regex:^version-v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$",
matchPackageNames: [ "matchPackageNames": [
"ghcr.io/linuxserver/bookstack", "ghcr.io/linuxserver/bookstack",
"ghcr.io/linuxserver/calibre", "ghcr.io/linuxserver/calibre",
"ghcr.io/linuxserver/healthchecks", "ghcr.io/linuxserver/healthchecks"
], ]
}, },
{ {
matchDatasources: ["docker"], "matchDatasources": ["docker"],
versioning: "regex:^version-(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$", "versioning": "regex:^version-(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$",
matchPackageNames: ["ghcr.io/linuxserver/resilio-sync"], "matchPackageNames": ["ghcr.io/linuxserver/resilio-sync"]
}, }
], ]
} }

View File

@@ -1,16 +0,0 @@
{
"packageRules": [
{
"matchDatasources": ["docker", "github-tags"],
"automerge": true,
"automergeType": "branch",
"requiredStatusChecks": null,
"matchUpdateTypes": ["minor", "patch"],
"matchPackageNames": [
"ghcr.io/k8s-at-home/prowlarr-nightly",
"renovatebot/github-action",
"oxsecurity/megalinter"
]
}
]
}

34
.github/renovate/autoMerge.json5 vendored Normal file
View File

@@ -0,0 +1,34 @@
{
"packageRules": [
{
"description": "Auto merge container digests",
"matchDatasources": ["docker"],
"automerge": true,
"automergeType": "branch",
"requiredStatusChecks": null,
"matchUpdateTypes": ["digest"],
"matchPackagePattern": ["ghcr.io/k8s-at-home", "ghcr.io/auricom"]
},
{
"description": "Auto merge containers",
"matchDatasources": ["docker"],
"automerge": true,
"automergeType": "branch",
"requiredStatusChecks": null,
"matchUpdateTypes": ["minor", "patch"],
"matchPackageNames": ["ghcr.io/onedr0p/prowlarr-nightly"]
},
{
"description": "Auto merge GitHub Actions",
"matchDatasources": ["github-tags"],
"automerge": true,
"automergeType": "branch",
"requiredStatusChecks": null,
"matchUpdateTypes": ["minor", "patch"],
"matchPackageNames": [
"lycheeverse/lychee-action",
"renovatebot/github-action"
]
}
]
}

15
.github/renovate/commitMessage.json5 vendored Normal file
View File

@@ -0,0 +1,15 @@
{
commitMessageTopic: "{{depName}}",
commitMessageExtra: "to {{newVersion}}",
commitMessageSuffix: "",
packageRules: [
{
matchDatasources: ["helm"],
commitMessageTopic: "chart {{depName}}",
},
{
matchDatasources: ["docker"],
commitMessageTopic: "image {{depName}}",
},
],
}

View File

@@ -35,6 +35,6 @@
{ {
"matchManagers": ["github-actions"], "matchManagers": ["github-actions"],
"addLabels": ["renovate/github-action"] "addLabels": ["renovate/github-action"]
} }
] ]
} }