-
Notifications
You must be signed in to change notification settings - Fork 5
133 lines (121 loc) · 4.86 KB
/
tyk-dp.yml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Tyk Data Plane Tests
# Controls when the workflow will run
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
env:
MAX_ATTEMPTS: 3
TIMEOUT: 30
jobs:
tyk-dp:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
deployment:
- cert-manager
- datadog
- elasticsearch
- elasticsearch-kibana
- jaeger
- k6
- kafka
- keycloak
- keycloak-jwt
- newrelic
- opensearch
- operator
- operator-federation
- operator-graphql
- operator-httpbin
- operator-jwt-hmac
- operator-kafka
- operator-kafka-avro
- operator-udg
- prometheus
- prometheus-grafana
- vault
steps:
- uses: actions/checkout@v4
- name: start Minikube
uses: medyagh/setup-minikube@latest
with:
kubernetes-version: v1.23.13
extra-config: 'kubelet.max-pods=100'
addons: 'default-storageclass,storage-provisioner,ingress'
start-args: '--force'
- name: Install helm
uses: Azure/setup-helm@v4
- name: Install newman
run: |
sudo apt update && \
sudo apt install nodejs npm -y && \
npm install -g newman
- name: Copy .env file
run: cp .env.example .env
- name: Deploy tyk-dp-${{ matrix.deployment }}
uses: nick-invision/retry@v3
with:
max_attempts: ${{ env.MAX_ATTEMPTS }}
timeout_minutes: ${{ env.TIMEOUT }}
command: |
TYK_DATA_PLANE_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_CONNECTIONSTRING }}" \
TYK_DATA_PLANE_ORGID="${{ secrets.TYK_DATA_PLANE_ORGID }}" \
TYK_DATA_PLANE_AUTHTOKEN="${{ secrets.TYK_DATA_PLANE_AUTHTOKEN }}" \
TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING }}" \
OPERATOR_LICENSE="${{ secrets.DASH_LICENSE }}" \
DATADOG_APIKEY="${{ secrets.DATADOG_APIKEY }}" \
DATADOG_APPKEY="${{ secrets.DATADOG_APPKEY }}" \
NEWRELIC_LICENSEKEY="${{ secrets.NEWRELIC_LICENSEKEY }}" \
./up.sh -v \
--redis redis \
--namespace tyk-dp-${{ matrix.deployment }} \
--deployments ${{ matrix.deployment }} \
tyk-dp
- name: Sleep 1 minute
run: sleep 60
- name: Test Tyk deployment
uses: nick-invision/retry@v3
with:
max_attempts: ${{ env.MAX_ATTEMPTS }}
timeout_minutes: ${{ env.TIMEOUT }}
on_retry_command: |
TYK_DATA_PLANE_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_CONNECTIONSTRING }}" \
TYK_DATA_PLANE_ORGID="${{ secrets.TYK_DATA_PLANE_ORGID }}" \
TYK_DATA_PLANE_AUTHTOKEN="${{ secrets.TYK_DATA_PLANE_AUTHTOKEN }}" \
TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING }}" \
OPERATOR_LICENSE="${{ secrets.DASH_LICENSE }}" \
DATADOG_APIKEY="${{ secrets.DATADOG_APIKEY }}" \
DATADOG_APPKEY="${{ secrets.DATADOG_APPKEY }}" \
NEWRELIC_LICENSEKEY="${{ secrets.NEWRELIC_LICENSEKEY }}" \
./up.sh -v \
--redis redis \
--namespace tyk-dp-${{ matrix.deployment }} \
--deployments ${{ matrix.deployment }} \
tyk-dp && sleep 180
command: newman run --folder gateway --env-var "gateway.port=8081" --env-var "deployment=data-plane" tyk-k8s-demo.postman_collection.json
- name: Test ${{ matrix.deployment }}
uses: nick-invision/retry@v3
with:
max_attempts: ${{ env.MAX_ATTEMPTS }}
timeout_minutes: ${{ env.TIMEOUT }}
on_retry_command: |
TYK_DATA_PLANE_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_CONNECTIONSTRING }}" \
TYK_DATA_PLANE_ORGID="${{ secrets.TYK_DATA_PLANE_ORGID }}" \
TYK_DATA_PLANE_AUTHTOKEN="${{ secrets.TYK_DATA_PLANE_AUTHTOKEN }}" \
TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_DATA_PLANE_OPERATOR_CONNECTIONSTRING }}" \
OPERATOR_LICENSE="${{ secrets.DASH_LICENSE }}" \
DATADOG_APIKEY="${{ secrets.DATADOG_APIKEY }}" \
DATADOG_APPKEY="${{ secrets.DATADOG_APPKEY }}" \
NEWRELIC_LICENSEKEY="${{ secrets.NEWRELIC_LICENSEKEY }}" \
./up.sh -v \
--redis redis \
--namespace tyk-dp-${{ matrix.deployment }} \
--deployments ${{ matrix.deployment }} \
tyk-dp && sleep 180
command: newman run --folder ${{ matrix.deployment }} --insecure --env-var "gateway.port=8081" -n 1 tyk-k8s-demo.postman_collection.json
- name: Clean up
run: ./down.sh -v --namespace tyk-dp-${{ matrix.deployment }}