Skip to content

Commit 43eddcf

Browse files
p-mongop
authored andcommitted
manually compress rspec results and upload compressed file to s3 (#1781)
Co-authored-by: Oleg Pudeyev <oleg@bsdpower.com>
1 parent 863c232 commit 43eddcf

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.evergreen/config.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,26 @@ functions:
182182
# This is specified in this yaml file earlier.
183183
local_file: ./src/tmp/rspec.json
184184
display_name: rspec.json
185-
remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/artifacts/${task_id}-${execution}-rspec.json
185+
remote_file: ${UPLOAD_BUCKET}/${version_id}/${build_id}/artifacts/${build_variant}/rspec.json
186+
content_type: application/json
187+
permissions: public-read
188+
bucket: mciuploads
189+
# AWS does not appear to support on-the-fly gzip encoding; compress
190+
# the results manually and upload a compressed file.
191+
# Typical size reduction: 50 MB -> 800 KB
192+
- command: shell.exec
193+
params:
194+
script: |
195+
gzip <src/tmp/rspec.json >src/tmp/rspec.json.gz
196+
- command: s3.put
197+
params:
198+
aws_key: ${aws_key}
199+
aws_secret: ${aws_secret}
200+
# src is the relative path to repo checkout,
201+
# This is specified in this yaml file earlier.
202+
local_file: ./src/tmp/rspec.json.gz
203+
display_name: rspec.json.gz
204+
remote_file: ${UPLOAD_BUCKET}/${version_id}/${build_id}/artifacts/${build_variant}/rspec.json.gz
186205
content_type: application/json
187206
permissions: public-read
188207
bucket: mciuploads

0 commit comments

Comments
 (0)