Skip to content

Commit 39bb633

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents 0bde8e3 + ab40e04 commit 39bb633

File tree

44 files changed

+2741
-4477
lines changed

Some content is hidden

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

44 files changed

+2741
-4477
lines changed

.evergreen/functions.yml

Lines changed: 136 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ variables:
6464
E2E_TESTS_ATLAS_READANYDATABASE_STRING: ${e2e_tests_atlas_readanydatabase_string}
6565
E2E_TESTS_ATLAS_CUSTOMROLE_STRING: ${e2e_tests_atlas_customrole_string}
6666
E2E_TESTS_ATLAS_SPECIFICPERMISSION_STRING: ${e2e_tests_atlas_specificpermission_string}
67-
NOTARY_URL: http://notary-service.build.10gen.cc:5000
68-
NOTARY_AUTH_TOKEN: ${signing_auth_token}
69-
NOTARY_SIGNING_KEY: ${signing_key_name}
70-
NOTARY_SIGNING_COMMENT: Evergreen project mongodb/compass ${revision} - ${build_variant} - ${branch_name}
7167
MACOS_NOTARY_KEY: ${macos_notary_key}
7268
MACOS_NOTARY_SECRET: ${macos_notary_secret}
7369
MACOS_NOTARY_CLIENT_URL: 'https://macos-notary-1628249594.s3.amazonaws.com/releases/client/latest/darwin_amd64.zip'
@@ -80,6 +76,10 @@ variables:
8076
MONGODB_RUNNER_LOG_DIR: ${workdir}/src/.testserver/
8177
E2E_TESTS_ATLAS_CS_WITHOUT_SEARCH: ${e2e_tests_atlas_cs_without_search}
8278
E2E_TESTS_ATLAS_CS_WITH_SEARCH: ${e2e_tests_atlas_cs_with_search}
79+
GARASIGN_USERNAME: ${garasign_username}
80+
GARASIGN_PASSWORD: ${garasign_password}
81+
ARTIFACTORY_USERNAME: ${artifactory_username}
82+
ARTIFACTORY_PASSWORD: ${artifactory_password}
8383

8484
# This is here with the variables because anchors aren't supported across includes
8585
post:
@@ -306,6 +306,85 @@ functions:
306306
# and be able to find the binary that is used for the tests
307307
file: src/packages/compass/expansions.yml
308308

