-
Notifications
You must be signed in to change notification settings - Fork 44
372 lines (360 loc) · 13.2 KB
/
rover.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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: CI
on:
pull_request:
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v2
with:
go-version: "1.21"
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
submodules: true
- name: Check License
uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587
- name: Get dependencies
run: make deps
- name: Test
run: make container-test
- name: BTF Generate
run: make container-btfgen
- name: Lint
run: make container-safe-lint
- name: Make binary
run: make linux
- name: Check CI Consistency
run: make check
docker:
name: Docker images
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build and save docker images
run: |
make docker
docker save -o docker-images-skywalking-rover.tar apache/skywalking-rover:latest
- name: Upload docker images
uses: actions/upload-artifact@v2
with:
name: docker-images-skywalking-rover
path: docker-images-skywalking-rover.tar
e2e-test:
name: E2E test
needs: [ docker ]
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
test:
- name: Golang On CPU Profiling
base: test/e2e/cases/profiling/task/oncpu/golang
config: e2e.yaml
docker:
file: Dockerfile.sqrt
name: test/oncpu-golang:test
- name: C++ On CPU Profiling
base: test/e2e/cases/profiling/task/oncpu/c++
config: e2e.yaml
docker:
file: Dockerfile.sqrt
name: test/oncpu-c_plus_plus:test
- name: C On CPU Profiling
base: test/e2e/cases/profiling/task/oncpu/c
config: e2e.yaml
docker:
file: Dockerfile.sqrt
name: test/oncpu-c:test
- name: Rust On CPU Profiling
base: test/e2e/cases/profiling/task/oncpu/rust
config: e2e.yaml
docker:
file: Dockerfile.sqrt
name: test/oncpu-rust:test
- name: Golang Off CPU Profiling
base: test/e2e/cases/profiling/task/offcpu/golang
config: e2e.yaml
docker:
file: Dockerfile.file
name: test/offcpu-golang:test
- name: C++ Off CPU Profiling
base: test/e2e/cases/profiling/task/offcpu/c++
config: e2e.yaml
docker:
file: Dockerfile.file
name: test/offcpu-c_plus_plus:test
- name: C Off CPU Profiling
base: test/e2e/cases/profiling/task/offcpu/c
config: e2e.yaml
docker:
file: Dockerfile.file
name: test/offcpu-c:test
- name: Rust Off CPU Profiling
base: test/e2e/cases/profiling/task/offcpu/rust
config: e2e.yaml
docker:
file: Dockerfile.file
name: test/offcpu-rust:test
- name: Istio Process Finder 1.8.2
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.8.2
- name: Istio Process Finder 1.9.1
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.9.1
- name: Istio Process Finder 1.10.3
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.10.3
- name: Istio Process Finder 1.11.4
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.11.4
- name: Istio Process Finder 1.12.0
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.12.0
- name: Istio Process Finder 1.13.1
base: test/e2e/cases/process/istio
config: e2e.yaml
env: ISTIO_VERSION=1.13.1
- name: Access Log
base: test/e2e/cases/access_log
config: e2e.yaml
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/download-artifact@v2
name: Download docker images
with:
name: docker-images-skywalking-rover
path: docker-images
- name: Load docker images
run: find docker-images -name "*.tar" -exec docker load -i {} \;
- name: Set env var
run: echo "${{ matrix.test.env }}" >> $GITHUB_ENV
- name: Build test image
if: matrix.test.docker != null
run: docker build -t ${{ matrix.test.docker.name }} -f ${{ matrix.test.base }}/${{ matrix.test.docker.file }} ${{ matrix.test.base }}
- name: ${{ matrix.test.name }}
uses: apache/skywalking-infra-e2e@c3eb3241f649289465eda12af8214ca60aaaaa5f
with:
e2e-file: $GITHUB_WORKSPACE/${{ matrix.test.base }}/${{ matrix.test.config }}
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
name: Upload Logs
with:
name: logs
path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
network-profiling-https-e2e-test-prepare:
name: Prepare Network Profiling HTTPS E2E test
needs: [ docker ]
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup SSL Certs
run: |
mkdir -p $(pwd)/test/e2e/cases/profiling/task/network/base/ssl/
bash test/e2e/base/scripts/gen-selfsigned-ssl.sh service $(pwd)/test/e2e/cases/profiling/task/network/base/ssl/
bash test/e2e/base/scripts/gen-selfsigned-ssl.sh proxy $(pwd)/test/e2e/cases/profiling/task/network/base/ssl/
- name: Build nginx docker image
run: |
docker build -t test/test-nginx:test -f test/e2e/cases/profiling/task/network/base/Dockerfile.nginx test/e2e/cases/profiling/task/network/base/
docker save -o docker-images-nginx.tar test/test-nginx:test
- name: Upload SSL Certs
uses: actions/upload-artifact@v2
with:
name: network-ssl-data
path: test/e2e/cases/profiling/task/network/base/ssl
- name: Upload docker images
uses: actions/upload-artifact@v2
with:
name: docker-images-test-nginx
path: docker-images-nginx.tar
network-profiling-https-e2e-test:
name: Network Profiling HTTPS E2E test
needs: [ network-profiling-https-e2e-test-prepare ]
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
test:
- name: Golang Profiling
config: golang/e2e.yaml
docker:
file: golang/Dockerfile
name: test/network-golang:test
- name: Envoy Profiling
config: envoy/e2e.yaml
env: ISTIO_VERSION=1.13.1
- name: C++ Profiling
config: c_plus_plus/e2e.yaml
docker:
file: c_plus_plus/Dockerfile
name: test/network-c_plus_plus:test
- name: Nodejs Profiling
config: nodejs/e2e.yaml
docker:
file: nodejs/Dockerfile
name: test/network-nodejs:test
- name: HTTP2 Profiling
config: http2/e2e.yaml
docker:
file: http2/Dockerfile
name: test/network-http2:test
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/download-artifact@v2
name: Download rover docker image
with:
name: docker-images-skywalking-rover
path: docker-images
- uses: actions/download-artifact@v2
name: Download nginx docker image
with:
name: docker-images-test-nginx
path: docker-images
- uses: actions/download-artifact@v2
name: Download SSL Data
with:
name: network-ssl-data
path: test/e2e/cases/profiling/task/network/base/ssl/
- name: Load docker images
run: find docker-images -name "*.tar" -exec docker load -i {} \;
- name: Set env var
run: echo "${{ matrix.test.env }}" >> $GITHUB_ENV
- name: Build test image
if: matrix.test.docker != null
run: docker build -t ${{ matrix.test.docker.name }} -f test/e2e/cases/profiling/task/network/${{ matrix.test.docker.file }} test/e2e/cases/profiling/task/network
- name: Copy SSL Cert to the absolute host path and trust it
run: |
cp -r test/e2e/cases/profiling/task/network/base/ssl/ /tmp/ssl_data
bash test/e2e/base/scripts/update-signed-ssl.sh service /tmp/ssl_data
bash test/e2e/base/scripts/update-signed-ssl.sh proxy /tmp/ssl_data
- name: ${{ matrix.test.name }}
uses: apache/skywalking-infra-e2e@c3eb3241f649289465eda12af8214ca60aaaaa5f
with:
e2e-file: $GITHUB_WORKSPACE/test/e2e/cases/profiling/task/network/${{ matrix.test.config }}
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
name: Upload Logs
with:
name: logs
path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
continuous-profiling-e2e-tests:
name: Continuous Profiling E2E tests
needs: [ docker ]
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
test:
- name: HTTP Avg Response Time
config: http_avg_response_time/e2e.yaml
docker:
file: http_avg_response_time/Dockerfile
name: test/continuous-http_avg_response_time:test
- name: HTTP Error Rate
config: http_error_rate/e2e.yaml
docker:
file: http_error_rate/Dockerfile
name: test/continuous-http_error_rate:test
- name: Process CPU
config: process_cpu/e2e.yaml
docker:
file: process_cpu/Dockerfile
name: test/continuous-process_cpu:test
- name: Process Thread Count
config: process_thread_count/e2e.yaml
docker:
file: process_thread_count/Dockerfile
name: test/continuous-process_thread_count:test
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/download-artifact@v2
name: Download docker images
with:
name: docker-images-skywalking-rover
path: docker-images
- name: Load docker images
run: find docker-images -name "*.tar" -exec docker load -i {} \;
- name: Set env var
run: echo "${{ matrix.test.env }}" >> $GITHUB_ENV
- name: Setup SSL Certs
run: |
mkdir -p $(pwd)/test/e2e/cases/profiling/continuous/ssl/
mkdir -p /tmp/ssl_data
bash test/e2e/base/scripts/gen-selfsigned-ssl.sh service $(pwd)/test/e2e/cases/profiling/continuous/ssl/
cp $(pwd)/test/e2e/cases/profiling/continuous/ssl/* /tmp/ssl_data
- name: Build test image
if: matrix.test.docker != null
run: docker build -t ${{ matrix.test.docker.name }} -f test/e2e/cases/profiling/continuous/${{ matrix.test.docker.file }} test/e2e/cases/profiling/continuous
- name: ${{ matrix.test.name }}
uses: apache/skywalking-infra-e2e@c3eb3241f649289465eda12af8214ca60aaaaa5f
with:
e2e-file: $GITHUB_WORKSPACE/test/e2e/cases/profiling/continuous/${{ matrix.test.config }}
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
name: Upload Logs
with:
name: logs
path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
required:
if: always()
name: Required
needs:
- build
- e2e-test
- network-profiling-https-e2e-test
- continuous-profiling-e2e-tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Merge Requirement
run: |
if [[ ${{ needs.build.result }} != 'success' ]]; then
exit -1
fi
if [[ ${{ needs.e2e-test.result }} != 'success' ]]; then
exit -1
fi
if [[ ${{ needs.network-profiling-https-e2e-test.result }} != 'success' ]]; then
exit -1
fi
if [[ ${{ needs.continuous-profiling-e2e-tests.result }} != 'success' ]]; then
exit -1
fi