Skip to content

Commit

Permalink
chore(ci): include mongosh logs in task uploads (#2039)
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax authored Jun 27, 2024
1 parent 3538f73 commit 1233f4a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
22 changes: 20 additions & 2 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ post:
tar cvzf npm-logs.tgz npm-logs

if [ -d "src/tmp/mongodb-runner/logs" ]; then
tar cvzf mongodb-runner-logs.tgz -C src/tmp/mongodb-runner logs
tar cvzf mongodb-runner-logs.tgz -C src/tmp/mongodb-runner logs
else
echo "Directory src/tmp/logs does not exist. Skipping."
echo "Directory src/tmp/logs does not exist. Skipping."
fi

if [ -d "$HOME/.mongodb/mongosh" ]; then
TARGET="$PWD/mongosh-logs.tgz"
(cd $HOME/.mongodb && tar cvzf "$TARGET" mongosh/*_log)
else
echo "Directory ~/.mongodb/mongosh does not exist. Skipping."
fi
- command: s3.put
params:
Expand All @@ -25,6 +32,17 @@ post:
permissions: private
visibility: signed
content_type: application/x-gzip
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: mongosh-logs.tgz
remote_file: mongosh/binaries/${revision}/${revision_order_id}/mongosh-logs-${build_variant}-${task_name}-${task_id}.tgz
bucket: mciuploads
permissions: private
visibility: signed
content_type: application/x-gzip
optional: true
- command: s3.put
params:
aws_key: ${aws_key}
Expand Down
22 changes: 20 additions & 2 deletions .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,16 @@ post:
tar cvzf npm-logs.tgz npm-logs

if [ -d "src/tmp/mongodb-runner/logs" ]; then
tar cvzf mongodb-runner-logs.tgz -C src/tmp/mongodb-runner logs
tar cvzf mongodb-runner-logs.tgz -C src/tmp/mongodb-runner logs
else
echo "Directory src/tmp/logs does not exist. Skipping."
echo "Directory src/tmp/logs does not exist. Skipping."
fi

if [ -d "$HOME/.mongodb/mongosh" ]; then
TARGET="$PWD/mongosh-logs.tgz"
(cd $HOME/.mongodb && tar cvzf "$TARGET" mongosh/*_log)
else
echo "Directory ~/.mongodb/mongosh does not exist. Skipping."
fi
- command: s3.put
params:
Expand All @@ -92,6 +99,17 @@ post:
permissions: private
visibility: signed
content_type: application/x-gzip
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: mongosh-logs.tgz
remote_file: mongosh/binaries/${revision}/${revision_order_id}/mongosh-logs-${build_variant}-${task_name}-${task_id}.tgz
bucket: mciuploads
permissions: private
visibility: signed
content_type: application/x-gzip
optional: true
- command: s3.put
params:
aws_key: ${aws_key}
Expand Down

0 comments on commit 1233f4a

Please sign in to comment.