309+
spawn-signing-server:
310+
# spawn
311+
- command: host.create
312+
type: setup
313+
params:
314+
provider: ec2
315+
distro: ubuntu2004-large
316+
security_group_ids:
317+
- sg-097bff6dd0d1d31d0 # Magic string that's needed for SSH'ing.
318+
# write host info (this file will be read by signingtool when connection to ssh server)
319+
- command: host.list
320+
params:
321+
num_hosts: 1
322+
path: spawned_hosts.json
323+
timeout_seconds: 1200
324+
wait: true
325+
# copy ssh key (this key will be used to connect to ssh server)
326+
- command: shell.exec
327+
params:
328+
shell: bash
329+
script: |
330+
set -e
331+
{
332+
set +x
333+
echo '${__project_aws_ssh_key_value}' > ~/.ssh/mcipacker.pem
334+
chmod 0600 ~/.ssh/mcipacker.pem
335+
set -x
336+
}
337+
# wait for host to be ready
338+
- command: shell.exec
339+
params:
340+
exec_as_string: true
341+
shell: bash
342+
script: |
343+
set -e
344+
user=ubuntu
345+
hostname=$(tr -d '"[]{}' < spawned_hosts.json | cut -d , -f 1 | awk -F : '{print $2}')
346+
identity_file=$(echo ~/.ssh/mcipacker.pem)
347+
348+
attempts=0
349+
connection_attempts=25
350+
351+
## Check for remote connectivity
352+
while ! ssh \
353+
-i "$identity_file" \
354+
-o ConnectTimeout=10 \
355+
-o ForwardAgent=yes \
356+
-o IdentitiesOnly=yes \
357+
-o StrictHostKeyChecking=no \
358+
"$(printf "%s@%s" "$user" "$hostname")" \
359+
exit
360+
do
361+
if [ "$attempts" -ge "$connection_attempts" ]; then
362+
echo "SSH connection failed after $connection_attempts attempts. Exiting..."
363+
exit 1
364+
fi
365+
printf "SSH connection attempt %d/%d failed. Retrying...\n" "$((attempts++))" "$connection_attempts"
366+
## sleep for Permission denied (publickey) errors
367+
sleep 20
368+
done
369+
echo "SSH connection established after $attempts attempts"
370+
371+
# Write the host info so that it can be used by the signing tool
372+
if [[ $OSTYPE == "cygwin" ]]; then
373+
identity_file=$(cygpath -wa "$identity_file")
374+
else
375+
identity_file=$(eval echo "$identity_file")
376+
fi
377+
cat <<EOL > signing_host_info.yml
378+
SIGNING_SERVER_HOSTNAME: $hostname
379+
SIGNING_SERVER_PRIVATE_KEY: $identity_file
380+
SIGNING_SERVER_USERNAME: $user
381+
SIGNING_SERVER_PORT: 22
382+
EOL
383+
# Update the expansions
384+
- command: expansions.update
385+
params:
386+
file: signing_host_info.yml
387+
309388
package:
310389
- command: shell.exec
311390
params:
@@ -316,6 +395,10 @@ functions:
316395
DEBUG: ${debug}
317396
npm_config_loglevel: ${npm_loglevel}
318397
COMPASS_DISTRIBUTION: ${compass_distribution}
398+
SIGNING_SERVER_HOSTNAME: ${SIGNING_SERVER_HOSTNAME}
399+
SIGNING_SERVER_PRIVATE_KEY: ${SIGNING_SERVER_PRIVATE_KEY}
400+
SIGNING_SERVER_USERNAME: ${SIGNING_SERVER_USERNAME}
401+
SIGNING_SERVER_PORT: ${SIGNING_SERVER_PORT}
319402
script: |
320403
set -e
321404
@@ -504,12 +587,26 @@ functions:
504587
remote_file: ${project}/${revision}_${revision_order_id}/${windows_zip_filename}
505588
content_type: application/zip
506589
optional: true
590+
- command: s3.put
591+
params:
592+
<<: *save-artifact-params-public
593+
local_file: src/packages/compass/dist/${windows_zip_sign_filename}
594+
remote_file: ${project}/${revision}_${revision_order_id}/${windows_zip_sign_filename}
595+
content_type: application/pgp-signature
596+
optional: true
507597
- command: s3.put
508598
params:
509599
<<: *save-artifact-params-public
510600
local_file: src/packages/compass/dist/${windows_nupkg_full_filename}
511601
remote_file: ${project}/${revision}_${revision_order_id}/${windows_nupkg_full_filename}
512602
optional: true
603+
- command: s3.put
604+
params:
605+
<<: *save-artifact-params-public
606+
local_file: src/packages/compass/dist/${windows_nupkg_full_sign_filename}
607+
remote_file: ${project}/${revision}_${revision_order_id}/${windows_nupkg_full_sign_filename}
608+
content_type: application/pgp-signature
609+
optional: true
513610
- command: s3.put
514611
params:
515612
<<: *save-artifact-params-public
@@ -530,34 +627,69 @@ functions:
530627
remote_file: ${project}/${revision}_${revision_order_id}/${osx_zip_filename}
531628
content_type: application/zip
532629
optional: true
630+
- command: s3.put
631+
params:
632+
<<: *save-artifact-params-public
633+
local_file: src/packages/compass/dist/${osx_zip_sign_filename}
634+
remote_file: ${project}/${revision}_${revision_order_id}/${osx_zip_sign_filename}
635+
content_type: application/pgp-signature
636+
optional: true
533637
- command: s3.put
534638
params:
535639
<<: *save-artifact-params-public
536640
local_file: src/packages/compass/dist/${linux_rpm_filename}
537641
remote_file: ${project}/${revision}_${revision_order_id}/${linux_rpm_filename}
538642
content_type: application/x-redhat-package-manager
539643
optional: true
644+
- command: s3.put
645+
params:
646+
<<: *save-artifact-params-public
647+
local_file: src/packages/compass/dist/${linux_rpm_sign_filename}
648+
remote_file: ${project}/${revision}_${revision_order_id}/${linux_rpm_sign_filename}
649+
content_type: application/pgp-signature
650+
optional: true
540651
- command: s3.put
541652
params:
542653
<<: *save-artifact-params-public
543654
local_file: src/packages/compass/dist/${rhel_tar_filename}
544655
remote_file: ${project}/${revision}_${revision_order_id}/${rhel_tar_filename}
545656
content_type: application/x-gzip
546657
optional: true
658+
- command: s3.put
659+
params:
660+
<<: *save-artifact-params-public
661+
local_file: src/packages/compass/dist/${rhel_tar_sign_filename}
662+
remote_file: ${project}/${revision}_${revision_order_id}/${rhel_tar_sign_filename}
663+
content_type: application/pgp-signature
664+
optional: true
547665
- command: s3.put
548666
params:
549667
<<: *save-artifact-params-public
550668
local_file: src/packages/compass/dist/${linux_deb_filename}
551669
remote_file: ${project}/${revision}_${revision_order_id}/${linux_deb_filename}
552670
content_type: application/vnd.debian.binary-package
553671
optional: true
672+
- command: s3.put
673+
params:
674+
<<: *save-artifact-params-public
675+
local_file: src/packages/compass/dist/${linux_deb_sign_filename}
676+
remote_file: ${project}/${revision}_${revision_order_id}/${linux_deb_sign_filename}
677+
content_type: application/pgp-signature
678+
optional: true
554679
- command: s3.put
555680
params:
556681
<<: *save-artifact-params-public
557682
local_file: src/packages/compass/dist/${linux_tar_filename}
558683
remote_file: ${project}/${revision}_${revision_order_id}/${linux_tar_filename}
559684
content_type: application/x-gzip
560685
optional: true
686+
- command: s3.put
687+
params:
688+
<<: *save-artifact-params-public
689+
local_file: src/packages/compass/dist/${linux_tar_sign_filename}
690+
remote_file: ${project}/${revision}_${revision_order_id}/${linux_tar_sign_filename}
691+
content_type: application/pgp-signature
692+
optional: true
561693

