@@ -88,7 +88,8 @@ exec_timeout_secs: 3600
88
88
#
89
89
# Current functions:
90
90
# checkout - Checks out the project from git.
91
- # install - Installs Node and all dependencies.
91
+ # compile_ts - Installs Node and all dependencies, and run all prepublish scripts.
92
+ # install - Installs Node and all dependencies, and download the result of running all prepublish scripts.
92
93
# check - Performs linter and dependency checks.
93
94
# test - Runs all tests.
94
95
# test_vscode - Clones the vscode extension repository and runs its tests.
@@ -105,6 +106,30 @@ functions:
105
106
- command: git.get_project
106
107
params:
107
108
directory: src
109
+ compile_ts:
110
+ - command: expansions.write
111
+ params:
112
+ file: tmp/expansions.yaml
113
+ redacted: true
114
+ - command: shell.exec
115
+ params:
116
+ working_dir: src
117
+ shell: bash
118
+ script: |
119
+ export NODE_JS_VERSION=${node_js_version}
120
+ source .evergreen/install-node.sh
121
+ npm run evergreen-release bump
122
+ npm run bootstrap-ci
123
+ tar cvzf compiled-ts.tgz packages/*/{lib,dist}
124
+ - command: s3.put
125
+ params:
126
+ aws_key: ${aws_key}
127
+ aws_secret: ${aws_secret}
128
+ local_file: src/compiled-ts.tgz
129
+ remote_file: mongosh/binaries/${revision}/${revision_order_id}/compiled-ts.tgz
130
+ bucket: mciuploads
131
+ permissions: public-read
132
+ content_type: application/x-gzip
108
133
install:
109
134
- command: expansions.write
110
135
params:
@@ -116,8 +141,21 @@ functions:
116
141
shell: bash
117
142
script: |
118
143
export NODE_JS_VERSION=${node_js_version}
119
- source .evergreen/.install_node
144
+ source .evergreen/install-node.sh
120
145
npm run evergreen-release bump
146
+ - command: s3.get
147
+ params:
148
+ aws_key: ${aws_key}
149
+ aws_secret: ${aws_secret}
150
+ local_file: src/compiled-ts.tgz
151
+ remote_file: mongosh/binaries/${revision}/${revision_order_id}/compiled-ts.tgz
152
+ bucket: mciuploads
153
+ - command: shell.exec
154
+ params:
155
+ working_dir: src
156
+ shell: bash
157
+ script: |
158
+ tar xvzf compiled-ts.tgz
121
159
check:
122
160
- command: shell.exec
123
161
params:
@@ -127,8 +165,8 @@ functions:
127
165
set -e
128
166
{
129
167
export NODE_JS_VERSION=${node_js_version}
130
- source .evergreen/.setup_env
131
- npm --unsafe-perm=true run bootstrap-ci
168
+ source .evergreen/setup-env.sh
169
+ npm --unsafe-perm=true run bootstrap-ci -- --ignore-prepublish
132
170
npm run check-ci
133
171
}
134
172
test:
@@ -144,8 +182,8 @@ functions:
144
182
set -e
145
183
{
146
184
export NODE_JS_VERSION=${node_js_version}
147
- source .evergreen/.setup_env
148
- npm --unsafe-perm=true run bootstrap-ci
185
+ source .evergreen/setup-env.sh
186
+ npm --unsafe-perm=true run bootstrap-ci -- --ignore-prepublish
149
187
npm run test-ci
150
188
echo "Creating coverage tarball..."
151
189
tar cvzf coverage.tgz coverage
@@ -171,8 +209,8 @@ functions:
171
209
set -e
172
210
{
173
211
export NODE_JS_VERSION=${node_js_version}
174
- source .evergreen/.setup_env
175
- npm --unsafe-perm=true run bootstrap-ci
212
+ source .evergreen/setup-env.sh
213
+ npm --unsafe-perm=true run bootstrap-ci -- --ignore-prepublish
176
214
(cd scripts/docker && docker build -t ubuntu18.04-xvfb -f ubuntu18.04-xvfb.Dockerfile .)
177
215
docker run \
178
216
--rm -v $PWD:/tmp/build ubuntu18.04-xvfb \
@@ -191,8 +229,8 @@ functions:
191
229
set -e
192
230
{
193
231
export NODE_JS_VERSION=${node_js_version}
194
- source .evergreen/.setup_env
195
- npm --unsafe-perm=true run bootstrap-ci
232
+ source .evergreen/setup-env.sh
233
+ npm --unsafe-perm=true run bootstrap-ci -- --ignore-prepublish
196
234
npm run test-connectivity
197
235
}
198
236
test_apistrict:
@@ -208,7 +246,7 @@ functions:
208
246
set -e
209
247
{
210
248
export NODE_JS_VERSION=${node_js_version}
211
- source .evergreen/.setup_env
249
+ source .evergreen/setup-env.sh
212
250
npm run test-apistrict-ci
213
251
}
214
252
@@ -447,7 +485,7 @@ functions:
447
485
set -e
448
486
{
449
487
export NODE_JS_VERSION=${node_js_version}
450
- source .evergreen/.setup_env
488
+ source .evergreen/setup-env.sh
451
489
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
452
490
npm run evergreen-release draft
453
491
}
@@ -465,18 +503,19 @@ functions:
465
503
set -e
466
504
{
467
505
export NODE_JS_VERSION=${node_js_version}
468
- source .evergreen/.setup_env
506
+ source .evergreen/setup-env.sh
469
507
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
470
508
echo "registry=https://registry.npmjs.org/" > .npmrc
471
509
echo "//registry.npmjs.org/:_authToken=${devtoolsbot_npm_token}" >> .npmrc
472
- npm --unsafe-perm=true run bootstrap-ci
510
+ npm --unsafe-perm=true run bootstrap-ci -- --ignore-prepublish
473
511
npm run evergreen-release publish
474
512
}
475
513
476
514
# Tasks will show up as the individual blocks in the Evergreen UI that can
477
515
# pass or fail.
478
516
#
479
517
# Current tasks:
518
+ # compile_ts - Do the initial compilation of TS sources.
480
519
# check - Performs linter and dependency checks.
481
520
# test_{version} - Runs all tests, against a specified mongod version.
482
521
# test_vscode - Run the vscode extension integration tests.
@@ -488,7 +527,17 @@ functions:
488
527
# release_publish - Publishes the npm packages and uploads the tarballs.
489
528
# pkg_test_* - Run tests on the release packages
490
529
tasks:
530
+ - name: compile_ts
531
+ commands:
532
+ - func: checkout
533
+ - func: compile_ts
534
+ vars:
535
+ node_js_version: "<% out(NODE_JS_VERSION_14) %>"
536
+
491
537
- name: check
538
+ depends_on:
539
+ - name: compile_ts
540
+ variant: linux
492
541
commands:
493
542
- func: checkout
494
543
- func: install
@@ -506,6 +555,9 @@ tasks:
506
555
for (const { shortName: mShort, versionSpec: mVersion } of MONGODB_VERSIONS) { %>
507
556
- name: test_<% const id = `m${mShort}_n${nShort}`; ALL_UNIT_TESTS.push(id); out(id) %>
508
557
tags: <% out(["unit-test", ...(mShort === 'latest' ? ["mlatest"] : [])]) %>
558
+ depends_on:
559
+ - name: compile_ts
560
+ variant: linux
509
561
commands:
510
562
- func: checkout
511
563
- func: install
@@ -523,6 +575,9 @@ tasks:
523
575
###
524
576
- name: test_vscode
525
577
tags: ["extra-integration-test"]
578
+ depends_on:
579
+ - name: compile_ts
580
+ variant: linux
526
581
commands:
527
582
- func: checkout
528
583
- func: install
@@ -533,6 +588,9 @@ tasks:
533
588
node_js_version: "<% out(NODE_JS_VERSION_12) %>"
534
589
- name: test_connectivity
535
590
tags: ["extra-integration-test"]
591
+ depends_on:
592
+ - name: compile_ts
593
+ variant: linux
536
594
commands:
537
595
- func: checkout
538
596
- func: install
@@ -541,6 +599,9 @@ tasks:
541
599
- func: test_connectivity
542
600
- name: test_apistrict
543
601
tags: ["extra-integration-test"]
602
+ depends_on:
603
+ - name: compile_ts
604
+ variant: linux
544
605
commands:
545
606
- func: checkout
546
607
- func: install
@@ -552,6 +613,9 @@ tasks:
552
613
mongosh_server_test_version: "latest-alpha"
553
614
mongosh_test_force_api_strict: "1"
554
615
- name: compile_artifact
616
+ depends_on:
617
+ - name: compile_ts
618
+ variant: linux
555
619
commands:
556
620
- func: checkout
557
621
- func: install
@@ -677,6 +741,9 @@ tasks:
677
741
tags: ["publish"]
678
742
git_tag_only: true
679
743
exec_timeout_secs: 7200
744
+ depends_on:
745
+ - name: compile_ts
746
+ variant: linux
680
747
commands:
681
748
- func: checkout
682
749
- func: install
@@ -720,6 +787,7 @@ buildvariants:
720
787
display_name: "Ubuntu 18.04 x64"
721
788
run_on: ubuntu1804-small
722
789
tasks:
790
+ - name: compile_ts
723
791
- name: check
724
792
<% for (const test of ALL_UNIT_TESTS) { %>
725
793
- name: test_<% out(test) %>
0 commit comments