-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add flow for develop branch (#43)
* add workflow for develop
- Loading branch information
Showing
12 changed files
with
103 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Update Helm charts - develop | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
paths: | ||
- 'charts/testkube-cloud-api/templates/**' | ||
- 'charts/testkube-cloud-api/values.yaml' | ||
- 'charts/testkube-cloud-ui/templates/**' | ||
- 'charts/testkube-cloud-ui/values.yaml' | ||
- 'charts/testkube-enterprise/templates/**' | ||
- 'charts/testkube-enterprise/values.yaml' | ||
|
||
jobs: | ||
release-helm-charts: | ||
name: Release Helm charts | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
- name: Update Helm chart with changes files | ||
run: | | ||
echo "Testkube Helm charts diff" | ||
changed_files=$(git --no-pager diff HEAD~1 charts) | ||
if [[ "$changed_files" == *"testkube-cloud-api/"* ]]; then | ||
echo "Changes detected in files within the 'testkube-cloud-api' directory. Updating the chart minor version." | ||
./scripts/update.sh -c testkube-cloud-api --strategy minor | ||
new_chart_version=$(./scripts/update.sh -c testkube-cloud-api --print-chart-version) | ||
echo "New testkube-cloud-api chart version is $new_chart_version" >> $GITHUB_STEP_SUMMARY | ||
else | ||
echo "No changes detected in the specified directories." | ||
fi | ||
if [[ "$changed_files" == *"testkube-cloud-ui/"* ]]; then | ||
echo "Changes detected in files within the 'testkube-cloud-ui' directory. Updating the chart minor version." | ||
./scripts/update.sh -c testkube-cloud-ui --strategy minor | ||
new_chart_version=$(./scripts/update.sh -c testkube-cloud-ui --print-chart-version) | ||
echo "New testkube-cloud-ui chart version is $new_chart_version" >> $GITHUB_STEP_SUMMARY | ||
else | ||
echo "No changes detected in the specified directories." | ||
fi | ||
- name: Update Testkube Enterprise Helm chart | ||
run: | | ||
echo "Syncing subchart versions in testkube-enterprise Helm chart" | ||
./scripts/sync.sh | ||
echo "Bumping testkube-enterprise Helm-chart version" | ||
./scripts/update.sh -c testkube-enterprise --strategy minor | ||
#get Enterprise version | ||
enterprise_chart_version=$(./scripts/update.sh -c testkube-enterprise --print-chart-version) | ||
echo "New testkube-enterprise chart version is $enterprise_chart_version" >> $GITHUB_STEP_SUMMARY | ||
- name: Lint Helm charts for safety | ||
run: | | ||
helm lint charts/testkube-cloud-ui | ||
helm lint charts/testkube-cloud-api | ||
helm lint charts/testkube-enterprise | ||
- name: Install Helm Docs | ||
uses: envoy/install-helm-docs@v1.0.0 | ||
with: | ||
version: 1.11.0 | ||
|
||
- name: Update Helm Docs | ||
run: | | ||
set -ex | ||
helm-docs | ||
- name: Commit & push changes | ||
run: | | ||
git config --global user.name "testkube-cloud-ci-bot" | ||
git config --global user.email "testkube-cloud-ci-bot@users.noreply.github.com" | ||
git status | ||
git add **/*Chart.yaml **/*README.md | ||
git commit -m "Updating helm-chart versions and README files" | ||
git push |
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
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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