File tree Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Expand file tree Collapse file tree 2 files changed +23
-14
lines changed Original file line number Diff line number Diff line change @@ -3780,6 +3780,23 @@ functions:
37803780 # - signature_tag (either 'signed' or 'unsigned')
37813781 # ##
37823782 add_crypt_shared_and_sbom :
3783+ - command : ec2.assume_role
3784+ display_name : Assume IAM role with permissions to pull Kondukto API token
3785+ params :
3786+ role_arn : ${kondukto_role_arn}
3787+ - command : shell.exec
3788+ display_name : Pull Kondukto API token from AWS Secrets Manager and write it to file
3789+ params :
3790+ silent : true
3791+ shell : bash
3792+ working_dir : src
3793+ include_expansions_in_env : [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
3794+ script : |
3795+ set -e
3796+ # use AWS CLI to get the Kondukto API token from AWS Secrets Manager
3797+ kondukto_token=$(aws secretsmanager get-secret-value --secret-id "kondukto-token" --region "us-east-1" --query 'SecretString' --output text)
3798+ # set the KONDUKTO_TOKEN environment variable
3799+ echo "KONDUKTO_TOKEN=$kondukto_token" > /tmp/kondukto_credentials.env
37833800 - command : subprocess.exec
37843801 params :
37853802 working_dir : src
@@ -3791,9 +3808,7 @@ functions:
37913808 ARTIFACTORY_USERNAME : ${artifactory_username}
37923809 ARTIFACTORY_PASSWORD : ${artifactory_password}
37933810 # for Silk SBOM integration
3794- SILK_ASSET_GROUP : mongosh-${executable_os_id}
3795- SILK_CLIENT_ID : ${silk_client_id}
3796- SILK_CLIENT_SECRET : ${silk_client_secret}
3811+ KONDUKTO_BRANCH : ${branch_name}_${executable_os_id}
37973812 create_static_analysis_report :
37983813 - command : s3.get
37993814 params :
Original file line number Diff line number Diff line change @@ -11,21 +11,15 @@ cat dist/.purls.txt
1111
1212set +x
1313echo " ${ARTIFACTORY_PASSWORD} " | docker login artifactory.corp.mongodb.com --username " ${ARTIFACTORY_USERNAME} " --password-stdin
14- cat << EOF > silkbomb.env
15- SILK_CLIENT_ID=${SILK_CLIENT_ID}
16- SILK_CLIENT_SECRET=${SILK_CLIENT_SECRET}
17- EOF
1814set -x
1915
2016trap_handler () {
21- rm -f silkbomb .env
17+ rm -f /tmp/kondukto_credentials .env
2218}
2319trap trap_handler ERR EXIT
2420
25- docker pull artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1 .0
26- docker run --rm -v ${PWD} :/pwd artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1 .0 update \
21+ docker pull artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2 .0
22+ docker run --rm -v ${PWD} :/pwd artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2 .0 update \
2723 --purls /pwd/dist/.purls.txt --sbom-out /pwd/dist/.sbom-lite.json
28- docker run --env-file silkbomb.env --rm -v ${PWD} :/pwd artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0 upload \
29- --silk-asset-group " ${SILK_ASSET_GROUP} " --sbom-in /pwd/dist/.sbom-lite.json
30- docker run --env-file silkbomb.env --rm -v ${PWD} :/pwd artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0 download \
31- --silk-asset-group " ${SILK_ASSET_GROUP} " --sbom-out /pwd/dist/.sbom.json
24+ docker run --env-file /tmp/kondukto_credentials.env --rm -v ${PWD} :/pwd artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0 augment \
25+ --repo mongodb-js/mongosh --branch ${KONDUKTO_BRANCH} --sbom-in /pwd/dist/.sbom-lite.json --sbom-out /pwd/dist/.sbom.json
You can’t perform that action at this time.
0 commit comments