@@ -2,16 +2,15 @@ exec_timeout_secs: 7200
2
2
3
3
# Variables for common functions.
4
4
#
5
- # compile_and_upload_artifact: Runs the exec compile and release process.
5
+ # compile_artifact: Compile the mongosh executable.
6
+ # package_and_upload_artifact: Package the executable and upload the artifacts.
6
7
variables :
7
- - &compile_and_upload_artifact
8
+ - &compile_artifact
8
9
command : shell.exec
9
10
params :
10
11
working_dir : src
11
12
shell : bash
12
13
script : |
13
- set -e
14
- cat <<RELEASE_MONGOSH > ~/release_mongosh.sh
15
14
set -e
16
15
cd $(pwd)
17
16
export NODE_JS_VERSION=${node_js_version}
@@ -27,31 +26,60 @@ variables:
27
26
-e NODE_JS_VERSION \
28
27
-e BUILD_VARIANT \
29
28
--rm -v $PWD:/tmp/build --network host centos7-build \
30
- -c 'source /opt/rh/devtoolset-8/enable && cd /tmp/build && npm run evergreen-release package && dist/mongosh --version'
29
+ -c 'source /opt/rh/devtoolset-8/enable && cd /tmp/build && npm run evergreen-release compile && dist/mongosh --version'
30
+ else
31
+ npm run evergreen-release compile
32
+ fi
33
+ dist/mongosh --version
34
+ source .evergreen/.setup_env
35
+ export MONGOSH_TEST_EXECUTABLE_PATH="$(pwd)/dist/mongosh"
36
+ if [ x"$OS" == x"Windows_NT" ]; then
37
+ export MONGOSH_TEST_EXECUTABLE_PATH="$(cygpath -w "$MONGOSH_TEST_EXECUTABLE_PATH")"
38
+ fi
39
+ echo "$MONGOSH_TEST_EXECUTABLE_PATH"
40
+ npm run test-e2e-ci
41
+ tar cvzf dist.tgz dist
42
+
43
+ - &package_and_upload_artifact
44
+ command : shell.exec
45
+ params :
46
+ working_dir : src
47
+ shell : bash
48
+ script : |
49
+ set -e
50
+ cat <<RELEASE_MONGOSH > ~/release_mongosh.sh
51
+ set -e
52
+ cd $(pwd)
53
+ export NODE_JS_VERSION=${node_js_version}
54
+ source .evergreen/.setup_env
55
+ tar xvzf dist.tgz
56
+ dist/mongosh --version
57
+ if [ `uname` == Linux ]; then
58
+ mkdir -p tmp
59
+ cp "$(pwd)/../tmp/expansions.yaml" tmp/expansions.yaml
60
+ (cd scripts/docker && docker build -t centos7-package -f centos7-package.Dockerfile .)
61
+ echo Starting Docker container packaging
62
+ docker run -e PUPPETEER_SKIP_CHROMIUM_DOWNLOAD \
63
+ -e EVERGREEN_EXPANSIONS_PATH=/tmp/build/tmp/expansions.yaml \
64
+ -e NODE_JS_VERSION \
65
+ -e BUILD_VARIANT \
66
+ --rm -v $PWD:/tmp/build --network host centos7-package \
67
+ -c 'cd /tmp/build && npm run evergreen-release package && npm run evergreen-release upload'
31
68
else
32
69
npm run evergreen-release package
33
70
if [ `uname` == Darwin ]; then
34
71
# Verify signing
35
72
spctl -a -vvv -t install dist/mongosh
36
73
fi
74
+ npm run evergreen-release upload
37
75
fi
38
76
RELEASE_MONGOSH
39
-
40
77
if [ `uname` == Darwin ]; then
41
78
ssh -v -p 2222 localhost "bash ~/release_mongosh.sh"
42
79
else
43
80
bash ~/release_mongosh.sh
44
81
fi
45
82
46
- export NODE_JS_VERSION=${node_js_version}
47
- source .evergreen/.setup_env
48
- export MONGOSH_TEST_EXECUTABLE_PATH="$(pwd)/dist/mongosh"
49
- if [ x"$OS" == x"Windows_NT" ]; then
50
- export MONGOSH_TEST_EXECUTABLE_PATH="$(cygpath -w "$MONGOSH_TEST_EXECUTABLE_PATH")"
51
- fi
52
- echo "$MONGOSH_TEST_EXECUTABLE_PATH"
53
- npm run test-e2e-ci
54
-
55
83
- &test_linux_artifact
56
84
command : shell.exec
57
85
params :
@@ -76,7 +104,8 @@ variables:
76
104
# test - Runs all tests.
77
105
# test_vscode - Clones the vscode extension repository and runs its tests.
78
106
# test_connectivity - Runs extra connectivity tests.
79
- # compile_and_upload_artifact - Compile the release binary and upload it to S3.
107
+ # compile_artifact - Compile the release binary.
108
+ # package_and_upload_artifact - Upload the release binary to S3.
80
109
# test_linux_artifact - Test that the built artifact works where we expect it to.
81
110
# We use this to verify that e.g. the Ubuntu-built release
82
111
# binary also works on RHEL and Debian.
@@ -142,12 +171,34 @@ functions:
142
171
export NODE_JS_VERSION=${node_js_version}
143
172
source .evergreen/.setup_env
144
173
npm run test-connectivity
145
- compile_and_upload_artifact :
174
+ compile_artifact :
175
+ - command : expansions.write
176
+ params :
177
+ file : tmp/expansions.yaml
178
+ redacted : true
179
+ - << : *compile_artifact
180
+ - command : s3.put
181
+ params :
182
+ aws_key : ${aws_key}
183
+ aws_secret : ${aws_secret}
184
+ local_file : src/dist.tgz
185
+ remote_file : mongosh/binaries/${revision}/${revision_order_id}/mongosh-${executable_os_id}.tgz
186
+ bucket : mciuploads
187
+ permissions : public-read
188
+ content_type : application/x-gzip
189
+ package_and_upload_artifact :
146
190
- command : expansions.write
147
191
params :
148
192
file : tmp/expansions.yaml
149
193
redacted : true
150
- - << : *compile_and_upload_artifact
194
+ - command : s3.get
195
+ params :
196
+ aws_key : ${aws_key}
197
+ aws_secret : ${aws_secret}
198
+ local_file : src/dist.tgz
199
+ remote_file : mongosh/binaries/${revision}/${revision_order_id}/mongosh-${executable_os_id}.tgz
200
+ bucket : mciuploads
201
+ - << : *package_and_upload_artifact
151
202
test_linux_artifact :
152
203
- command : expansions.write
153
204
params :
@@ -178,7 +229,8 @@ functions:
178
229
# test_{version} - Runs all tests, against a specified mongod version.
179
230
# test_vscode - Run the vscode extension integration tests.
180
231
# test_connectivity - Runs extra connectivity tests.
181
- # compile_and_upload_artifact - Compile the release binary and upload it to S3.
232
+ # compile_artifact - Compile the release binary.
233
+ # package_and_upload_artifact - Upload the release binary to S3.
182
234
# test_linux_artifact - Test that the built artifact works where we expect it to.
183
235
# release_publish - Publishes the npm packages and uploads the tarballs.
184
236
tasks :
@@ -289,7 +341,16 @@ tasks:
289
341
vars :
290
342
node_js_version : " 14.15.1"
291
343
- func : test_connectivity
292
- - name : compile_and_upload_artifact_macos
344
+ - name : compile_artifact
345
+ commands :
346
+ - func : checkout
347
+ - func : install
348
+ vars :
349
+ node_js_version : " 14.15.1"
350
+ - func : compile_artifact
351
+ vars :
352
+ node_js_version : " 14.15.1"
353
+ - name : package_and_upload_artifact_macos
293
354
depends_on :
294
355
- name : check
295
356
variant : darwin
@@ -309,17 +370,20 @@ tasks:
309
370
variant : darwin
310
371
- name : test_mlatest_n14
311
372
variant : darwin
373
+ - name : compile_artifact
374
+ variant : darwin
312
375
commands :
313
376
- func : checkout
314
377
- func : install
315
378
vars :
316
379
node_js_version : " 14.15.1"
317
- - func : compile_and_upload_artifact
380
+ - func : package_and_upload_artifact
318
381
vars :
319
382
node_js_version : " 14.15.1"
320
- - name : compile_and_upload_artifact_linux
383
+ - name : package_and_upload_artifact_linux
321
384
depends_on :
322
385
- name : check
386
+ variant : linux
323
387
- name : test_m40x_n12
324
388
variant : linux
325
389
- name : test_m42x_n12
@@ -336,36 +400,49 @@ tasks:
336
400
variant : linux
337
401
- name : test_mlatest_n14
338
402
variant : linux
403
+ - name : compile_artifact
404
+ variant : linux_build
339
405
commands :
340
406
- func : checkout
341
407
- func : install
342
408
vars :
343
409
node_js_version : " 14.15.1"
344
- - func : compile_and_upload_artifact
410
+ - func : package_and_upload_artifact
345
411
vars :
346
412
node_js_version : " 14.15.1"
347
- - name : compile_and_upload_artifact_win
413
+ - name : package_and_upload_artifact_win
348
414
depends_on :
349
415
- name : check
416
+ variant : win32
350
417
- name : test_m40x_n12
418
+ variant : win32
351
419
- name : test_m42x_n12
420
+ variant : win32
352
421
- name : test_m44x_n12
422
+ variant : win32
353
423
- name : test_mlatest_n12
424
+ variant : win32
354
425
- name : test_m40x_n14
426
+ variant : win32
355
427
- name : test_m42x_n14
428
+ variant : win32
356
429
- name : test_m44x_n14
430
+ variant : win32
357
431
- name : test_mlatest_n14
432
+ variant : win32
433
+ - name : compile_artifact
434
+ variant : win32_build
358
435
commands :
359
436
- func : checkout
360
437
- func : install
361
438
vars :
362
439
node_js_version : " 14.15.1"
363
- - func : compile_and_upload_artifact
440
+ - func : package_and_upload_artifact
364
441
vars :
365
442
node_js_version : " 14.15.1"
366
443
- name : test_linux_artifact
367
444
depends_on :
368
- - name : compile_and_upload_artifact_linux
445
+ - name : package_and_upload_artifact_linux
369
446
variant : linux
370
447
commands :
371
448
- func : checkout
@@ -377,10 +454,12 @@ tasks:
377
454
node_js_version : " 14.15.1"
378
455
- name : release_publish
379
456
depends_on :
380
- - name : compile_and_upload_artifact_win
457
+ - name : package_and_upload_artifact_win
381
458
variant : win32
382
- - name : compile_and_upload_artifact_linux
459
+ - name : package_and_upload_artifact_linux
383
460
variant : linux
461
+ - name : package_and_upload_artifact_macos
462
+ variant : darwin_codesign
384
463
- name : test_linux_artifact
385
464
variant : rhel70
386
465
- name : test_linux_artifact
@@ -391,8 +470,6 @@ tasks:
391
470
variant : ubuntu1604
392
471
- name : test_linux_artifact
393
472
variant : ubuntu2004
394
- - name : compile_and_upload_artifact_macos
395
- variant : darwin_codesign
396
473
- name : test_vscode
397
474
variant : linux
398
475
commands :
@@ -409,11 +486,15 @@ buildvariants:
409
486
- name : darwin_codesign
410
487
display_name : " MacOS Mojave (codesign)"
411
488
run_on : macos-1014-codesign
489
+ expansions :
490
+ executable_os_id : darwin
412
491
tasks :
413
- - name : compile_and_upload_artifact_macos
492
+ - name : package_and_upload_artifact_macos
414
493
- name : darwin
415
494
display_name : " MacOS Mojave"
416
495
run_on : macos-1014
496
+ expansions :
497
+ executable_os_id : darwin
417
498
tasks :
418
499
- name : check
419
500
- name : test_m40x_n12
@@ -424,9 +505,12 @@ buildvariants:
424
505
- name : test_m42x_n14
425
506
- name : test_m44x_n14
426
507
- name : test_mlatest_n14
508
+ - name : compile_artifact
427
509
- name : linux
428
510
display_name : " Ubuntu 18.04"
429
- run_on : ubuntu1804-test
511
+ run_on : ubuntu1804-small
512
+ expansions :
513
+ executable_os_id : linux
430
514
tasks :
431
515
- name : check
432
516
- name : test_m40x_n12
@@ -439,19 +523,28 @@ buildvariants:
439
523
- name : test_mlatest_n14
440
524
- name : test_vscode
441
525
- name : test_connectivity
442
- - name : compile_and_upload_artifact_linux
526
+ - name : package_and_upload_artifact_linux
527
+ - name : linux_build
528
+ display_name : " Ubuntu 18.04 (build)"
529
+ run_on : ubuntu1804-build
530
+ expansions :
531
+ executable_os_id : linux
532
+ tasks :
533
+ - name : compile_artifact
443
534
- name : rhel
444
535
display_name : " Ubuntu 18.04 (rpm target)"
445
- run_on : ubuntu1804-test
536
+ run_on : ubuntu1804-small
537
+ expansions :
538
+ executable_os_id : linux
446
539
tasks :
447
- - name : check
448
- - name : compile_and_upload_artifact_linux
540
+ - name : package_and_upload_artifact_linux
449
541
- name : debian
450
542
display_name : " Ubuntu 18.04 (deb target)"
451
- run_on : ubuntu1804-test
543
+ run_on : ubuntu1804-small
544
+ expansions :
545
+ executable_os_id : linux
452
546
tasks :
453
- - name : check
454
- - name : compile_and_upload_artifact_linux
547
+ - name : package_and_upload_artifact_linux
455
548
- name : rhel70
456
549
display_name : " RHEL 7.0"
457
550
run_on : rhel70-small
@@ -479,7 +572,9 @@ buildvariants:
479
572
- name : test_linux_artifact
480
573
- name : win32
481
574
display_name : " Windows VS 2019"
482
- run_on : windows-64-vs2019-test
575
+ run_on : windows-64-vs2019-small
576
+ expansions :
577
+ executable_os_id : win32
483
578
tasks :
484
579
- name : check
485
580
- name : test_m40x_n12
@@ -490,7 +585,14 @@ buildvariants:
490
585
- name : test_m42x_n14
491
586
- name : test_m44x_n14
492
587
- name : test_mlatest_n14
493
- - name : compile_and_upload_artifact_win
588
+ - name : package_and_upload_artifact_win
589
+ - name : win32_build
590
+ display_name : " Windows VS 2019 (build)"
591
+ run_on : windows-64-vs2019-build
592
+ expansions :
593
+ executable_os_id : win32
594
+ tasks :
595
+ - name : compile_artifact
494
596
- name : darwin_release_publish
495
597
display_name : " Publish Release"
496
598
run_on : macos-1014-codesign
0 commit comments