Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/renovate-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"platform": "github",
"repositories": [
"small-hack/vouch-helm"
],
"allowedPostUpgradeCommands": [
"^scripts"
]
}
2 changes: 1 addition & 1 deletion .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/[email protected]

- 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
4 changes: 2 additions & 2 deletions charts/vouch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/vouch/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
89 changes: 47 additions & 42 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -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=(?<depName>.*?)\\s+appVersion:\\s*[\"']?(?<currentValue>[\\w+\\.\\-]*)"
]
"customType": "regex",
"datasourceTemplate": "docker",
"fileMatch": ["(^|/)Chart\\.yaml$"],
"matchStrings": [
"#\\s*renovate: image=(?<depName>.*?)\\s+appVersion:\\s*[\"']?(?<currentValue>[\\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
}
}
]
}
12 changes: 7 additions & 5 deletions scripts/bump-chart-version.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Loading