-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy path.gitlab-ci.yml
586 lines (549 loc) · 13.2 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
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
variables:
# we depend on a sane umask when creating tarballs
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
default:
before_script:
- env
.retry-and-timeout: &retry-and-timeout
retry: 1
timeout: 15 minutes
stages:
- lint
- test
- build
- deploy
- release
- e2e-tests
- performance-tests
pre-job:
stage: .pre
script:
- echo "PEGASUS_VERSION=`release-tools/getversion`" > .env
artifacts:
reports:
dotenv: .env
# Code quality
Lint:
<<: *retry-and-timeout
stage: lint
parallel:
matrix:
- LANGUAGE:
- python
- java
image: python:3.6
before_script:
- env
- \[ "${LANGUAGE}" = 'python' ] && pip3 install tox
- apt update
- DEBIAN_FRONTEND=noninteractive apt install -y ant python3-pip
script:
- export bamboo_buildKey='value-irrelevant'
- ant code-format-${LANGUAGE}
tags:
- docker
# Unit tests
Python:
<<: *retry-and-timeout
stage: test
parallel:
matrix:
- ARCH:
- x86_64
- arm64
PYTHON_VERSION:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
PACKAGE:
- common
- api
- python
- worker
image: python:${PYTHON_VERSION}
before_script:
- env
- export USER=nobody
- pip3 install --upgrade pip setuptools
- pip3 install tox
script:
- cd packages/pegasus-${PACKAGE}; tox -e py$(echo ${PYTHON_VERSION} | sed -E 's/([0-9]*).([0-9]*).*$/\1\2/g')
coverage: '/Total coverage: \d+\.\d+%/'
artifacts:
when: always
reports:
junit: packages/pegasus-${PACKAGE}/test-reports/pyunit.xml
coverage_report:
coverage_format: cobertura
path: packages/pegasus-${PACKAGE}/test-reports/coverage.xml
paths:
- packages/pegasus-${PACKAGE}/test-reports/htmlcov
tags:
- ${ARCH}
- docker
Java:
<<: *retry-and-timeout
stage: test
parallel:
matrix:
- ARCH:
- x86_64
- arm64
image: pegasus/buildenv:rhel_9
script:
- ant test-java
artifacts:
when: always
reports:
junit: build/tests/classes/junitreport/*.xml
paths:
- build/tests/classes/junitreport/*.xml
tags:
- ${ARCH}
- docker
C:
<<: *retry-and-timeout
stage: test
parallel:
matrix:
- ARCH:
- x86_64
- arm64
image: pegasus/buildenv:rhel_9
script:
- ant test-kickstart test-transfer
tags:
- ${ARCH}
- docker
# Build packages
Source:
<<: *retry-and-timeout
stage: build
image: pegasus/buildenv:rhel_9
script:
- ant clean dist-source dist-python-source
artifacts:
paths:
- dist/pegasus-*.tar.gz
- dist/pegasus_wms*.tar.gz
dependencies: []
tags:
- docker
Alpine:
<<: *retry-and-timeout
stage: build
parallel:
matrix:
- ARCH:
- x86_64
- arm64
OS:
- alpine_3
image: pegasus/buildenv:${OS}
script:
- ant dist-worker dist-release
artifacts:
paths:
- dist/pegasus-binary*.tar.gz
- dist/pegasus-worker*.tar.gz
dependencies: []
tags:
- ${ARCH}
- docker
RHEL:
<<: *retry-and-timeout
stage: build
parallel:
matrix:
- ARCH:
- x86_64
- arm64
OS:
- rhel_8
- rhel_9
image: pegasus/buildenv:${OS}
script:
- ant dist-rpm compile-pegasus-mpi-cluster dist-worker dist-release
artifacts:
paths:
- dist/pegasus-binary*.tar.gz
- dist/pegasus-worker*.tar.gz
- dist/pegasus-*.rpm
dependencies: []
tags:
- ${ARCH}
- docker
SUSE:
<<: *retry-and-timeout
stage: build
parallel:
matrix:
- ARCH:
- x86_64
OS:
- suse_15
image: pegasus/buildenv:${OS}
script:
- ant dist-worker dist-release
artifacts:
paths:
- dist/pegasus-binary*.tar.gz
- dist/pegasus-worker*.tar.gz
dependencies: []
tags:
- ${ARCH}
- docker
Debian:
<<: *retry-and-timeout
stage: build
parallel:
matrix:
- ARCH:
- x86_64
- arm64
OS:
- deb_11
- deb_12
image: pegasus/buildenv:${OS}
script:
- ant dist-worker dist-release dist-deb
artifacts:
paths:
- dist/pegasus-binary*.tar.gz
- dist/pegasus-worker*.tar.gz
- dist/pegasus*.deb
dependencies: []
tags:
- ${ARCH}
- docker
Ubuntu:
<<: *retry-and-timeout
stage: build
parallel:
matrix:
- ARCH:
- x86_64
- arm64
OS:
- ubuntu_22
- ubuntu_24
image: pegasus/buildenv:${OS}
script:
- ant dist-worker dist-release dist-deb
artifacts:
paths:
- dist/pegasus-binary*.tar.gz
- dist/pegasus-worker*.tar.gz
- dist/pegasus*.deb
dependencies: []
tags:
- ${ARCH}
- docker
macOS:
<<: *retry-and-timeout
stage: build
parallel:
matrix:
- ARCH:
- x86_64
- arm64
VERSION:
- 12
- 13
before_script:
- env
- \[ "${ARCH}" = 'arm64' ] && eval "$(/opt/homebrew/bin/brew shellenv)"
script:
- ant dist-worker dist-release
artifacts:
paths:
- dist/pegasus-binary*.tar.gz
- dist/pegasus-worker*.tar.gz
dependencies: []
tags:
- ${ARCH}
- macOS-${VERSION}
- shell
Docs:
<<: *retry-and-timeout
stage: build
image: pegasus/buildenv:rhel_9
before_script:
- env
#- set -ex
#- yum install -y epel-release
#- yum install -y --enablerepo=devel git ant perl python3 python3-pip R-devel
#- pip3 install tox
script:
- ant dist-doc
artifacts:
paths:
- dist/pegasus-doc-*.tar.gz
dependencies: []
tags:
- docker
# Deploy packages
# Deploy Python:
# stage: deploy
# image: pegasus/buildenv:rhel_8
# dependencies:
# - 'Python'
# script:
# - find packages -type d
Binaries:
stage: deploy
script:
- ./release-tools/deploy
tags:
- shell
- scitech-gitlab
Tutorial Container:
<<: *retry-and-timeout
stage: deploy
script:
- if [ "X${PEGASUS_VERSION}" = "X" ]; then echo "Unable to determine Pegasus version! Exiting..."; exit 1; fi
- cp dist/pegasus-*-*.rpm tutorial/docker
- cd tutorial/docker
- echo "${DOCKERHUB_TOKEN}" | docker login --username "${DOCKERHUB_USER}" --password-stdin
- docker build --no-cache --build-arg CACHEBUST=$(date +"%Y%m%d%H%M%S") --build-arg PEGASUS_VERSION=${PEGASUS_VERSION} --tag pegasus/tutorial:${PEGASUS_VERSION} --progress plain .
- docker push pegasus/tutorial:${PEGASUS_VERSION}
- docker rmi --force pegasus/tutorial:${PEGASUS_VERSION}
dependencies:
- pre-job
- "RHEL: [x86_64, rhel_8]"
needs:
- pre-job
- "RHEL: [x86_64, rhel_8]"
tags:
- x86_64
- docker-cli
# Release
Release:
stage: release
image: rockylinux:9
before_script:
- env
- curl -fsSL https://cli.github.com/packages/rpm/gh-cli.repo | tee /etc/yum.repos.d/github-cli.repo
- dnf install -y gh python3.12 python3.12-pip
- pip3.12 install twine
- |
cat > ~/.pypirc <<EOT
[distutils]
index-servers=
pypi
test-pypi
[pypi]
username = __token__
password = ${PYPI_TOKEN}
[test-pypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = ${TEST_PYPI_TOKEN}
EOT
script:
# TODO: See how version names, like beta etc. work with PyPI and Pegasus build scripts. 5.0.0dev becomes 5.0.0dev0 for Python source distribution packages.
# Publish to PyPI
- |
twine upload \
--repository $([ $(echo ${PEGASUS_VERSION} | grep -E "[^0-9.]") ] && echo "test-pypi" || echo "pypi") \
dist/pegasus_wms*.tar.gz
# Publish to GitHub releases
# Token is read from the GITHUB_TOKEN environment variable.
- |
gh release create \
--repo pegasus-isi/pegasus \
--verify-tag \
--title "${PEGASUS_VERSION}" \
--notes-file RELEASE_NOTES \
--discussion-category "announcements" \
$([ $(echo ${PEGASUS_VERSION} | grep -E "[^0-9.]") ] && echo "--prerelease") \
${PEGASUS_VERSION} \
dist/*.rpm dist/*.deb dist/pegasus-binary-*.tar.gz dist/pegasus-worker-*.tar.gz
rules:
- if: $CI_COMMIT_TAG
dependencies:
- pre-job
tags:
- docker
retry: 0
# End-to-End tests
Workflow Tests:
stage: e2e-tests
parallel:
matrix:
- TESTNAME:
- 000-check-env
- 016-pegasus-transfer
- 029-black-quiet
- 038-halt-continue
- 043-integrity-bypass-staging
EXEC:
- launch-bamboo-test-no-jobs
- TESTNAME:
- 006-black-diamond-shell-code-generator
- 015-shell-hierarchic-workflow
- 020-pmc-only
EXEC:
- launch-bamboo-test-no-status
- TESTNAME:
- 022-data-reuse-regexrc
EXEC:
- launch-bamboo-test-planner-only
- TESTNAME:
- 001-black-diamond-vanilla-condor
- 001-black-diamond-vanilla-condor-5.0API
- 002-hello-world
- 004-montage-condor-io
- 004-montage-shared-fs
- 004-montage-shared-fs-sc
- 004-montage-staging-site
- 004-montage-universe-local
- 004-montage-apptainer
#- 005-galactic-plane
- 007-black-diamond-pegasuslite-local
- 008-black-diamond-pegasuslite-condorio
- 009-black-diamond-pegasuslite-pegasustransfer
- 009-black-diamond-pegasuslite-pegasustransfer-a
- 010-runtime-clustering runtime-condorio
- 010-runtime-clustering runtime-nonsharedfs
- 010-runtime-clustering runtime-sharedfs
- 010-runtime-clustering runtime-sharedfs-all-staging-nogridstart
- 011-rosetta-staging-site
- 012-blackdiamond-invoke
- 013-pegasus-mpi-cluster
#- 018-black-condorc-condor-io
#- 018-black-condorc-hybrid
#- 018-black-condorc-staging-site
- 019-black-label
- 021-black-dir
- 022-data-reuse-full-a
- 022-data-reuse-full-b
- 023-sc4-ssh-http
- 024-sc4-gridftp-http
- 025-sc4-file-http
- 026-cache-url-check
- 027-montage-bypass-staging-site
#- 027-montage-bypass-staging-site-condorio
- 028-dynamic-hierarchy
- 028-dynamic-hierarchy-b
- 030-pegasuslite-gs
#- 030-pegasuslite-irods
- 030-pegasuslite-s3
#- 030-pegasuslite-sshftp
- 031-montage-condor-io-jdbcrc
- 031-montage-jdbcrc-sqlite
- 032-black-chkpoint
- 032-kickstart-chkpoint-signal-condorio
- 032-kickstart-chkpoint-signal-nonsharedfs
- 033-pegasuslite-multi
- 033-pegasuslite-multi-wp-a
- 033-pegasuslite-multi-wp-b
- 033-pegasuslite-multi-wp-c
- 034-recursive-cluster-condorio
- 034-recursive-cluster-nonsharedfs
- 034-recursive-cluster-sharedfs
- 035-black-transfer
- 036-condorio-no-outputs
- 037-black-hints
- 039-black-metadata
- 040-multiple-input-sources-nonsharedfs
- 040-multiple-input-sources-sharedfs
- 042-kswrapper-nonsharedfs
- 042-kswrapper-sharedfs
- 043-integrity-condorio
- 043-integrity-nonsharedfs
- 043-integrity-nonsharedfs-nosymlink
- 043-integrity-condorio-nogs
- 043-integrity-synthetic-with-errors
- 043-integrity-condorio-5.0API
- 043-integrity-condorio-singularity
- 043-integrity-bypass-staging-b
- 044-docker-nonsharedfs
- 044-docker-nonsharedfs-shared
- 044-singularity-nonsharedfs
- 044-singularity-nonsharedfs-shared
- 044-docker-nonsharedfs-symlink
- 044-singularity-nonsharedfs-symlink
- 044-singularity-nonsharedfs-symlink-cvmfs
- 044-singularity-nonsharedfs-minimal
- 045-hierarchy-sharedfs
- 045-hierarchy-sharedfs-b
- 045-hierarchy-sharedfs-c
- 045-hierarchy-sharedfs-d
- 045-hierarchy-sharedfs-e
- 046-aws-batch-black
- 047-cwl
- 047-cwl-docker-black-diamond
- 048-black-deep-condorio
- 048-black-deep-condorio-local
- 048-ligo-getenv
- 049-pycbc-search
- 050-singularity-container-universe nonsharedfs
- 050-singularity-container-universe nonsharedfs-shared
- blackdiamond pl-condorio
- blackdiamond pl-condorio-local
- blackdiamond pl-pt
- blackdiamond pl-pt-local
- blackdiamond sharedfs-symlink-nogridstart
- blackdiamond sharedfs-worker-staging-cleanup
- blackdiamond vanilla-condor
EXEC:
- launch-bamboo-test
script:
- cd dist
- tar xzf pegasus-binary-*-x86_64*.tar.gz
- cd ..
- export PATH=$PWD/dist/pegasus-${PEGASUS_VERSION}/bin:${PATH}
- export CLASSPATH=".:`pegasus-config --classpath`"
- export PYTHONPATH="`pegasus-config --python`"
- ./test/scripts/${EXEC} ${TESTNAME}
rules:
- if: $CI_PIPELINE_NAME == 'workflow'
dependencies:
- pre-job
- "RHEL: [x86_64, rhel_8]"
needs:
- pre-job
- "RHEL: [x86_64, rhel_8]"
tags:
- bamboo
retry: 0
timeout: 5 hour 00 minutes
# Performance tests
Performance Tests:
stage: performance-tests
parallel:
matrix:
- TESTNAME:
- 041-jdbcrc-performance
EXEC:
- launch-bamboo-test-no-jobs
- TESTNAME:
- 014-planner-performance
- 014-planner-performance-100k
- 014-planner-performance-ahope
- 014-planner-performance-hcc
EXEC:
- launch-bamboo-test-planner-only
script:
- cd dist
- tar xzf pegasus-binary-*-x86_64*.tar.gz
- cd ..
- export PATH=$PWD/dist/pegasus-${PEGASUS_VERSION}/bin:${PATH}
- export CLASSPATH=".:`pegasus-config --classpath`"
- export PYTHONPATH="`pegasus-config --python`"
- ./test/scripts/${EXEC} ${TESTNAME}
rules:
- if: $CI_PIPELINE_NAME == 'workflow'
dependencies:
- pre-job
- "RHEL: [x86_64, rhel_8]"
tags:
- bamboo
retry: 0
timeout: 30 minutes