feat(ci): handle renovate container bumping from within renovate

This commit is contained in:
Kjeld Schouten 2023-11-18 14:55:04 +01:00
parent b7a2e4945f
commit 118c905bfb
1 changed files with 69 additions and 11 deletions

View File

@ -5,19 +5,77 @@ module.exports = {
onboarding: false, onboarding: false,
platform: "github", platform: "github",
repositories: ["truecharts/charts"], repositories: ["truecharts/charts"],
allowPostUpgradeCommandTemplating: true,
allowedPostUpgradeCommands: ["^.*"],
regexManagers: [
{
fileMatch: ["(^|/)Chart\\.yaml$"],
matchStrings: [
'#\\s?renovate: image=(?<depName>.*?)\\s?appVersion:\\s?\\"?(?<currentValue>[\\w+\\.\\-]*)',
],
datasourceTemplate: "docker",
},
],
packageRules: [ packageRules: [
{ {
description: "lockFileMaintenance", matchManagers: ["helm-requirements", "helm-values", "regex"],
matchUpdateTypes: [ datasources: ["docker"],
"pin", matchUpdateTypes: ["major"],
"digest", postUpgradeTasks: {
"patch", commands: [
"minor", `version=$(grep '^version:' {{{parentDir}}}/Chart.yaml | awk '{print $2}')
"major", major=$(echo $version | cut -d. -f1)
"lockFileMaintenance", minor=$(echo $version | cut -d. -f2)
], patch=$(echo $version | cut -d. -f3)
dependencyDashboardApproval: false, major=$(expr $minor + 1)
stabilityDays: 0, echo "Replacing $version with $major.$minor.$patch"
sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" {{{parentDir}}}/Chart.yaml
cat {{{parentDir}}}/Chart.yaml
`,
],
},
fileFilters: ["**/Chart.yaml"],
executionMode: "branch",
},
{
matchManagers: ["helm-requirements", "helm-values", "regex"],
datasources: ["docker"],
matchUpdateTypes: ["minor"],
postUpgradeTasks: {
commands: [
`version=$(grep '^version:' {{{parentDir}}}/Chart.yaml | awk '{print $2}')
major=$(echo $version | cut -d. -f1)
minor=$(echo $version | cut -d. -f2)
patch=$(echo $version | cut -d. -f3)
minor=$(expr $minor + 1)
echo "Replacing $version with $major.$minor.$patch"
sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" {{{parentDir}}}/Chart.yaml
cat {{{parentDir}}}/Chart.yaml
`,
],
},
fileFilters: ["**/Chart.yaml"],
executionMode: "branch",
},
{
matchManagers: ["helm-requirements", "helm-values", "regex"],
datasources: ["docker"],
matchUpdateTypes: ["patch", "digest", "pin"],
postUpgradeTasks: {
commands: [
`version=$(grep '^version:' {{{parentDir}}}/Chart.yaml | awk '{print $2}')
major=$(echo $version | cut -d. -f1)
minor=$(echo $version | cut -d. -f2)
patch=$(echo $version | cut -d. -f3)
patch=$(expr $minor + 1)
echo "Replacing $version with $major.$minor.$patch"
sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" {{{parentDir}}}/Chart.yaml
cat {{{parentDir}}}/Chart.yaml
`,
],
},
fileFilters: ["**/Chart.yaml"],
executionMode: "branch",
}, },
], ],
}; };