From 75356593d6d240f1a6c60954e918510b11bdcbdd Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 12 Mar 2020 10:17:58 -0400 Subject: [PATCH] manually compress rspec results and upload compressed file to s3 --- .evergreen/config.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index e9ebeebcdd..f8679ba16a 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -182,7 +182,26 @@ functions: # This is specified in this yaml file earlier. local_file: ./src/tmp/rspec.json display_name: rspec.json - remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/artifacts/${task_id}-${execution}-rspec.json + remote_file: ${UPLOAD_BUCKET}/${version_id}/${build_id}/artifacts/${build_variant}/rspec.json + content_type: application/json + permissions: public-read + bucket: mciuploads + # AWS does not appear to support on-the-fly gzip encoding; compress + # the results manually and upload a compressed file. + # Typical size reduction: 50 MB -> 800 KB + - command: shell.exec + params: + script: | + gzip src/tmp/rspec.json.gz + - command: s3.put + params: + aws_key: ${aws_key} + aws_secret: ${aws_secret} + # src is the relative path to repo checkout, + # This is specified in this yaml file earlier. + local_file: ./src/tmp/rspec.json.gz + display_name: rspec.json.gz + remote_file: ${UPLOAD_BUCKET}/${version_id}/${build_id}/artifacts/${build_variant}/rspec.json.gz content_type: application/json permissions: public-read bucket: mciuploads