@@ -7,27 +7,26 @@ CRYPT_SHARED_VERSION=$(cat packages/compass/src/deps/csfle/version)
77
88set +x
99echo " ${ARTIFACTORY_PASSWORD} " > /tmp/artifactory_password
10- cat << EOF > /tmp/silkbomb.env
11- SILK_CLIENT_ID=${SILK_CLIENT_ID}
12- SILK_CLIENT_SECRET=${SILK_CLIENT_SECRET}
13- EOF
1410set -x
1511
1612trap_handler () {
17- rm -vf /tmp/artifactory_password /tmp/silkbomb.env
13+ rm -vf /tmp/artifactory_password
1814}
1915trap trap_handler ERR EXIT
2016
21- scp -v -i " $SIGNING_SERVER_PRIVATE_KEY_CYGPATH " -P " $SIGNING_SERVER_PORT " .sbom/dependencies.json /tmp/silkbomb.env /tmp/ artifactory_password " $SIGNING_SERVER_USERNAME " @" $SIGNING_SERVER_HOSTNAME " :/tmp/
17+ scp -v -i " $SIGNING_SERVER_PRIVATE_KEY_CYGPATH " -P " $SIGNING_SERVER_PORT " .sbom/dependencies.json /tmp/artifactory_password " $SIGNING_SERVER_USERNAME " @" $SIGNING_SERVER_HOSTNAME " :/tmp/
2218ssh -v -i " $SIGNING_SERVER_PRIVATE_KEY_CYGPATH " -p " $SIGNING_SERVER_PORT " " $SIGNING_SERVER_USERNAME " @" $SIGNING_SERVER_HOSTNAME " \
2319 " (cat /tmp/dependencies.json | jq -r '.[] | " ' "pkg:npm/" + .name + "@" + .version' " ' > /tmp/purls.txt) && \
2420 echo " pkg:generic/mongo_crypt_shared@${CRYPT_SHARED_VERSION} " >> /tmp/purls.txt && \
25- (cat /tmp/artifactory_password | docker login artifactory.corp.mongodb.com --username '${ARTIFACTORY_USERNAME} ' --password-stdin ; rm -f /tmp/artifactor_password ) && \
26- docker pull artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1 .0 && \
27- docker run --rm -v /tmp:/tmp artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1 .0 update \
21+ (cat /tmp/artifactory_password | docker login artifactory.corp.mongodb.com --username '${ARTIFACTORY_USERNAME} ' --password-stdin ; rm -f /tmp/artifactory_password ) && \
22+ docker pull artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2 .0 && \
23+ docker run --rm -v /tmp:/tmp artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2 .0 update \
2824 --purls /tmp/purls.txt --sbom-out /tmp/sbom-lite.json && \
29- docker run --env-file /tmp/silkbomb.env --rm -v /tmp:/tmp artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0 upload \
30- --silk-asset-group " ${SILK_ASSET_GROUP} " --sbom-in /tmp/sbom-lite.json && \
31- docker run --env-file /tmp/silkbomb.env --rm -v /tmp:/tmp artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0 download \
32- --silk-asset-group " ${SILK_ASSET_GROUP} " --sbom-out /tmp/sbom.json"
33- scp -v -i " $SIGNING_SERVER_PRIVATE_KEY_CYGPATH " -P " $SIGNING_SERVER_PORT " " $SIGNING_SERVER_USERNAME " @" $SIGNING_SERVER_HOSTNAME " :/tmp/{sbom-lite.json,sbom.json,purls.txt} .sbom/
25+ kondukto_token=\$ (AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
26+ AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
27+ AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN} \
28+ aws secretsmanager get-secret-value --secret-id \" kondukto-token\" --query 'SecretString' --output text) && \
29+ echo \" KONDUKTO_TOKEN=\$ kondukto_token\" > /tmp/kondukto_credentials.env && \
30+ docker run --env-file /tmp/kondukto_credentials.env --rm -v /tmp:/tmp artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0 augment \
31+ --repo mongodb-js/compass --branch ${KONDUKTO_BRANCH} --sbom-in /tmp/sbom-lite.json --sbom-out /tmp/sbom.json"
32+ scp -v -i " $SIGNING_SERVER_PRIVATE_KEY_CYGPATH " -P " $SIGNING_SERVER_PORT " " $SIGNING_SERVER_USERNAME " @" $SIGNING_SERVER_HOSTNAME " :/tmp/{sbom-lite.json,sbom.json,purls.txt} .sbom/
0 commit comments