-
Notifications
You must be signed in to change notification settings - Fork 21
84 lines (80 loc) · 2.87 KB
/
performance-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This workflow is responsible for all kinds of performance tests
name: main performance tests
on:
schedule:
- cron: '0 5 * * *' # Run every day at 05:00 AM
workflow_dispatch: {}
jobs:
build-image:
name: Build manager image
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: istio-manager
dockerfile: Dockerfile
context: .
build-args: |
VERSION=${{ github.ref_name }}
tags: "${{ github.sha }}"
istio-performance-test:
name: Istio performance test
runs-on: ubuntu-latest
needs: [ build-image ]
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ./tests/integration/scripts/gardener-kubeconfig.sh
shell: bash
env:
GARDENER_TOKEN: ${{ secrets.GARDENER_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- run: |
make IMG="europe-docker.pkg.dev/kyma-project/prod/istio/main/istio-manager:${{ github.sha }}" gardener-perf-test
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GARDENER_KUBECONFIG: "/home/runner/work/istio/istio/gardener_kubeconfig.yaml"
GARDENER_PROJECT_NAME: "goats"
GARDENER_PROVIDER_SECRET_NAME: "goat"
GARDENER_PROVIDER: "gcp"
GARDENER_REGION: "europe-west3"
GARDENER_CLUSTER_VERSION: "1.30"
MACHINE_TYPE: "n2-standard-4"
DISK_SIZE: 50
DISK_TYPE: "pd-standard"
SCALER_MAX: 20
SCALER_MIN: 3
- uses: actions/upload-artifact@v4
if: always()
name: Export no sidecar summary
with:
name: no-sidecar
path: tests/performance/summary-no-sidecar.html
- uses: actions/upload-artifact@v4
if: always()
name: Export sidecar summary
with:
name: sidecar
path: tests/performance/summary-sidecar.html
- name: Check threshold breaches on test without sidecar
if: always()
shell: bash
run: if [[ $(cat tests/performance/summary-no-sidecar.html | grep "<h4>Breached Thresholds</h4>" -A1 | grep -oe ">\d<" | sed 's/[<>]//g') -ne 0 ]]; then exit 1; fi
- name: Check threshold breaches on test with sidecar
if: always()
shell: bash
run: if [[ $(cat tests/performance/summary-sidecar.html | grep "<h4>Breached Thresholds</h4>" -A1 | grep -oe ">\d<" | sed 's/[<>]//g') -ne 0 ]]; then exit 1; fi
slack_failed_notification:
name: Slack Notification
runs-on: ubuntu-latest
if: ${{ failure() }}
needs: [istio-performance-test]
steps:
- uses: actions/checkout@v4
- name: Notify
uses: ./.github/actions/slack-notification-failed-workflow
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}