Skip to content

Commit 647f9ed

Browse files
committed
Merge remote-tracking branch 'origin/master' into 1.27-releases
Conflicts: packages/compass/package-lock.json
2 parents d60c49f + b6a6b22 commit 647f9ed

File tree

712 files changed

+240168
-978133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

712 files changed

+240168
-978133
lines changed

.evergreen.yml

Lines changed: 30 additions & 283 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ functions:
3333
- command: git.get_project
3434
params:
3535
directory: src
36-
- &generate-compass-env
37-
command: shell.exec
36+
37+
- command: shell.exec
3838
params:
3939
working_dir: src
4040
shell: bash
@@ -74,11 +74,8 @@ functions:
7474
export NPM_AUTH_TOKEN="${compass_npm_token}"
7575
7676
export NODE_JS_VERSION="12.4.0"
77-
# TODO: lucas: Go back to npm@latest after 6.13.4 released
78-
# or https://jira.mongodb.org/browse/COMPASS-4019 removes jade.
79-
# https://jira.mongodb.org/browse/COMPASS-4018
80-
# export NPM_VERSION="latest"
81-
export NPM_VERSION="6.13.2"
77+
export NPM_VERSION="7"
78+
export NPM_CONFIG_CACHE="${NPM_CACHE_DIR}"
8279
8380
if [[ "$OSTYPE" == "cygwin" ]]; then
8481
# NOTE lucas: for git-core addition, See
@@ -106,15 +103,6 @@ functions:
106103
shell: bash
107104
script: |
108105
source ~/compass_env.sh
109-
110-
echo "Configuring npm..."
111-
cat <<EOT >> .npmrc
112-
devdir=$NPM_CACHE_DIR/.node-gyp
113-
init-module=$NPM_CACHE_DIR/.npm-init.js
114-
cache=$NPM_CACHE_DIR
115-
tmp=$NPM_TMP_DIR
116-
_authToken=$NPM_AUTH_TOKEN
117-
EOT
118106
- command: shell.exec
119107
params:
120108
working_dir: src
@@ -136,45 +124,10 @@ functions:
136124
echo "Installing Compass dependencies..."
137125
138126
echo "If npm ci fails, debug.log will be uploaded to S3."
139-
# We are running everything with --unsafe-perm because RHEL evergreen user is root
140-
npm ci --unsafe-perm
127+
# Run npm ci in all the packages
128+
npm run bootstrap-evergreen --unsafe-perm -- --stream
141129
# Make sure that cache is populated when other packages are pulling the font
142130
npm run update-akzidenz-cache --unsafe-perm
143-
# Run npm ci in all the packages
144-
npm run bootstrap-evergreen --unsafe-perm
145-
146-
save:
147-
- command: shell.exec
148-
params:
149-
shell: bash
150-
script: |
151-
set -e
152-
tar -zcf compass-build.tgz ./src
153-
- <<: *save-artifact
154-
params:
155-
local_file: compass-build.tgz
156-
remote_file: ${project}/${revision}/${build_variant}/build.tgz
157-
158-
restore:
159-
- &restore-fetch-s3
160-
command: s3.get
161-
params:
162-
aws_key: ${aws_key}
163-
aws_secret: ${aws_secret}
164-
local_file: compass-build.tgz
165-
remote_file: ${project}/${revision}/${build_variant}/build.tgz
166-
bucket: mciuploads
167-
content_type: application/octet-stream
168-
- &restore-unpack-s3
169-
command: shell.exec
170-
shell: bash
171-
params:
172-
script: |
173-
set -e
174-
tar xzf compass-build.tgz --strip-components=1
175-
# TODO: lucas: may want to remove ./node_modules here before running npm ci like travis does?
176-
ls -alh
177-
- <<: *generate-compass-env
178131
179132
verify:
180133
command: shell.exec
@@ -186,7 +139,7 @@ functions:
186139
source ~/compass_env.sh
187140
188141
echo "Run static analysis..."
189-
npm run check-evergreen
142+
npm run check-ci
190143
191144
test:
192145
- command: shell.exec
@@ -209,28 +162,7 @@ functions:
209162
# debug option is not very useful in normal runs, but helpful when
210163
# debugging any issues with tests. Set to "mocha*", "hadron*", or
211164
# "mongo*" for some helpful output from the test tooling we are using
212-
DEBUG=${debug} MONGODB_VERSION=${mongodb_version|4.0.3} npm run test-evergreen --unsafe-perm -- --stream
213-
# - command: attach.results
214-
# params:
215-
# file_location: src/test-results.xml
216-
217-
test-plugin:
218-
- <<: *restore-fetch-s3
219-
- <<: *restore-unpack-s3
220-
- <<: *generate-compass-env
221-
- command: shell.exec
222-
params:
223-
working_dir: src
224-
shell: bash
225-
script: |
226-
set -e
227-
source ~/compass_env.sh
228-
export ELECTRON_NO_ATTACH_CONSOLE=1
229-
export ELECTRON_ENABLE_LOGGING=1
230-
bash ./.evergreen/test-plugin.sh ${plugin|10gen/compass-connect}
231-
# - command: attach.xunit_results
232-
# params:
233-
# file: src/plugin/plugin-test-results.xml
165+
DEBUG=${debug} MONGODB_VERSION=${mongodb_version|4.0.3} npm run test-ci --unsafe-perm -- --stream
234166
235167
'package':
236168
- command: shell.exec
@@ -289,6 +221,7 @@ functions:
289221
290222
export NPM_CONFIG_LOGLEVEL=info
291223
export DEBUG="*,-flora-colossus"
224+
export NPM_CONFIG_CACHE="$(pwd)/.deps/.npm"
292225
npm run release-evergreen ${compass_distribution};
293226
rm -f /tmp/compass-apple-cred.json
294227
EOF_BUILD_SH
@@ -298,15 +231,28 @@ functions:
298231
ssh -v -p 2222 localhost "bash ~/compass_package.sh"
299232
else
300233
if [[ "$OSTYPE" == "cygwin" ]]; then
234+
# If not possible to remove this hack, we should find a better way
235+
# to do this instead of directly referencing node_module paths,
236+
# but first figure out what exactly was changed in our fork of
237+
# electron-wix-msi
238+
#
239+
# TODO: https://jira.mongodb.org/browse/COMPASS-4888
240+
301241
echo "Fetching signtool -> notary-service hack..."
302242
303-
curl -fs \
304-
-o "signtool.exe" \
305-
--url "https://s3.amazonaws.com/boxes.10gen.com/build/signtool.exe"
306-
rm -f node_modules/electron-winstaller/vendor/signtool.exe
307-
rm -f node_modules/@mongodb-js/electron-wix-msi/vendor/signtool.exe
308-
chmod +x signtool.exe
309-
cp signtool.exe node_modules/@mongodb-js/electron-wix-msi/vendor/signtool.exe
243+
(
244+
# We are in packages/compass, but the dependencies we are trying
245+
# to replace are in the root of the monorepo
246+
cd ../../
247+
curl -fs \
248+
-o "signtool.exe" \
249+
--url "https://s3.amazonaws.com/boxes.10gen.com/build/signtool.exe"
250+
rm -f node_modules/electron-winstaller/vendor/signtool.exe
251+
rm -f node_modules/@mongodb-js/electron-wix-msi/vendor/signtool.exe
252+
chmod +x signtool.exe
253+
cp signtool.exe node_modules/@mongodb-js/electron-wix-msi/vendor/signtool.exe
254+
cp signtool.exe node_modules/electron-winstaller/vendor/signtool.exe
255+
)
310256
fi
311257
bash ~/compass_package.sh
312258
ls -la dist
@@ -415,7 +361,7 @@ tasks:
415361
- func: test
416362
variants: [macos, windows, ubuntu, rhel]
417363
vars:
418-
debug: "mongo*"
364+
debug: 'mongo*'
419365

