-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: [KDL6-66] configure updatecli.io on deps
- Loading branch information
1 parent
4f111b1
commit 4f81e0d
Showing
8 changed files
with
340 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
sources: | ||
kdl-server: | ||
kind: dockerimage | ||
spec: | ||
image: konstellation/kdl-server | ||
architecture: linux/amd64 | ||
versionFilter: | ||
kind: semver | ||
conditions: {} | ||
targets: | ||
kdl-server: | ||
name: bump chart appversion | ||
kind: yaml | ||
spec: | ||
file: charts/kdl-server/Chart.yaml | ||
key: $.appVersion | ||
sourceid: kdl-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
sources: | ||
konstellation-base: | ||
kind: helmchart | ||
spec: | ||
url: https://charts.konstellation.io | ||
name: konstellation-base | ||
versionFilter: | ||
kind: semver | ||
pattern: '*' # replace with CI/CD updatecli | ||
sourceid: konstellation-base | ||
minio: | ||
kind: helmchart | ||
spec: | ||
url: https://charts.bitnami.com/bitnami | ||
name: minio | ||
versionFilter: | ||
kind: semver | ||
pattern: '*' # replace with CI/CD updatecli | ||
sourceid: minio | ||
mongodb: | ||
kind: helmchart | ||
spec: | ||
url: https://charts.bitnami.com/bitnami | ||
name: mongodb | ||
versionFilter: | ||
kind: semver | ||
pattern: '*' # replace with CI/CD updatecli | ||
sourceid: mongodb | ||
oauth2-proxy: | ||
kind: helmchart | ||
spec: | ||
url: https://oauth2-proxy.github.io/manifests | ||
name: oauth2-proxy | ||
versionFilter: | ||
kind: semver | ||
pattern: '*' # replace with CI/CD updatecli | ||
sourceid: oauth2-proxy | ||
postgresql: | ||
kind: helmchart | ||
spec: | ||
url: https://charts.bitnami.com/bitnami | ||
name: postgresql | ||
versionFilter: | ||
kind: semver | ||
pattern: '*' # replace with CI/CD updatecli | ||
sourceid: postgresql | ||
conditions: {} | ||
targets: | ||
konstellation-base: | ||
name: bump chart dependencies | ||
kind: yaml | ||
spec: | ||
file: charts/kdl-server/Chart.yaml | ||
key: $.dependencies[0].version | ||
sourceid: konstellation-base | ||
minio: | ||
name: bump chart dependencies | ||
kind: yaml | ||
spec: | ||
file: charts/kdl-server/Chart.yaml | ||
key: $.dependencies[1].version | ||
sourceid: minio | ||
mongodb: | ||
name: bump chart dependencies | ||
kind: yaml | ||
spec: | ||
file: charts/kdl-server/Chart.yaml | ||
key: $.dependencies[2].version | ||
sourceid: mongodb | ||
oauth2-proxy: | ||
name: bump chart dependencies | ||
kind: yaml | ||
spec: | ||
file: charts/kdl-server/Chart.yaml | ||
key: $.dependencies[3].version | ||
sourceid: oauth2-proxy | ||
postgresql: | ||
name: bump chart dependencies | ||
kind: yaml | ||
spec: | ||
file: charts/kdl-server/Chart.yaml | ||
key: $.dependencies[4].version | ||
sourceid: postgresql |
81 changes: 81 additions & 0 deletions
81
.github/workflows/helm-check-kdl-server-major-dependencies.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: "[Helm] Check KDL Server major dependencies releases" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 1 * *' # first day of month | ||
|
||
jobs: | ||
check-and-update-major-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Prepare updatecli configuration | ||
id: dependencies | ||
run: | | ||
# get name dependencies | ||
dependencies=($(yq eval -o=json '.dependencies[] | .name' charts/kdl-server/Chart.yaml | xargs)) | ||
# replace version | ||
for dependency in "${dependencies[@]}"; do | ||
yq eval -i ".sources.${dependency}.spec.versionFilter.pattern = \"*\"" .github/updatecli/helm-kdl-server-dependencies.yaml | ||
done | ||
- name: Install updatecli | ||
uses: updatecli/updatecli-action@v2 | ||
|
||
- name: Update dependencies | ||
run: | | ||
updatecli apply --config .github/updatecli/helm-kdl-server-dependencies.yaml --commit=false 2>&1 | tee > $GITHUB_WORKSPACE/major-output.log | ||
# show PR body | ||
cat major-output.log | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Update README.md Helm Chart | ||
uses: losisin/helm-docs-github-action@v1 | ||
with: | ||
chart-search-root: charts/kdl-server | ||
|
||
- name: Get current date | ||
id: date | ||
run: | | ||
echo "date=$(date -I)" >> $GITHUB_OUTPUT | ||
- name: Create PR with changes (dry-run) | ||
uses: peter-evans/create-pull-request@v7 | ||
if: github.event_name == 'workflow_dispatch' | ||
with: | ||
add-paths: charts/kdl-server | ||
token: ${{ secrets.PAT }} | ||
commit-message: "fix: update major dependencies version" | ||
signoff: false | ||
branch: chore/upgrade-kdl-server-major-dependencies-${{ steps.date.outputs.date }} | ||
delete-branch: true | ||
title: '[kdl-server] upgrade major dependencies (${{ steps.date.outputs.date }})' | ||
body-path: major-output.log | ||
draft: true | ||
labels: | | ||
auto-pr-bump-version | ||
- name: Create PR with changes | ||
uses: peter-evans/create-pull-request@v7 | ||
if: github.event_name == 'schedule' | ||
with: | ||
add-paths: charts/kdl-server | ||
token: ${{ secrets.PAT }} | ||
commit-message: "fix: update major dependencies version" | ||
signoff: false | ||
branch: chore/upgrade-kdl-server-major-dependencies-${{ steps.date.outputs.date }} | ||
delete-branch: true | ||
title: '[kdl-server] upgrade major dependencies (${{ steps.date.outputs.date }})' | ||
body-path: major-output.log | ||
labels: | | ||
auto-pr-bump-version |
79 changes: 79 additions & 0 deletions
79
.github/workflows/helm-check-kdl-server-minor-dependencies.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: "[Helm] Check KDL Server minor dependencies releases" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * 1' # every monday | ||
|
||
jobs: | ||
check-and-update-minor-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Prepare updatecli configuration | ||
id: dependencies | ||
run: | | ||
# get name dependencies | ||
dependencies=($(yq eval -o=json '.dependencies[] | .name' charts/kdl-server/Chart.yaml | xargs)) | ||
# replace version | ||
for dependency in "${dependencies[@]}"; do | ||
version="~$(yq eval -r ".dependencies[] | select(.name == \"${dependency}\") | .version" charts/kdl-server/Chart.yaml | cut -d'.' -f1)" | ||
yq eval -i ".sources.${dependency}.spec.versionFilter.pattern = \"${version}\"" .github/updatecli/helm-kdl-server-dependencies.yaml | ||
done | ||
- name: Install updatecli | ||
uses: updatecli/updatecli-action@v2 | ||
|
||
- name: Update dependencies | ||
run: | | ||
updatecli apply --config .github/updatecli/helm-kdl-server-dependencies.yaml --commit=false 2>&1 | tee > $GITHUB_WORKSPACE/minor-output.log | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Update README.md Helm Chart | ||
uses: losisin/helm-docs-github-action@v1 | ||
with: | ||
chart-search-root: charts/kdl-server | ||
|
||
- name: Get current date | ||
id: date | ||
run: | | ||
echo "date=$(date -I)" >> $GITHUB_OUTPUT | ||
- name: Create PR with changes (dry-run) | ||
uses: peter-evans/create-pull-request@v7 | ||
if: github.event_name == 'workflow_dispatch' | ||
with: | ||
add-paths: charts/kdl-server | ||
token: ${{ secrets.PAT }} | ||
commit-message: "fix: update minor dependencies version" | ||
signoff: false | ||
branch: chore/upgrade-kdl-server-minor-dependencies-${{ steps.date.outputs.date }} | ||
delete-branch: true | ||
title: '[kdl-server] upgrade minor dependencies (${{ steps.date.outputs.date }})' | ||
body-path: minor-output.log | ||
draft: true | ||
labels: | | ||
auto-pr-bump-version | ||
- name: Create PR with changes | ||
uses: peter-evans/create-pull-request@v7 | ||
if: github.event_name == 'schedule' | ||
with: | ||
add-paths: charts/kdl-server | ||
token: ${{ secrets.PAT }} | ||
commit-message: "fix: update minor dependencies version" | ||
signoff: false | ||
branch: chore/upgrade-kdl-server-minor-dependencies-${{ steps.date.outputs.date }} | ||
delete-branch: true | ||
title: '[kdl-server] upgrade minor dependencies (${{ steps.date.outputs.date }})' | ||
body-path: minor-output.log | ||
labels: | | ||
auto-pr-bump-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: "[Helm] Check KDL Server new releases" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' # every day | ||
|
||
jobs: | ||
check-and-update-kdl-server: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Get current release | ||
id: current_release | ||
run: | | ||
current_release=$(grep appVersion charts/kdl-server/Chart.yaml | awk '{ print $2 }') | ||
echo "current_release=$current_release" >> $GITHUB_OUTPUT | ||
- name: Install updatecli | ||
uses: updatecli/updatecli-action@v2 | ||
|
||
- name: Update dependencies | ||
run: | | ||
updatecli apply --config .github/updatecli/helm-kdl-server-appversion.yaml --commit=false | ||
- name: Get latest release | ||
id: latest_release | ||
run: | | ||
latest_release=$(grep appVersion charts/kdl-server/Chart.yaml | awk '{ print $2 }') | ||
echo "latest_release=$latest_release" >> $GITHUB_OUTPUT | ||
- name: Check if release changed | ||
id: check_changes | ||
run: | | ||
if [ ${{ steps.latest_release.outputs.latest_release }} != ${{ steps.current_release.outputs.current_release }} ]; then | ||
echo "release_changed=true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Update README.md Helm Chart | ||
if: steps.check_changes.outputs.release_changed == 'true' | ||
uses: losisin/helm-docs-github-action@v1 | ||
with: | ||
chart-search-root: charts/kdl-server | ||
|
||
- name: Create PR with changes | ||
if: steps.check_changes.outputs.release_changed == 'true' | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
commit-message: "fix: update KDL Server version to ${{ steps.latest_release.outputs.latest_release }}" | ||
signoff: false | ||
branch: chore/upgrade-kdl-server-appversion-${{ steps.latest_release.outputs.latest_release }} | ||
delete-branch: true | ||
title: '[kdl-server] new release: ${{ steps.latest_release.outputs.latest_release }}' | ||
body: | | ||
KDL Server version: | ||
- :information_source: Current: `${{ steps.current_release.outputs.current_release }}` | ||
- :up: Upgrade: `${{ steps.latest_release.outputs.latest_release }}` | ||
Changelog: https://github.com/konstellation-io/kdl-server/releases/tag/${{ steps.latest_release.outputs.latest_release }} | ||
labels: | | ||
auto-pr-bump-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters