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

Release/v1.13.0 #568

Merged
merged 192 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
b190dcc
feat: cron job template field (#480)
vsukhin May 3, 2023
284cf52
fix typo (#486)
ypoplavs May 3, 2023
c7fc111
feat: deprecate args (#475)
vsukhin May 3, 2023
6f38baf
fix bugs (#489)
ypoplavs May 4, 2023
4ec6ec8
fix executors.json (#491)
ypoplavs May 4, 2023
9a16333
rework flow to depploy executors with api (#492)
ypoplavs May 4, 2023
5ba7468
update sed (#494)
ypoplavs May 4, 2023
4492471
Update branch (#496)
ypoplavs May 4, 2023
41b9868
Update branch (#497)
ypoplavs May 4, 2023
691fe3c
edit script for updating chart versions (#500)
ypoplavs May 8, 2023
d4853a9
[testkube-api] minio allow setting minio replicaCount (#502)
povilasv May 10, 2023
3ec9d60
Fix post request in nginx config (#504)
ypoplavs May 11, 2023
34a3143
commit executor image tag to develop (#505)
ypoplavs May 12, 2023
4b06777
added force push for kubeshop bot user
ypoplavs May 12, 2023
bb5100a
Update executors.json
May 12, 2023
380fccc
add if to commit executur step
ypoplavs May 12, 2023
472112f
Merge branch 'develop' of github.com:kubeshop/helm-charts into develop
ypoplavs May 12, 2023
0a31198
add if to commit executur step
ypoplavs May 12, 2023
e36b3d1
added removed line from test run
ypoplavs May 12, 2023
1335977
Update executors.json
May 13, 2023
bf6a854
Update executors.json
May 13, 2023
e09a555
Update executors.json
May 13, 2023
aa8361e
Update executors.json
May 13, 2023
ba9d55b
Update executors.json
May 13, 2023
574b754
Update executors.json
May 13, 2023
a2641d6
Update executors.json
May 15, 2023
e97e317
Update executors.json
May 15, 2023
b7ca66a
Update executors.json
May 15, 2023
577b294
Update executors.json
May 15, 2023
03e35b5
update release branch naming (#509)
ypoplavs May 16, 2023
b010b9f
Testkube dev - overwrite branch on test run (#506)
tkonieczny May 16, 2023
62f157e
Update executors.json
May 16, 2023
95b939a
Update executors.json
May 16, 2023
147964e
Update executors.json
May 16, 2023
1147dc2
Update executors.json
May 17, 2023
8e8edbc
update chart releaser script
ypoplavs May 17, 2023
2015c93
Merge branch 'develop' of github.com:kubeshop/helm-charts into develop
ypoplavs May 17, 2023
29fe38f
Fix kubeoperator preupgrade josb for multi-namespace (#507)
gberche-orange May 17, 2023
b82b639
Set a sensible default for API server HTTP Read buffer size (#513)
gberche-orange May 17, 2023
c7fd378
Update executors.json
May 18, 2023
eb2080b
Update executors.json
May 18, 2023
69910cf
convert the var to staring (#514)
ypoplavs May 18, 2023
1d2a2d3
feat: cdevents support (#503)
vsukhin May 18, 2023
29c75ed
Update executors.json
May 18, 2023
fc7bc9c
Update executors.json
May 21, 2023
da4f9e4
Update executors.json
May 21, 2023
b545f9a
Update executors.json
May 22, 2023
dd22709
ci: add changelog generation (#516)
ypoplavs May 23, 2023
67e2b76
feat: dashboard uri for cd events (#517)
vsukhin May 24, 2023
7c2af7c
Update executors.json
May 24, 2023
7f7f926
feat: add option to force disabling telemetry on the UI (#518)
rangoo94 May 24, 2023
b59448c
fix: testkube service monitor target port (#515)
gberche-orange May 24, 2023
b4defe2
feat: zap executor (#511)
vLia May 24, 2023
c732d4a
ci: update tests
ypoplavs May 24, 2023
e33268f
feat: condition ttl (#520)
vsukhin May 25, 2023
9ff5bcf
Update executors.json
May 25, 2023
fe96683
Update executors.json
May 25, 2023
16c2305
Update executors.json
May 25, 2023
7b472ed
add automatic pr creation (#521)
ypoplavs May 25, 2023
a5ec1c5
Update executors.json
May 25, 2023
352742f
Update executors.json
May 25, 2023
4b6014f
Update executors.json
May 25, 2023
519c983
Update executors.json
May 25, 2023
e3b8b56
Update executors.json
May 25, 2023
185d080
Update executors.json
May 25, 2023
4715058
Update executors.json
May 26, 2023
c1b5d92
Update executors.json
May 26, 2023
6132f4b
Update executors.json
May 27, 2023
509b303
Update executors.json
May 29, 2023
1333030
Update executors.json
May 30, 2023
1696853
Update executors.json
May 30, 2023
2ffcc6e
Update executors.json
May 30, 2023
a18fa17
ci: add condition for checking if executors.json were updated (#523)
ypoplavs May 30, 2023
659ee0a
Update executors.json
May 30, 2023
9c64f49
ci: fix client payload for image tag pre-release
ypoplavs May 30, 2023
baa9080
Update executors.json
May 30, 2023
f6e4388
Update executors.json
May 30, 2023
e5705ec
ci: update branch for tests in stage workflow (#524)
ypoplavs May 31, 2023
6d2b074
feat: added webhook to cdevents for test purpose (#525)
exu May 31, 2023
13a238e
Update executors.json
May 31, 2023
d43e2a1
fix: new webhook.site to bypass limits
exu Jun 1, 2023
b64f67a
Update executors.json
Jun 1, 2023
f0a2635
Update executors.json
Jun 1, 2023
8145b00
Update executors.json
Jun 1, 2023
4318578
Update executors.json
Jun 1, 2023
6500808
Update executors.json
Jun 1, 2023
6b3c02c
Update executors.json
Jun 1, 2023
8890f2a
resolve conflicts
ypoplavs Jun 1, 2023
78cb068
update executors.json
ypoplavs Jun 1, 2023
a292a28
Update executors.json
Jun 1, 2023
86c9de1
Update executors.json
Jun 1, 2023
c6a2378
Update executors.json
Jun 2, 2023
1e63f7e
feat: add TTL for k8s jobs (#530)
ypoplavs Jun 2, 2023
0ecbef4
align with main
ypoplavs Jun 2, 2023
8ddc221
Update executors.json
Jun 2, 2023
f76cbc8
Update executors.json
Jun 4, 2023
a190d3a
Update executors.json
Jun 5, 2023
02f6971
fix: preupgrade lables
vsukhin Jun 5, 2023
3ec105c
Revert "fix: preupgrade lables"
vsukhin Jun 5, 2023
ae9b5f0
fix: preupgrade labels (#533)
vsukhin Jun 5, 2023
4193c3b
Update executors.json
Jun 6, 2023
6c975d8
feat: webhook template and headers (#538)
vsukhin Jun 7, 2023
da40933
Update executors.json
Jun 7, 2023
c4f5ce1
add cloud migrate env (#540)
povilasv Jun 8, 2023
c25f322
Update executors.json
Jun 8, 2023
c6346d8
Update executors.json
Jun 8, 2023
0585dc9
Update executors.json
Jun 8, 2023
b5b6c37
Testkube Doc: refine test doc for content.type (#541)
gberche-orange Jun 9, 2023
477d5c2
Doc update: preRunScript ignored for container executor (#535)
gberche-orange Jun 9, 2023
ce85b35
Update executors.json
Jun 9, 2023
3429314
fix: template labels
vsukhin Jun 9, 2023
c5b6349
Update executors.json
Jun 9, 2023
d645f0d
Update executors.json
Jun 9, 2023
3aa2072
Update executors.json
Jun 12, 2023
35009f6
Update executors.json
Jun 12, 2023
ffe59e1
Update executors.json
Jun 12, 2023
a8d1c31
Update executors.json
Jun 13, 2023
5e42fd5
Update executors.json
Jun 14, 2023
d8e2c9b
Update executors.json
Jun 14, 2023
25cd28b
feat: testsuite v3 (#380)
vsukhin Jun 15, 2023
5936387
Update executors.json
Jun 15, 2023
57ec483
Update executors.json
Jun 15, 2023
5cb7ee5
fix: minio service labels (#544)
vsukhin Jun 15, 2023
a317055
Update executors.json
Jun 15, 2023
1e171f5
Update executors.json
Jun 15, 2023
ee35deb
Update executors.json
Jun 16, 2023
81c21bf
Update executors.json
Jun 16, 2023
59d3bb4
Update executors.json
Jun 16, 2023
42061bc
Update executors.json
Jun 19, 2023
c8ff8fa
Update executors.json
Jun 19, 2023
fc89468
charts: add warning for global image params (#547)
ypoplavs Jun 19, 2023
2e89dba
fix error with enabled tls (#548)
ypoplavs Jun 19, 2023
bfb5581
testkube-operator: Removed ns from tokenSecret and usernameSecret (#545)
jaxels10 Jun 19, 2023
2ed5c5b
Update executors.json
Jun 19, 2023
ff67a47
Update executors.json
Jun 20, 2023
2502811
feat: update config map for testkube-api (#550)
ypoplavs Jun 21, 2023
d068b4a
Update executors.json
Jun 21, 2023
356c08a
Update executors.json
Jun 21, 2023
4ef7ce4
Update executors.json
Jun 21, 2023
c2cedf9
update branch for checking out tests (#552)
ypoplavs Jun 22, 2023
f876534
Update executors.json
Jun 22, 2023
d2ea078
add arg to run install beta release to test cli (#554)
ypoplavs Jun 22, 2023
d40ec06
Update executors.json
Jun 22, 2023
c21aa19
feat: post run script field (#555)
vsukhin Jun 22, 2023
44995dd
Update executors.json
Jun 22, 2023
3a769d4
Update executors.json
Jun 23, 2023
64504d5
Update executors.json
Jun 23, 2023
bb356ed
feat: update referencing of secrets in minio and TK API (#557)
ypoplavs Jun 26, 2023
ed71b14
Update executors.json
Jun 26, 2023
7379c42
ci: update releaser script (#558)
ypoplavs Jun 27, 2023
a88966c
Update executors.json
Jun 27, 2023
decc638
ci: add release notes generation (#551)
ypoplavs Jun 27, 2023
bd910d0
ci: add flow to deploy to stage on values.yaml update (#560)
ypoplavs Jun 27, 2023
78a6ed7
feat: cluster name parameter (#559)
vsukhin Jun 27, 2023
de746cc
Update executors.json
Jun 27, 2023
70e1533
Update executors.json
Jun 28, 2023
fcf7032
Update executors.json
Jun 29, 2023
ea61e0e
Update executors.json
Jun 29, 2023
59e8097
Update executors.json
Jun 29, 2023
aca35f8
remove probes for mongo
ypoplavs Jun 29, 2023
7e2b211
Merge branch 'develop' of github.com:kubeshop/helm-charts into develop
ypoplavs Jun 29, 2023
ed3e8f9
feat: add basic auth (#562)
ypoplavs Jun 30, 2023
52aa6d1
Update executors.json
Jun 30, 2023
fc79310
Update executors.json
Jun 30, 2023
8f91bc5
Update executors.json
Jun 30, 2023
5c49188
Update executors.json
Jun 30, 2023
1573b66
feat: probe conditions (#561)
vsukhin Jul 3, 2023
83ed9a5
Update executors.json
Jul 3, 2023
8ead49e
Update executors.json
Jul 3, 2023
248b159
feat: tracetest executor (#564)
vLia Jul 3, 2023
4c0269e
Update executors.json
Jul 3, 2023
f703357
fix: resource separation inside conditional loops to avoid templating…
Carlosgova Jul 4, 2023
fb36c35
Update executors.json
Jul 4, 2023
d851275
Update executors.json
Jul 4, 2023
b53a0e1
Update executors.json
Jul 4, 2023
fe57614
Update executors.json
Jul 4, 2023
a609dc2
Update executors.json
Jul 4, 2023
862a55b
add basic auth for beta env (#566)
ypoplavs Jul 5, 2023
732cc75
Update executors.json
Jul 5, 2023
985299e
Update executors.json
Jul 5, 2023
580c38a
Update executors.json
Jul 5, 2023
e34261f
Update executors.json
Jul 5, 2023
2517b1e
Update executors.json
Jul 5, 2023
14db37c
Update executors.json
Jul 5, 2023
8d21dd2
Update executors.json
Jul 5, 2023
06b6c23
Update executors.json
Jul 5, 2023
39b451e
Update executors.json
Jul 6, 2023
98fa34b
Update executors.json
Jul 6, 2023
fc720ac
Update executors.json
Jul 6, 2023
c13df23
Revert "feat: tracetest executor (#564)"
vsukhin Jul 6, 2023
812efda
Revert "feat: probe conditions (#561)"
vsukhin Jul 6, 2023
fe6ea82
Merge branch 'main' into release/v1.13.0
vsukhin Jul 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
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
credentials: ${{ secrets.GKE_SA_KEY }}

- name: Install testkube kubectl plugin and disable telemetry
run: bash < <(curl -sSLf https://get.testkube.io ) && kubectl testkube disable telemetry
run: bash <(curl -sSLf https://get.testkube.io) beta && kubectl testkube disable telemetry

- name: Checkout tests from main Testkube repo
uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
credentials: ${{ secrets.GKE_SA_KEY }}

- name: Install testkube kubectl plugin and disable telemetry
run: bash < <(curl -sSLf https://get.testkube.io ) && kubectl testkube disable telemetry
run: bash <(curl -sSLf https://get.testkube.io) beta && kubectl testkube disable telemetry

- name: Checkout tests from main Testkube repo
uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
credentials: ${{ secrets.GKE_SA_KEY }}

- name: Install testkube kubectl plugin and disable telemetry
run: bash < <(curl -sSLf https://get.testkube.io ) && kubectl testkube disable telemetry
run: bash <(curl -sSLf https://get.testkube.io) beta && kubectl testkube disable telemetry

- name: Checkout tests from main Testkube repo
uses: actions/checkout@v3
Expand Down
199 changes: 199 additions & 0 deletions .github/workflows/helm-deploy-testkube-charts-stage-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
name: Releasing Testkube Helm charts to Stage k8s Cluster.

concurrency: staging_cluster

on:
push:
paths:
- "charts/testkube/values-stage.yaml"
branches:
- develop

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER_NAME_STAGE: ${{ secrets.GKE_CLUSTER_NAME_STAGE }} # Add your cluster name here.
GKE_ZONE_STAGE: ${{ secrets.GKE_ZONE_STAGE }} # Add your cluster zone here.
DEPLOYMENT_NAME: testkube # Add your deployment name here.
ENV: stage


jobs:
release_charts_if_image_updated:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.ref }}

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"

- uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
with:
service_account_key: ${{ secrets.GKE_SA_KEY }}
project_id: ${{ secrets.GKE_PROJECT }}
- run: |-
gcloud --quiet auth configure-docker

- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ env.GKE_CLUSTER_NAME_STAGE }}
location: ${{ env.GKE_ZONE_STAGE }}
credentials: ${{ secrets.GKE_SA_KEY }}

- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.10.0

- name: Installing repositories
run: |
helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami

- name: Get image tag of Testkube APi, Dashboard, Operator
id: vars
run: |
echo ::set-output name=api_image_tag::$(kubectl get deployment testkube-api-server -o=jsonpath='{$.spec.template.spec.containers[:1].image}' -n ${{ env.DEPLOYMENT_NAME }} | awk -F':' '{print $2}') || exit 1
echo ::set-output name=operator_image_tag::$(kubectl get deployment testkube-operator-controller-manager -o=jsonpath='{$.spec.template.spec.containers[1].image}' -n ${{ env.DEPLOYMENT_NAME }} | awk -F':' '{print $2}') || exit 1
echo ::set-output name=dashboard_image_tag::$(kubectl get deployment testkube-dashboard -o=jsonpath='{$.spec.template.spec.containers[:1].image}' -n ${{ env.DEPLOYMENT_NAME }} | awk -F':' '{print $2}') || exit 1

- name: Deploy helm chart to Integration Cluster
run: |
helm dependency update ./charts/testkube
helm upgrade --debug --install --atomic --timeout 180s ${{ env.DEPLOYMENT_NAME }} ./charts/testkube --namespace ${{ env.DEPLOYMENT_NAME }} --create-namespace --values ./charts/testkube/values-${{ env.ENV }}.yaml --set testkube-operator.image.tag=${{ steps.vars.outputs.operator_image_tag }} --set testkube-dashboard.image.tag=${{ steps.vars.outputs.dashboard_image_tag }} --set testkube-api.image.tag=${{ steps.vars.outputs.api_image_tag }}

notify_slack_if_deploy_stage_succeeds:
runs-on: ubuntu-latest
needs: release_charts_if_image_updated
steps:
- name: Slack Notification if the helm release deployment to ${{ env.ENV }} GKS succeeded.
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: testkube-logs
SLACK_COLOR: ${{ needs.release_charts_if_image_updated.result }} # or a specific color like 'good' or '#ff00ff'
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_TITLE: Helm chart release successfully deployed into ${{ env.GKE_CLUSTER_NAME_STAGE }} GKE :party_blob:!
SLACK_USERNAME: GitHub
SLACK_LINK_NAMES: true
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: "Kubeshop --> TestKube"

notify_slack_if_deploy_stage_failed:
runs-on: ubuntu-latest
needs: release_charts_if_image_updated
if: always() && (needs.release_charts_if_image_updated.result == 'failure')
steps:
- name: Slack Notification if the helm release deployment to ${{ env.ENV }} GKS failed.
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: testkube-logs
SLACK_COLOR: ${{ needs.release_charts_if_image_updated.result }} # or a specific color like 'good' or '#ff00ff'
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_TITLE: Helm chart release failed to deploy into ${{ env.GKE_CLUSTER_NAME_STAGE }} GKE! :boom:!
SLACK_USERNAME: GitHub
SLACK_LINK_NAMES: true
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: "Kubeshop --> TestKube"

test_suite_run_stage:
name: test suite for GKE cluster
runs-on: ubuntu-latest
needs: release_charts_if_image_updated
steps:
# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
with:
service_account_key: ${{ secrets.GKE_SA_KEY }}
project_id: ${{ secrets.GKE_PROJECT }}

# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
- run: |-
gcloud --quiet auth configure-docker

# Get the GKE credentials so we can deploy to the cluster
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ env.GKE_CLUSTER_NAME_STAGE }}
location: ${{ env.GKE_ZONE_STAGE }}
credentials: ${{ secrets.GKE_SA_KEY }}

- name: Install testkube kubectl plugin and disable telemetry
run: bash <(curl -sSLf https://get.testkube.io) beta && kubectl testkube disable telemetry

- name: Checkout tests from main Testkube repo
uses: actions/checkout@v3
with:
repository: kubeshop/testkube
path: testkube-repo

- name: Executor tests - delete/create/schedule all executor tests
working-directory: ./testkube-repo
run: chmod +x ./test/scripts/executor-tests/run.sh && ./test/scripts/executor-tests/run.sh -d -c -s # (delete, create, schedule) - don't execute

- name: (Re)create Postman Sanity test (with CLI)
working-directory: ./testkube-repo
run: |-
# enabling debug mode
set -x
kubectl -n testkube delete test sanity --ignore-not-found=true
kubectl -n testkube delete secret sanity-secrets --ignore-not-found=true
kubectl testkube create test -f ./test/postman/TestKube-Sanity.postman_collection.json --name sanity --type postman/collection -v api_uri=http://testkube-api-server:8088 -v test_api_uri=http://testkube-api-server:8088 -v test_type=postman/collection -v test_name=fill-me -v execution_name=fill-me

- name: Run Postman sanity tests
run: kubectl testkube run test sanity -f --git-branch develop

- name: (Re)create Dashboard E2E tests (from CRD)
working-directory: ./testkube-repo
run: |-
# enabling debug mode
set -x
kubectl -n testkube delete test dashboard-e2e-tests --ignore-not-found=true
kubectl apply -f ./test/dashboard-e2e/crd/crd.yaml

- name: (Re)create staging testsuite
working-directory: ./testkube-repo
run: |-
# enabling debug mode
set -x
kubectl -n testkube delete testsuite staging-testsuite --ignore-not-found=true
kubectl testkube create testsuite -f ./test/suites/staging-testsuite.json --name staging-testsuite

- name: Run staging testsuite
run: kubectl testkube run testsuite staging-testsuite -f --git-branch develop

notify_slack_if_test_suite_stage_succeeds:
runs-on: ubuntu-latest
needs: test_suite_run_stage
steps:
- name: Slack Notification if the test suite run on STAGE GKS succeeded.
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: testkube-logs
SLACK_COLOR: ${{ needs.test_suite_run_stage.result }} # or a specific color like 'good' or '#ff00ff'
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_TITLE: Test suite successfully run against ${{ env.GKE_CLUSTER_NAME_STAGE }} GKE :party_blob:!
SLACK_USERNAME: GitHub
SLACK_LINK_NAMES: true
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: "Kubeshop --> TestKube"

notify_slack_if_test_suite_failed:
runs-on: ubuntu-latest
needs: test_suite_run_stage
if: always() && (needs.test_suite_run_stage.result == 'failure')
steps:
- name: Slack Notification if the test suite run on ${{ env.ENV }} GKS failed.
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: testkube-logs
SLACK_COLOR: ${{ needs.test_suite_run_stage.result }} # or a specific color like 'good' or '#ff00ff'
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_TITLE: Test suite FAILED to run on ${{ env.GKE_CLUSTER_NAME_STAGE }} GKE! :boom:!
SLACK_USERNAME: GitHub
SLACK_LINK_NAMES: true
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: "Kubeshop --> TestKube"
8 changes: 4 additions & 4 deletions .github/workflows/helm-deploy-testkube-charts-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,19 @@ jobs:
if: ${{ github.event.client_payload.image_tag_api }}
run: |
helm dependency update ./charts/testkube
helm upgrade --debug --install --atomic --timeout 180s ${{ env.DEPLOYMENT_NAME }} ./charts/testkube --namespace ${{ env.DEPLOYMENT_NAME }} --create-namespace --values ./charts/testkube/values-${{ env.ENV }}.yaml --set testkube-api.image.tag=${{ github.event.client_payload.image_tag_api }} --set testkube-operator.image.tag=${{ steps.vars.outputs.operator_image_tag }} --set testkube-dashboard.image.tag=${{ steps.vars.outputs.dashboard_image_tag }} --set mongodb.livenessProbe.enabled=false --set mongodb.reasdinessProbe.enabled=false
helm upgrade --debug --install --atomic --timeout 180s ${{ env.DEPLOYMENT_NAME }} ./charts/testkube --namespace ${{ env.DEPLOYMENT_NAME }} --create-namespace --values ./charts/testkube/values-${{ env.ENV }}.yaml --set testkube-api.image.tag=${{ github.event.client_payload.image_tag_api }} --set testkube-operator.image.tag=${{ steps.vars.outputs.operator_image_tag }} --set testkube-dashboard.image.tag=${{ steps.vars.outputs.dashboard_image_tag }}

- name: Deploy if Testkube Dashboard image is updated
if: ${{ github.event.client_payload.image_tag_dashboard }}
run: |
helm dependency update ./charts/testkube
helm upgrade --debug --install --atomic --timeout 180s ${{ env.DEPLOYMENT_NAME }} ./charts/testkube --namespace ${{ env.DEPLOYMENT_NAME }} --create-namespace --values ./charts/testkube/values-${{ env.ENV }}.yaml --set testkube-dashboard.image.tag=${{ github.event.client_payload.image_tag_dashboard }} --set testkube-operator.image.tag=${{ steps.vars.outputs.operator_image_tag }} --set testkube-api.image.tag=${{ steps.vars.outputs.api_image_tag }} --set mongodb.livenessProbe.enabled=false --set mongodb.reasdinessProbe.enabled=false
helm upgrade --debug --install --atomic --timeout 180s ${{ env.DEPLOYMENT_NAME }} ./charts/testkube --namespace ${{ env.DEPLOYMENT_NAME }} --create-namespace --values ./charts/testkube/values-${{ env.ENV }}.yaml --set testkube-dashboard.image.tag=${{ github.event.client_payload.image_tag_dashboard }} --set testkube-operator.image.tag=${{ steps.vars.outputs.operator_image_tag }} --set testkube-api.image.tag=${{ steps.vars.outputs.api_image_tag }}

- name: Deploy if Testkube Operator image is updated
if: ${{ github.event.client_payload.image_tag_operator }}
run: |
helm dependency update ./charts/testkube
helm upgrade --debug --install --atomic --timeout 180s ${{ env.DEPLOYMENT_NAME }} ./charts/testkube --namespace ${{ env.DEPLOYMENT_NAME }} --create-namespace --values ./charts/testkube/values-${{ env.ENV }}.yaml --set testkube-operator.image.tag=${{ github.event.client_payload.image_tag_operator }} --set testkube-dashboard.image.tag=${{ steps.vars.outputs.dashboard_image_tag }} --set testkube-api.image.tag=${{ steps.vars.outputs.api_image_tag }} --set mongodb.livenessProbe.enabled=false --set mongodb.reasdinessProbe.enabled=false
helm upgrade --debug --install --atomic --timeout 180s ${{ env.DEPLOYMENT_NAME }} ./charts/testkube --namespace ${{ env.DEPLOYMENT_NAME }} --create-namespace --values ./charts/testkube/values-${{ env.ENV }}.yaml --set testkube-operator.image.tag=${{ github.event.client_payload.image_tag_operator }} --set testkube-dashboard.image.tag=${{ steps.vars.outputs.dashboard_image_tag }} --set testkube-api.image.tag=${{ steps.vars.outputs.api_image_tag }}

notify_slack_if_deploy_stage_succeeds:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
credentials: ${{ secrets.GKE_SA_KEY }}

- name: Install testkube kubectl plugin and disable telemetry
run: bash < <(curl -sSLf https://get.testkube.io ) && kubectl testkube disable telemetry
run: bash <(curl -sSLf https://get.testkube.io) beta && kubectl testkube disable telemetry

- name: Checkout tests from main Testkube repo
uses: actions/checkout@v3
Expand Down
112 changes: 112 additions & 0 deletions .github/workflows/helm-releaser-testkube-main-chart-only.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,118 @@ jobs:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: "Kubeshop --> TestKube"

update_release_notes:
needs: notify_slack_if_release_succeeds
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get Latest Tag
id: get_latest_tag
run: |
latest_tag=$(git describe --abbrev=0 --tags)
echo "::set-output name=latest_tag::${latest_tag}"

- name: Get Previous Tag
id: get_previous_tag
run: |
previous_tag=$(git describe --abbrev=0 --tags ${TAG}^)
echo "::set-output name=previous_tag::${previous_tag}"
env:
TAG: ${{ steps.get_latest_tag.outputs.latest_tag }}

- name: Generate Changelog
id: generate_changelog
env:
GH_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
run: |
#!/bin/bash

PREVIOUS_TAG=${{ steps.get_previous_tag.outputs.previous_tag }}
CURRENT_TAG=${{ steps.get_latest_tag.outputs.latest_tag }}

echo $PREVIOUS_TAG
echo $CURRENT_TAG

MERGED_PRS=$(git log --merges --pretty=format:"- %h: %s (#%b) (@%an)" $PREVIOUS_TAG..$CURRENT_TAG)
echo $MERGED_PRS

if [ -n "$MERGED_PRS" ]; then
echo "# Changelog" > CHANGELOG.md

FEATURE_PRS=""
FIX_PRS=""
OTHER_PRS=""
DOCS_PRS=""

while IFS= read -r pr; do
sha=$(echo "$pr" | awk '{print $1 " " $2}')
pr_number=$(echo "$pr" | awk -F'#' '{print "#" $2}' | awk '{print $1}')
pr_title=$(echo "$pr" | awk -F'[(]|[)]' '{sub(/^#/, "", $2); print $2}')
author=$(echo "$pr" | awk -F'[()]' '{print "(" $4 ")"}')

if [[ "$pr_title" == *"feat"* ]]; then
FEATURE_PRS+="\n ${sha} ${pr_title} ${pr_number} ${author}"
echo "New features"
echo $FEATURE_PRS
elif [[ "$pr_title" == *"fix"* ]]; then
FIX_PRS+="\n ${sha} ${pr_title} ${pr_number} ${author}"
echo "Bug fixes"
echo $FIX_PRS
elif [[ "$pr_title" == *"docs"* ]]; then
DOCS_PRS+="\n ${sha} ${pr_title} ${pr_number} ${author}"
echo "Documentation updates"
echo $DOCS_PRS
else
OTHER_PRS+="\n ${sha} ${pr_title} ${pr_number} ${author}"
echo "Other changes"
echo $OTHER_PRS
fi
done < <(echo "$MERGED_PRS")

if [ -n "$FEATURE_PRS" ]; then
echo "## Features" >> CHANGELOG.md
echo -e "$FEATURE_PRS" >> CHANGELOG.md
echo "" >> CHANGELOG.md
fi

if [ -n "$FIX_PRS" ]; then
echo "## Bug Fixes" >> CHANGELOG.md
echo -e "$FIX_PRS" >> CHANGELOG.md
echo "" >> CHANGELOG.md
fi

if [ -n "$DOCS_PRS" ]; then
echo "## Documentation Updates" >> CHANGELOG.md
echo -e "$DOCS_PRS" >> CHANGELOG.md
echo "" >> CHANGELOG.md
fi

if [ -n "$OTHER_PRS" ]; then
echo "## Other Changes" >> CHANGELOG.md
echo -e "$OTHER_PRS" >> CHANGELOG.md
echo "" >> CHANGELOG.md
fi

echo "Printing changelog"
cat CHANGELOG.md
echo "Updating release"

gh release edit $CURRENT_TAG --notes-file CHANGELOG.md

else
echo "No merged pull requests found. Adding commits"
COMMIT_CHANGELOG=$(git log --pretty=format:"- %s %h (@%an)" $PREVIOUS_TAG..$CURRENT_TAG)
echo "# Commit Changelog" > CHANGELOG.md
echo "" >> CHANGELOG.md
echo "${COMMIT_CHANGELOG}" >> CHANGELOG.md

gh release edit $CURRENT_TAG --notes-file CHANGELOG.md
fi

test_suite_run_dev:
name: test suite for DEV GKE.
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions charts/testkube-api/slack-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@
{
"type": "divider"
},
{{ if .ClusterName }}
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Cluster Name: {{ .ClusterName }}"
}
},
{{ end }}
{
"type": "section",
"text": {
Expand Down
Loading