Skip to content

Commit fd3231b

Browse files
committed
utilize tmp directory
1 parent 6414834 commit fd3231b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.evergreen.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3794,11 +3794,9 @@ functions:
37943794
script: |
37953795
# use AWS CLI to get the Kondukto API token from AWS Secrets Manager
37963796
kondukto_token=$(aws secretsmanager get-secret-value --secret-id "kondukto-token" --region "us-east-1" --query 'SecretString' --output text)
3797-
if [ $? -ne 0 ]; then
3798-
exit 1
3799-
fi
3797+
set -e
38003798
# set the KONDUKTO_TOKEN environment variable
3801-
echo "KONDUKTO_TOKEN=$kondukto_token" > ${workdir}/kondukto_credentials.env
3799+
echo "KONDUKTO_TOKEN=$kondukto_token" > /tmp/kondukto_credentials.env
38023800
- command: subprocess.exec
38033801
params:
38043802
working_dir: src

.evergreen/download-crypt-shared-and-generate-sbom.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ set +x
1313
echo "${ARTIFACTORY_PASSWORD}" | docker login artifactory.corp.mongodb.com --username "${ARTIFACTORY_USERNAME}" --password-stdin
1414
set -x
1515

16+
trap_handler() {
17+
rm -f /tmp/kondukto_credentials.env
18+
}
19+
trap trap_handler ERR EXIT
20+
1621
docker pull artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0
1722
docker run --rm -v ${PWD}:/pwd artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0 update \
1823
--purls /pwd/dist/.purls.txt --sbom-out /pwd/dist/.sbom-lite.json
19-
docker run --env-file ${workdir}/kondukto_credentials.env --rm -v ${PWD}:/pwd artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0 augment \
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 \
2025
--repo mongodb-js/mongosh --branch ${KONDUKTO_BRANCH} --sbom-in /pwd/dist/.sbom-lite.json -sbom-out /pwd/dist/.sbom.json

0 commit comments

Comments
 (0)