420366
- func: package
421367
vars:
@@ -462,205 +408,6 @@ tasks:
462408
- func: 'save rhel artifacts'
463409
variants: [rhel]
464410

465-
- name: compile
466-
depends_on: []
467-
commands:
468-
- func: prepare
469-
- func: install
470-
- func: save
471-
472-
- name: verify
473-
depends_on: [compile]
474-
tags:
475-
- 'verify'
476-
commands:
477-
- func: restore
478-
- func: verify
479-
480-
- name: test-unit
481-
depends_on: [compile]
482-
tags:
483-
- test
484-
commands:
485-
- func: restore
486-
- func: test
487-
488-
- name: test-functional
489-
depends_on: [compile]
490-
tags:
491-
- 'test'
492-
commands:
493-
- func: restore
494-
- func: test
495-
vars:
496-
test_suite: functional
497-
498-
- name: test-data-service
499-
depends_on: [compile]
500-
commands:
501-
- func: test-plugin
502-
vars: { plugin: mongodb-js/data-service }
503-
504-
- name: test-connect-plugin
505-
depends_on: [compile]
506-
commands:
507-
- func: test-plugin
508-
vars: { plugin: 10gen/compass-connect }
509-
510-
- name: test-aggregation-builder-plugin
511-
depends_on: [compile]
512-
commands:
513-
- func: test-plugin
514-
vars: { plugin: mongodb-js/compass-aggregations }
515-
516-
- name: package-and-publish-compass
517-
depends_on: [compile]
518-
commands:
519-
- func: restore
520-
- func: package
521-
vars:
522-
compass_distribution: compass
523-
- func: publish
524-
vars:
525-
compass_distribution: compass
526-
- func: 'save windows artifacts'
527-
variants: [windows]
528-
# NOTE (@imlucas) Because macos can't utilize task parallelism
529-
# and instead runs `oneshot-compile-test-package-publish`
530-
# save osx artifacts doesn't apply here until we have more than
531-
# 1 macos box setup to run functional tests.
532-
# - func: 'save osx artifacts'
533-
# variants: [macos]
534-
- func: 'save linux artifacts'
535-
variants: [ubuntu]
536-
- func: 'save rhel artifacts'
537-
variants: [rhel]
538-
539-
- name: package-and-publish-compass-isolated
540-
depends_on: [compile]
541-
commands:
542-
- func: restore
543-
- func: package
544-
vars:
545-
compass_distribution: compass-isolated
546-
- func: publish
547-
vars:
548-
compass_distribution: compass-isolated
549-
- func: 'save windows artifacts'
550-
variants: [windows]
551-
- func: 'save linux artifacts'
552-
variants: [ubuntu]
553-
- func: 'save rhel artifacts'
554-
variants: [rhel]
555-
556-
- name: package-and-publish-compass-readonly
557-
depends_on: [compile]
558-
commands:
559-
- func: restore
560-
- func: package
561-
vars:
562-
compass_distribution: compass-readonly
563-
- func: publish
564-
vars:
565-
compass_distribution: compass-readonly
566-
- func: 'save windows artifacts'
567-
variants: [windows]
568-
- func: 'save linux artifacts'
569-
variants: [ubuntu]
570-
- func: 'save rhel artifacts'
571-
variants: [rhel]
572-
573-
# NOTE (@imlucas) Examples of how to extend which tests run
574-
# and against which MongoDB Server version.
575-
#
576-
# - name: test-renderer
577-
# depends_on: [compile]
578-
# tags:
579-
# - 'test'
580-
# commands:
581-
# - func: restore
582-
# - func: test
583-
# vars:
584-
# test_suite: renderer
585-
# - name: test-main
586-
# depends_on: [compile]
587-
# tags:
588-
# - 'test'
589-
# commands:
590-
# - func: restore
591-
# - func: test
592-
# vars:
593-
# test_suite: main
594-
# - name: test-enzyme
595-
# depends_on: [compile]
596-
# tags:
597-
# - 'test'
598-
# commands:
599-
# - func: restore
600-
# - func: test
601-
# vars:
602-
# test_suite: enzyme
603-
# - name: test-unit
604-
# depends_on: [compile]
605-
# tags:
606-
# - 'test'
607-
# commands:
608-
# - func: restore
609-
# - func: test
610-
# vars:
611-
# test_suite: unit
612-
# mongodb_version: stable
613-
# - name: test-functional-unstable-server
614-
# depends_on: [compile]
615-
# tags:
616-
# - 'test'
617-
# commands:
618-
# - func: restore
619-
# - func: test
620-
# vars:
621-
# test_suite: functional
622-
# mongodb_version: stable
623-
# - name: test-functional-unstable-server
624-
# depends_on: [compile]
625-
# tags:
626-
# - 'test'
627-
# commands:
628-
# - func: restore
629-
# - func: test
630-
# vars:
631-
# test_suite: functional
632-
# mongodb_version: unstable
633-
# - name: test-functional-36x-server
634-
# depends_on: [compile]
635-
# tags:
636-
# - 'test'
637-
# commands:
638-
# - func: restore
639-
# - func: test
640-
# vars:
641-
# test_suite: functional
642-
# mongodb_version: 3.6.x
643-
# - name: test-functional-34x-server
644-
# depends_on: [compile]
645-
# tags:
646-
# - 'test'
647-
# commands:
648-
# - func: restore
649-
# - func: test
650-
# vars:
651-
# test_suite: functional
652-
# mongodb_version: 3.4.x
653-
# - name: test-functional-26x-server
654-
# depends_on: [compile]
655-
# tags:
656-
# - 'test'
657-
# commands:
658-
# - func: restore
659-
# - func: test
660-
# vars:
661-
# test_suite: functional
662-
# mongodb_version: 2.6.x
663-
664411
# TODO (@imlucas) determine OS/version deprecation policy, following server, so we don't fall behind
665412
# what maximal resources we're using.
666413
# See https://docs.google.com/document/d/1IfQGC7wTtrlsc2SqURirvt_4uMuU606nXNbu-stw6bQ/edit

0 commit comments

Comments
 (0)