-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
555 lines (530 loc) · 17.8 KB
/
.gitlab-ci.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
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
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
variables:
BUILD_IMAGES_PROJECT: openconnect/build-images
CENTOS6_BUILD: openconnect-cli-centos6
CENTOS7_BUILD: openconnect-cli-centos7
CENTOS8_BUILD: openconnect-cli-centos8
FEDORA_BUILD: openconnect-cli-fedora
UBUNTU_BUILD: openconnect-cli-ubuntu
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
CentOS7/GnuTLS:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS7_BUILD
script:
- ./autogen.sh
# For reasons that are not clear, OpenConnect fails to handshake a TLS connection to Python 3.6+Flask
# (verified in https://gitlab.com/openconnect/openconnect/-/jobs/1135245618#L520), so we disable the
# Flask-based authentication tests.
- ./configure --with-java --enable-ppp-tests --disable-flask-tests CFLAGS=-g
- make -j4
# auth-nonascii: UTF-8 support is not available in distro's ocserv package
- make VERBOSE=1 XFAIL_TESTS="auth-nonascii" -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- tests/*.log
CentOS7/OpenSSL:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS7_BUILD
script:
- ./autogen.sh
# For reasons that are not clear, OpenConnect fails to handshake a TLS connection to Python 3.6+Flask
# (verified in https://gitlab.com/openconnect/openconnect/-/jobs/1135245618#L520), so we disable the
# Flask-based authentication tests.
- ./configure --without-gnutls --with-openssl --with-java --without-openssl-version-check --enable-dtls-xfail --disable-dsa-tests --enable-ppp-tests --disable-flask-tests CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# auth-nonascii: UTF-8 support is not available in distro's ocserv package
# dtls-psk: communication with ocserv fails for undetermined reasons marking as xfail until issue is identified
- make VERBOSE=1 XFAIL_TESTS="auth-nonascii dtls-psk" -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- tests/*.log
CentOS8/GnuTLS:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS8_BUILD
script:
- ./autogen.sh
- ./configure --with-java --without-gnutls-version-check --disable-dsa-tests --enable-ppp-tests CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# auth-nonascii: UTF-8 support is not available in distro's ocserv package
- make VERBOSE=1 XFAIL_TESTS="auth-nonascii" -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- tests/*.log
CentOS8/OpenSSL:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS8_BUILD
script:
- ./autogen.sh
- ./configure --without-gnutls --with-openssl --with-java --without-openssl-version-check --disable-dsa-tests --enable-ppp-tests CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# auth-nonascii: UTF-8 support is not available in distro's ocserv package
# obsolete-server-crypto: OpenSSL 1.1.0 disables 3DES and RC4 by default (https://www.openssl.org/blog/blog/2016/08/24/sweet32/)
- make VERBOSE=1 XFAIL_TESTS="auth-nonascii obsolete-server-crypto" -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- tests/*.log
CentOS6/OpenSSL:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS6_BUILD
script:
- ./autogen.sh
# We should --enable-ppp-tests here, but they just aren't working. For reasons that are not
# clear, OpenConnect fails to handshake a TLS connection to socat 1.7.2 (from CentOS 6 EPEL).
- ./configure --with-java --without-openssl-version-check --enable-dtls-xfail CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# auth-nonascii: UTF-8 support is not available in distro's ocserv package
- make VERBOSE=1 XFAIL_TESTS="bad_dtls_test auth-nonascii" -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- tests/*.log
Signoff:
script:
# Quoted to work around https://gitlab.com/gitlab-org/gitlab-foss/-/issues/20177
- 'echo "Checking for new commits without Signed-off-by: tags as described in http://www.infradead.org/openconnect/contribute.html"'
# Last bad commit
- 'git log ceab1765db11c15a18a0c605812dbc11afd63e8b.. --grep "(^Signed-off-by)|(^Merge branch)|(^This reverts commit)" --extended-regexp --invert-grep --exit-code'
- echo "None (good)"
Coverity:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS8_BUILD
only:
- schedules
- coverity
script:
- curl -o /tmp/cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64
--form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN
- tar xfz /tmp/cov-analysis-linux64.tgz
- ./autogen.sh
- ./configure --with-java --without-gnutls --with-openssl --disable-dsa-tests
- cd java
- ../cov-analysis-linux64-*/bin/cov-build --dir ../cov-int ant
- cd ..
- cov-analysis-linux64-*/bin/cov-build --dir cov-int make -j4
- make clean
- ./configure --with-java --disable-dsa-tests --without-gnutls-version-check
- cov-analysis-linux64-*/bin/cov-build --dir cov-int make -j4
- tar cfz cov-int.tar.gz cov-int
- curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
--form token=$COVERITY_SCAN_TOKEN --form email=email=$GITLAB_USER_EMAIL
--form [email protected] --form version="`git describe --tags`"
--form description="`git describe --tags` / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID "
tags:
- shared
artifacts:
expire_in: 1 week
when: on_failure
paths:
- cov-int/*.txt
ubsan/GnuTLS/Fedora:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- ./autogen.sh
- export UBCFLAGS="-Wall -Wextra -fsanitize=undefined -fsanitize=bool -fsanitize=alignment -fsanitize=null -fsanitize=bounds-strict -fsanitize=enum -fno-sanitize-recover -g -O2"
- CFLAGS="$UBCFLAGS" ./configure --with-java --disable-dsa-tests --without-gnutls-version-check
- make -j4
- make VERBOSE=1 -j4 check
tags:
- shared
- linux
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- ./*.log
- tests/*.log
ubsan/OpenSSL/Fedora:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- ./autogen.sh
- export UBCFLAGS="-Wall -Wextra -fsanitize=undefined -fsanitize=bool -fsanitize=alignment -fsanitize=null -fsanitize=bounds-strict -fsanitize=enum -fno-sanitize-recover -g -O2"
- CFLAGS="$UBCFLAGS" ./configure --without-gnutls --with-openssl --without-openssl-version-check --disable-dsa-tests
- make -j4
# obsolete-server-crypto: OpenSSL 1.1.0 disables 3DES and RC4 by default (https://www.openssl.org/blog/blog/2016/08/24/sweet32/)
- make VERBOSE=1 XFAIL_TESTS="obsolete-server-crypto" -j4 check
tags:
- shared
- linux
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- ./*.log
- tests/*.log
asan/GnuTLS/Fedora:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- ./autogen.sh
- CC=clang CFLAGS="-fsanitize=address -fno-optimize-sibling-calls -fno-omit-frame-pointer -g -O1"
./configure --with-java --disable-dsa-tests --without-gnutls-version-check --without-asan-broken-tests
- make -j4
- make VERBOSE=1 -j4 check
tags:
- shared
- linux
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- ./*.log
- tests/*.log
asan/OpenSSL/Fedora:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- ./autogen.sh
- CC=clang CFLAGS="-fsanitize=address -fno-optimize-sibling-calls -fno-omit-frame-pointer -g -O1"
./configure --without-gnutls --with-openssl --without-openssl-version-check --disable-dsa-tests --without-asan-broken-tests
- make -j4
# obsolete-server-crypto: OpenSSL 1.1.0 disables 3DES and RC4 by default (https://www.openssl.org/blog/blog/2016/08/24/sweet32/)
- make VERBOSE=1 XFAIL_TESTS="obsolete-server-crypto" -j4 check
tags:
- shared
- linux
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- ./*.log
- tests/*.log
Fedora/GnuTLS:
script:
- dnf -y install swtpm swtpm-tools
- ./autogen.sh
- ./configure --with-java --disable-dsa-tests --without-gnutls-version-check --enable-ppp-tests CFLAGS=-g
- make tmp-distdir
- mkdir build
- cd build
- TMPDISTDIR=../openconnect-$(git describe --tags | sed s/^v//)
- ${TMPDISTDIR}/configure --with-java --disable-dsa-tests --without-gnutls-version-check --enable-ppp-tests CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# auth-pkcs11: Disable rdrand to work around https://bugzilla.redhat.com/1831086
- make VERBOSE=1 OPENSSL_ia32cap=~0x4000000000000000 -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- build/tests/*.log
Fedora/GnuTLS/ibmtss:
script:
- dnf -y install swtpm swtpm-tools
- ./autogen.sh
- ./configure --with-java --disable-dsa-tests --without-gnutls-version-check --enable-ppp-tests CFLAGS=-g
- make tmp-distdir
- mkdir build
- cd build
- TMPDISTDIR=../openconnect-$(git describe --tags | sed s/^v//)
- ${TMPDISTDIR}/configure --with-java --disable-dsa-tests --without-gnutls-version-check --enable-ppp-tests --with-gnutls-tss2=ibmtss CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# auth-pkcs11: Disable rdrand to work around https://bugzilla.redhat.com/1831086
- make VERBOSE=1 OPENSSL_ia32cap=~0x4000000000000000 -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- build/tests/*.log
Fedora/GnuTLS/clang:
script:
- ./autogen.sh
- ./configure --with-java --disable-dsa-tests --without-gnutls-version-check CC=clang --enable-ppp-tests CFLAGS=-g
- make tmp-distdir
- mkdir build
- cd build
- TMPDISTDIR=../openconnect-$(git describe --tags | sed s/^v//)
- ${TMPDISTDIR}/configure --with-java --disable-dsa-tests --without-gnutls-version-check CC=clang --enable-ppp-tests CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# auth-pkcs11: Disable rdrand to work around https://bugzilla.redhat.com/1831086
- make VERBOSE=1 OPENSSL_ia32cap=~0x4000000000000000 -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- build/tests/*.log
Fedora/OpenSSL:
script:
# Re-enable DSA since we test it
- update-crypto-policies --set LEGACY
- ./autogen.sh
- ./configure --without-gnutls --with-openssl --without-openssl-version-check --disable-dsa-tests --enable-ppp-tests CFLAGS=-g
- make tmp-distdir
- mkdir build
- cd build
- TMPDISTDIR=../openconnect-$(git describe --tags | sed s/^v//)
- ${TMPDISTDIR}/configure --without-gnutls --with-openssl --without-openssl-version-check --disable-dsa-tests --enable-ppp-tests CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# auth-nonascii: UTF-8 support is not available in distro's ocserv package
# obsolete-server-crypto: OpenSSL 1.1.0 disables 3DES and RC4 by default (https://www.openssl.org/blog/blog/2016/08/24/sweet32/)
- make VERBOSE=1 XFAIL_TESTS="obsolete-server-crypto" -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- build/tests/*.log
Fedora/OpenSSL/clang:
script:
# Re-enable DSA since we test it
- update-crypto-policies --set LEGACY
- ./autogen.sh
- ./configure CC=clang --without-gnutls --with-openssl --without-openssl-version-check --disable-dsa-tests --enable-ppp-tests CFLAGS=-g
- make tmp-distdir
- mkdir build
- cd build
- TMPDISTDIR=../openconnect-$(git describe --tags | sed s/^v//)
- ${TMPDISTDIR}/configure CC=clang --without-gnutls --with-openssl --without-openssl-version-check --disable-dsa-tests --enable-ppp-tests CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# obsolete-server-crypto: OpenSSL 1.1.0 disables 3DES and RC4 by default (https://www.openssl.org/blog/blog/2016/08/24/sweet32/)
- make VERBOSE=1 XFAIL_TESTS="obsolete-server-crypto" -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- build/tests/*.log
Ubuntu18.04/GnuTLS:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$UBUNTU_BUILD
script:
- ./autogen.sh
- ./configure --with-java --enable-ppp-tests CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# For reasons that are unclear, but probably also unimportant, IPv6 is disabled by default on this CI
# image (verified in https://gitlab.com/openconnect/openconnect/-/jobs/1135199323#L335), and this will
# cause PPP tests using IPv6 to fail. So we must explicitly enable IPv6:
- sysctl net.ipv6.conf.all.disable_ipv6=0
# auth-nonascii: UTF-8 support is not available in distro's ocserv package
- make VERBOSE=1 XFAIL_TESTS="auth-nonascii" -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
paths:
- tests/*.log
Ubuntu18.04/OpenSSL:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$UBUNTU_BUILD
script:
- ./autogen.sh
- ./configure --without-gnutls --with-openssl --with-java --without-openssl-version-check --disable-dsa-tests --enable-ppp-tests CFLAGS=-g
- make -j4
# we don't want pppd to invoke any actual connection scripts
- mv /etc/ppp /etc/ppp.DISABLED
# For reasons that are unclear, but probably also unimportant, IPv6 is disabled by default on this CI
# image (verified in https://gitlab.com/openconnect/openconnect/-/jobs/1135199323#L335), and this will
# cause PPP tests using IPv6 to fail. So we must explicitly enable IPv6:
- sysctl net.ipv6.conf.all.disable_ipv6=0
# auth-nonascii: UTF-8 support is not available in distro's ocserv package
# obsolete-server-crypto: OpenSSL 1.1.0 disables 3DES and RC4 by default (https://www.openssl.org/blog/blog/2016/08/24/sweet32/)
- make VERBOSE=1 XFAIL_TESTS="auth-nonascii obsolete-server-crypto" -j4 check
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- tests/*.log
MinGW32/GnuTLS:
script:
- mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
- echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
- ./autogen.sh
- mingw32-configure --without-gnutls-version-check CFLAGS=-g
- make -j4
# These tests seem to fail due to wine failing to start; setting as XFAIL
# since these never run before this patch set.
- make VERBOSE=1 -j4 check XFAIL_TESTS="sigterm dtls-psk"
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: always
paths:
- tests/*.log
- openconnect-installer.exe
MinGW32/OpenSSL:
script:
- mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
- echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
- ./autogen.sh
- mingw32-configure --without-gnutls --with-openssl --without-openssl-version-check CFLAGS=-g
- make -j4
# These tests seem to fail due to wine failing to start; setting as XFAIL
# since these never run before this patch set.
- make VERBOSE=1 -j4 check XFAIL_TESTS="sigterm dtls-psk"
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: always
paths:
- tests/*.log
- openconnect-installer.exe
MinGW64/GnuTLS:
script:
- dnf remove -y wine.i686
- mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
- echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
- ./autogen.sh
- mingw64-configure --without-gnutls-version-check CFLAGS=-g
- make -j4
# These tests seem to fail due to wine failing to start; setting as XFAIL
# since these never run before this patch set.
- make VERBOSE=1 -j4 check XFAIL_TESTS="sigterm dtls-psk"
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: always
paths:
- tests/*.log
- openconnect-installer.exe
MinGW64/OpenSSL:
script:
- dnf remove -y wine.i686
- mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
- echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
- ./autogen.sh
- mingw64-configure --without-gnutls --with-openssl --without-openssl-version-check CFLAGS=-g
- make -j4
# These tests seem to fail due to wine failing to start; setting as XFAIL
# since these never run before this patch set.
- make VERBOSE=1 -j4 check XFAIL_TESTS="sigterm dtls-psk"
tags:
- shared
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: always
paths:
- tests/*.log
- openconnect-installer.exe
static-analyzer/GnuTLS/Fedora:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:buildenv-fedora
script:
- ./autogen.sh
- scan-build ./configure
- scan-build --status-bugs -o scan-build-src make -j4
tags:
- shared
- linux
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: always
paths:
- scan-build-src/*
static-analyzer/OpenSSL/Fedora:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:buildenv-fedora
script:
- ./autogen.sh
- scan-build ./configure --without-gnutls --with-openssl --without-openssl-version-check
- scan-build --status-bugs -o scan-build-src make -j4
tags:
- shared
- linux
except:
- tags
- schedules
artifacts:
expire_in: 1 week
when: on_failure
paths:
- scan-build-src/*