562694
get-all-artifacts:
563695
- command: shell.exec

.evergreen/tasks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ tasks:
105105
- func: apply-compass-target-expansion
106106
vars:
107107
compass_distribution: compass
108+
- func: spawn-signing-server
108109
- func: package
109110
vars:
110111
debug: 'hadron*,mongo*,compass*,electron*'
@@ -124,6 +125,7 @@ tasks:
124125
- func: apply-compass-target-expansion
125126
vars:
126127
compass_distribution: compass-readonly
128+
- func: spawn-signing-server
127129
- func: package
128130
vars:
129131
debug: 'hadron*,mongo*,compass*,electron*'
@@ -143,6 +145,7 @@ tasks:
143145
- func: apply-compass-target-expansion
144146
vars:
145147
compass_distribution: compass-isolated
148+
- func: spawn-signing-server
146149
- func: package
147150
vars:
148151
debug: 'hadron*,mongo*,compass*,electron*'

.snyk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ ignore:
1313
SNYK-JS-AGGRIDCOMMUNITY-1932011:
1414
- '*':
1515
reason: None Given
16-
expires: 2024-02-09T14:01:23.838Z
17-
created: 2024-01-10T14:01:23.846Z
16+
expires: 2024-07-17T18:27:24.346Z
17+
created: 2024-01-18T18:27:24.353Z
1818
SNYK-JS-AXIOS-6032459:
1919
- '*':
2020
reason: Not applicable to axios usage inside node-analytics package

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Is there anything else you’d like to see in Compass? Let us know by submitting
5757
- [**@mongodb-js/databases-collections-list**](packages/databases-collections-list): List view for the databases and collections
5858
- [**@mongodb-js/explain-plan-helper**](packages/explain-plan-helper): Explain plan utility methods for MongoDB Compass
5959
- [**@mongodb-js/hadron-plugin-manager**](packages/hadron-plugin-manager): Hadron Plugin Manager
60-
- [**@mongodb-js/mongodb-notary-service-client**](packages/notary-service-client): A client for our notary-service: an API for codesigning
6160
- [**@mongodb-js/ssh-tunnel**](packages/ssh-tunnel): Yet another ssh tunnel based on ssh2
6261
- [**bson-transpilers**](packages/bson-transpilers): Source to source compilers using ANTLR
6362
- [**compass-e2e-tests**](packages/compass-e2e-tests): E2E test suite for Compass app that follows smoke tests / feature testing matrix

0 commit comments

Comments
 (0)