@@ -64,10 +64,6 @@ variables:
64
64
E2E_TESTS_ATLAS_READANYDATABASE_STRING : ${e2e_tests_atlas_readanydatabase_string}
65
65
E2E_TESTS_ATLAS_CUSTOMROLE_STRING : ${e2e_tests_atlas_customrole_string}
66
66
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}
71
67
MACOS_NOTARY_KEY : ${macos_notary_key}
72
68
MACOS_NOTARY_SECRET : ${macos_notary_secret}
73
69
MACOS_NOTARY_CLIENT_URL : ' https://macos-notary-1628249594.s3.amazonaws.com/releases/client/latest/darwin_amd64.zip'
@@ -80,6 +76,10 @@ variables:
80
76
MONGODB_RUNNER_LOG_DIR : ${workdir}/src/.testserver/
81
77
E2E_TESTS_ATLAS_CS_WITHOUT_SEARCH : ${e2e_tests_atlas_cs_without_search}
82
78
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}
83
83
84
84
# This is here with the variables because anchors aren't supported across includes
85
85
post :
@@ -306,6 +306,85 @@ functions:
306
306
# and be able to find the binary that is used for the tests
307
307
file : src/packages/compass/expansions.yml
308
308
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
+
309
388
package :
310
389
- command : shell.exec
311
390
params :
@@ -316,6 +395,10 @@ functions:
316
395
DEBUG : ${debug}
317
396
npm_config_loglevel : ${npm_loglevel}
318
397
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}
319
402
script : |
320
403
set -e
321
404
@@ -504,12 +587,26 @@ functions:
504
587
remote_file : ${project}/${revision}_${revision_order_id}/${windows_zip_filename}
505
588
content_type : application/zip
506
589
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
507
597
- command : s3.put
508
598
params :
509
599
<< : *save-artifact-params-public
510
600
local_file : src/packages/compass/dist/${windows_nupkg_full_filename}
511
601
remote_file : ${project}/${revision}_${revision_order_id}/${windows_nupkg_full_filename}
512
602
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
513
610
- command : s3.put
514
611
params :
515
612
<< : *save-artifact-params-public
@@ -530,34 +627,69 @@ functions:
530
627
remote_file : ${project}/${revision}_${revision_order_id}/${osx_zip_filename}
531
628
content_type : application/zip
532
629
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
533
637
- command : s3.put
534
638
params :
535
639
<< : *save-artifact-params-public
536
640
local_file : src/packages/compass/dist/${linux_rpm_filename}
537
641
remote_file : ${project}/${revision}_${revision_order_id}/${linux_rpm_filename}
538
642
content_type : application/x-redhat-package-manager
539
643
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
540
651
- command : s3.put
541
652
params :
542
653
<< : *save-artifact-params-public
543
654
local_file : src/packages/compass/dist/${rhel_tar_filename}
544
655
remote_file : ${project}/${revision}_${revision_order_id}/${rhel_tar_filename}
545
656
content_type : application/x-gzip
546
657
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
547
665
- command : s3.put
548
666
params :
549
667
<< : *save-artifact-params-public
550
668
local_file : src/packages/compass/dist/${linux_deb_filename}
551
669
remote_file : ${project}/${revision}_${revision_order_id}/${linux_deb_filename}
552
670
content_type : application/vnd.debian.binary-package
553
671
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
554
679
- command : s3.put
555
680
params :
556
681
<< : *save-artifact-params-public
557
682
local_file : src/packages/compass/dist/${linux_tar_filename}
558
683
remote_file : ${project}/${revision}_${revision_order_id}/${linux_tar_filename}
559
684
content_type : application/x-gzip
560
685
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
561
693
562
694
get-all-artifacts :
563
695
- command : shell.exec
0 commit comments