diff --git a/.github/renovate-config.json b/.github/renovate-config.json index 7bb6f75..68f97f7 100644 --- a/.github/renovate-config.json +++ b/.github/renovate-config.json @@ -6,5 +6,8 @@ "platform": "github", "repositories": [ "small-hack/vouch-helm" + ], + "allowedPostUpgradeCommands": [ + "^scripts" ] } diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 8c38d47..74459cf 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v4.2.2 - name: Self-hosted Renovate - uses: renovatebot/github-action@v41.0.0 + uses: renovatebot/github-action@v43.0.0 with: token: '${{ steps.get_token.outputs.token }}' configurationFile: .github/renovate-config.json diff --git a/charts/vouch/Chart.yaml b/charts/vouch/Chart.yaml index 0a31357..114028a 100644 --- a/charts/vouch/Chart.yaml +++ b/charts/vouch/Chart.yaml @@ -17,10 +17,10 @@ keywords: - sso - sso-login -version: 4.3.1 +version: 5.0.0 # renovate: image=quay.io/vouch/vouch-proxy -appVersion: "0.41.0" +appVersion: "0.45.1" maintainers: - name: jessebot diff --git a/charts/vouch/README.md b/charts/vouch/README.md index f8040b8..a750774 100644 --- a/charts/vouch/README.md +++ b/charts/vouch/README.md @@ -1,6 +1,6 @@ # vouch -![Version: 4.3.1](https://img.shields.io/badge/Version-4.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.41.0](https://img.shields.io/badge/AppVersion-0.41.0-informational?style=flat-square) +![Version: 5.0.0](https://img.shields.io/badge/Version-5.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.45.1](https://img.shields.io/badge/AppVersion-0.45.1-informational?style=flat-square) An SSO and OAuth login solution for nginx using the auth_request module. diff --git a/renovate.json b/renovate.json index 0df9ee7..e7be5b1 100644 --- a/renovate.json +++ b/renovate.json @@ -1,52 +1,57 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended", ":disableDependencyDashboard"], "customManagers": [ { - "customType": "regex", - "datasourceTemplate": "docker", - "fileMatch": [ - "(^|/)Chart\\.yaml$" - ], - "matchStrings": [ - "#\\s*renovate: image=(?.*?)\\s+appVersion:\\s*[\"']?(?[\\w+\\.\\-]*)" - ] + "customType": "regex", + "datasourceTemplate": "docker", + "fileMatch": ["(^|/)Chart\\.yaml$"], + "matchStrings": [ + "#\\s*renovate: image=(?.*?)\\s+appVersion:\\s*[\"']?(?[\\w+\\.\\-]*)" + ] } ], "packageRules": [ - { - "matchManagers": ["github-actions"], - "matchUpdateTypes": ["patch","minor"], - "automerge": true, - "automergeType": "branch", - "ignoreTests": true - }, - { - "description": "Fix version in Chart.yaml after helmv3 dep patch updates", - "matchUpdateTypes": ["patch"], - "matchManagers": ["helmv3"], - "bumpVersion": "patch" - }, - { - "description": "Fix version in Chart.yaml after helmv3 dep minor updates", - "matchUpdateTypes": ["minor"], - "matchManagers": ["helmv3"], - "bumpVersion": "minor" - }, - { - "description": "Fix version in Chart.yaml after helmv3 dep major updates", - "matchUpdateTypes": ["major"], - "matchManagers": ["helmv3"], - "bumpVersion": "major" - }, - { - "description": "Bump helm chart versions by a patch when updating values files. Digests, pins, rollbacks, replacements and pinDigest updates are deliberately ignored since in our use case, these need a manual decision about the version bump for the chart. This can be removed when https://github.com/renovatebot/renovate/issues/8231 is implemented and enabled.", - "matchManagers": ["helm-values", "regex"], - "postUpgradeTasks": { - "commands": [ - "bash scripts/bump-chart-version.sh '{{{parentDir}}}' '{{{updateType}}}'" - ], - "fileFilters": ["**/Chart.yaml"] + { + "description": "Fix subchart archives for helm chart", + "matchManagers": ["helmv3"], + "postUpdateOptions": ["helmUpdateSubChartArchives"] + }, + { + "description": "Fix version in Chart.yaml after helmv3 dep patch updates", + "matchManagers": ["helmv3"], + "matchUpdateTypes": ["patch"], + "bumpVersion": "patch" + }, + { + "description": "Fix version in Chart.yaml after helmv3 dep minor updates", + "matchManagers": ["helmv3"], + "matchUpdateTypes": ["minor"], + "bumpVersion": "minor" + }, + { + "description": "Fix version in Chart.yaml after helmv3 dep major updates", + "matchManagers": ["helmv3"], + "matchUpdateTypes": ["major"], + "bumpVersion": "major" + }, + { + "description": "Bump helm chart versions by a patch when updating values files. This can be removed when https://github.com/renovatebot/renovate/issues/8231 is implemented and enabled.", + "matchManagers": ["helm-values", "regex"], + "postUpgradeTasks": { + "commands": [ + "scripts/bump-chart-version.sh '{{{updateType}}}'" + ], + "fileFilters": ["**/Chart.yaml"], + "executionMode": "branch" + } + }, + { + "matchManagers": ["github-actions"], + "matchPackageNames": ["renovatebot/github-action"], + "matchUpdateTypes": ["patch", "minor"], + "automerge": true, + "ignoreTests": true } - } ] } diff --git a/scripts/bump-chart-version.sh b/scripts/bump-chart-version.sh index b199120..398a6a0 100644 --- a/scripts/bump-chart-version.sh +++ b/scripts/bump-chart-version.sh @@ -1,11 +1,13 @@ #!/usr/bin/env bash +# thanks to original comment: https://github.com/renovatebot/renovate/issues/8231#issuecomment-1978929997 +# converted to discussion: https://github.com/renovatebot/renovate/discussions/28861#discussioncomment-9326722 set -euo pipefail -parent_dir="$1" -update_type="$2" +update_type="$1" + +version=$(grep "^version:" "charts/vouch/Chart.yaml" | awk '{print $2}') -version=$(grep "^version:" "charts/${parent_dir}/Chart.yaml" | awk '{print $2}') if [[ ! $version ]]; then echo "No valid version was found" exit 1 @@ -26,5 +28,5 @@ else patch=$(( patch + 1 )) fi -echo "Bumping version for $parent_dir from $version to $major.$minor.$patch" -sed -i "s/^version:.*/version: ${major}.${minor}.${patch}/g" "charts/${parent_dir}/Chart.yaml" +echo "Bumping version for vouch chart from $version to $major.$minor.$patch" +sed -i "s/^version:.*/version: ${major}.${minor}.${patch}/g" "charts/vouch/Chart.yaml"