Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add flow for develop branch #43

Merged
merged 55 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
7832f59
add workflow for develop
ypoplavs Oct 4, 2023
8c8ebc9
update gitignore
ypoplavs Oct 4, 2023
df47bd8
update description
ypoplavs Oct 5, 2023
582be05
test generate helm docs
ypoplavs Oct 5, 2023
aefb8c5
test flow
ypoplavs Oct 5, 2023
f5bcb13
test flow
ypoplavs Oct 5, 2023
f66d811
test flow
ypoplavs Oct 5, 2023
3230eb8
test
ypoplavs Oct 5, 2023
1af78f2
updating chart versions
Oct 5, 2023
07615b9
add docs generation
ypoplavs Oct 5, 2023
061335e
Merge branch 'ci/add-flow-for-develop' of github.com:kubeshop/testkub…
ypoplavs Oct 5, 2023
cf6da6c
Updating helm-chart versions
Oct 5, 2023
b43f943
Update helm docs
Oct 5, 2023
9f29a25
add token
ypoplavs Oct 5, 2023
2098d50
Updating helm-chart versions
Oct 5, 2023
024381c
Update helm docs
Oct 5, 2023
eafc884
add echo for debug
ypoplavs Oct 5, 2023
8629c1a
Merge branch 'ci/add-flow-for-develop' of github.com:kubeshop/testkub…
ypoplavs Oct 5, 2023
5ce5cda
Updating helm-chart versions
Oct 5, 2023
3f60b72
Update helm docs
Oct 5, 2023
9f6b83a
update CI
ypoplavs Oct 5, 2023
b0e5bf8
Updating helm-chart versions
Oct 5, 2023
0c755ea
Update helm docs
Oct 5, 2023
5416bd7
update checkout
ypoplavs Oct 5, 2023
c02f35e
add latest commit
ypoplavs Oct 5, 2023
27ce5d9
add latest commit
ypoplavs Oct 5, 2023
1c9f173
add latest commit
ypoplavs Oct 5, 2023
adcbb88
add latest commit
ypoplavs Oct 5, 2023
d65c61c
add latest commit
ypoplavs Oct 5, 2023
6072b32
test
ypoplavs Oct 5, 2023
a50e33f
test
ypoplavs Oct 5, 2023
1ac31f2
test
ypoplavs Oct 5, 2023
994c60e
test
ypoplavs Oct 5, 2023
bfc6831
test ci
ypoplavs Oct 5, 2023
878b01b
Updating helm-chart versions
Oct 5, 2023
dd2ff11
Update helm docs
Oct 5, 2023
9fdaa88
values
ypoplavs Oct 5, 2023
cb8df74
Merge branch 'ci/add-flow-for-develop' of github.com:kubeshop/testkub…
ypoplavs Oct 5, 2023
3ba8575
fix lint
ypoplavs Oct 5, 2023
39597f0
Updating helm-chart versions
Oct 5, 2023
f4ebd34
Update helm docs
Oct 5, 2023
c5cde8b
merge develop
ypoplavs Oct 5, 2023
8e8c072
update with develop
ypoplavs Oct 5, 2023
a2df62d
Updating helm-chart versions
Oct 5, 2023
560bcda
Update helm docs
Oct 5, 2023
cb6c56d
revert changes
ypoplavs Oct 5, 2023
6b430e2
update ci
ypoplavs Oct 5, 2023
62fac79
move helm docs step
ypoplavs Oct 5, 2023
bc6f38d
replace patch with minor
ypoplavs Oct 6, 2023
8cd74e0
resolve conflicts
ypoplavs Oct 6, 2023
b0efe12
remove tgz charts
ypoplavs Oct 6, 2023
affe194
testing the ci
ypoplavs Oct 6, 2023
67d138f
Updating helm-chart versions and README files
Oct 6, 2023
2fca69a
rollback
ypoplavs Oct 6, 2023
37911e1
remove spaces
ypoplavs Oct 6, 2023
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
91 changes: 91 additions & 0 deletions .github/workflows/release-develop.yaml
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# Chart dependencies
charts/testkube-cloud-api/charts/*.tgz
charts/testkube-cloud-ui/charts/*.tgz
charts/testkube-enterprise/charts/*.tgz

# OSX
.DS_Store
**/.DS_Store
**/.DS_Store
2 changes: 1 addition & 1 deletion charts/testkube-cloud-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ A Helm chart for Testkube Cloud UI
| ui.segment.writeKey | string | `""` | Segment.io write key (overriden by `secretRef` if set) |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
2 changes: 1 addition & 1 deletion charts/testkube-enterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ A Helm chart for Testkube Enterprise
| testkube-cloud-ui.ingress.tlsSecretName | string | `"testkube-enterprise-ui-tls"` | Name of the TLS secret which contains the certificate files |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Binary file removed charts/testkube-enterprise/charts/common-2.2.5.tgz
Binary file not shown.
Binary file removed charts/testkube-enterprise/charts/dex-0.14.1.tgz
Binary file not shown.
Binary file not shown.
Binary file removed charts/testkube-enterprise/charts/nats-0.14.2.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions charts/testkube-enterprise/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ testkube-cloud-api:
prometheus:
enabled: true
ingress:
enabled: true
testkube-cloud-ui:
fullnameOverride: testkube-enterprise-ui
image:
Expand Down
13 changes: 7 additions & 6 deletions scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# -v|--helm-version to specify the versions, and -c|--chart #
# to provide the name of the chart. #
# #
# Note: If -v|--helm-version is not provided, the latest Git tag is used #
# as the Helm version. If --strategy is specified, the Helm version is #
# bumped based on the specified strategy. #
# Note: If -v|--helm-version is not provided, we take the latest version #
# in Chart.yaml file and bump it. If --strategy is specified, the Helm version #
# is bumped based on the specified strategy. #
################################################################################

## VARIABLES
Expand Down Expand Up @@ -216,9 +216,12 @@ fi

show "Updating chart $chart_path"


chart_yaml_path="${chart_path}/Chart.yaml"

# use latest git tag if helm_version is not specified
if [[ -z "$helm_version" ]]; then
helm_version=$(git describe --abbrev=0 --tags)
helm_version=$(grep -E '^version:' "$chart_yaml_path" | awk '{print $2}')
if [[ -z "$helm_version" ]]; then
err "Helm version not specified or available. Use the -v|--helm-version flag or ensure there are Git tags."
usage
Expand All @@ -236,8 +239,6 @@ fi

show "Current Helm chart version: $helm_version"

chart_yaml_path="${chart_path}/Chart.yaml"

if [[ "$print_chart_version" == true ]]; then
print_chart_version
exit 0
Expand Down
Loading