Skip to content

Commit

Permalink
rather retry the whole create-sbom.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
lerouxb committed Jan 17, 2025
1 parent ac015b2 commit 49c39d3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .evergreen/create-sbom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ trap_handler() {
}
trap trap_handler ERR EXIT

bash "./retry-with-backoff.sh" 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/
bash "./retry-with-backoff.sh" ssh -v -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -p "$SIGNING_SERVER_PORT" "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME" \
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/
ssh -v -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -p "$SIGNING_SERVER_PORT" "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME" \
"(cat /tmp/dependencies.json | jq -r '.[] | "'"pkg:npm/" + .name + "@" + .version'"' > /tmp/purls.txt) && \
echo "pkg:generic/mongo_crypt_shared@${CRYPT_SHARED_VERSION}" >> /tmp/purls.txt && \
(cat /tmp/artifactory_password | docker login artifactory.corp.mongodb.com --username '${ARTIFACTORY_USERNAME}' --password-stdin ; rm -f /tmp/artifactor_password ) && \
Expand All @@ -30,4 +30,4 @@ bash "./retry-with-backoff.sh" ssh -v -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -
--silk-asset-group "${SILK_ASSET_GROUP}" --sbom-in /tmp/sbom-lite.json && \
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 \
--silk-asset-group "${SILK_ASSET_GROUP}" --sbom-out /tmp/sbom.json"
bash "./retry-with-backoff.sh" 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/
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/
22 changes: 21 additions & 1 deletion .evergreen/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ functions:
script: |
set -e
.evergreen/create-sbom.sh
bash ".evergreen/retry-with-backoff.sh" .evergreen/create-sbom.sh
- command: shell.exec
params:
working_dir: src
Expand Down Expand Up @@ -659,6 +659,26 @@ functions:
npm run --unsafe-perm --workspace compass-e2e-tests test-packaged-ci
get-compass-mongodb-com:
- command: shell.exec
type: setup
params:
working_dir: src
shell: bash
script: |
set -e
git clone https://github.com/10gen/compass-mongodb-com.git ../compass-mongodb-com
cd ../compass-mongodb-com
echo "Using node version:";
node -v;
echo "Using npm version:";
npm -v;
echo "Using gcc version:"
gcc --version;
echo "Using g++ version:"
g++ --version;
npm ci --engine-strict=false
smoketest-packaged-app:
- command: shell.exec
# Fail the task if it's idle for 10 mins
Expand Down

0 comments on commit 49c39d3

Please sign in to comment.