@@ -53,20 +53,23 @@ functions:
5353
5454 export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
5555 export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
56+ export UPLOAD_BUCKET="${project}"
5657 export PROJECT_DIRECTORY="$(pwd)"
5758
5859 cat <<EOT > expansion.yml
5960 CURRENT_VERSION: "$CURRENT_VERSION"
6061 DRIVERS_TOOLS: "$DRIVERS_TOOLS"
6162 MONGO_ORCHESTRATION_HOME: "$MONGO_ORCHESTRATION_HOME"
6263 MONGODB_BINARIES: "$MONGODB_BINARIES"
64+ UPLOAD_BUCKET: "$UPLOAD_BUCKET"
6365 PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
6466 PREPARE_SHELL: |
6567 set -o errexit
6668 set -o xtrace
6769 export DRIVERS_TOOLS="$DRIVERS_TOOLS"
6870 export MONGO_ORCHESTRATION_HOME="$MONGO_ORCHESTRATION_HOME"
6971 export MONGODB_BINARIES="$MONGODB_BINARIES"
72+ export UPLOAD_BUCKET="$UPLOAD_BUCKET"
7073 export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
7174 export DRIVERS_TOOLS_X509="$DRIVERS_TOOLS/.evergreen/x509gen"
7275
@@ -163,13 +166,29 @@ functions:
163166 ${PREPARE_SHELL}
164167 .evergreen/check-clippy.sh
165168
166- " cleanup " :
169+ " upload-mo-artifacts " :
167170 - command : shell.exec
168171 params :
169172 script : |
170173 ${PREPARE_SHELL}
171- rm -rf ~/.rustup
172-
174+ find $MONGO_ORCHESTRATION_HOME -name \*.log | xargs tar czf mongodb-logs.tar.gz
175+ - command : s3.put
176+ params :
177+ aws_key : ${aws_key}
178+ aws_secret : ${aws_secret}
179+ local_file : mongodb-logs.tar.gz
180+ remote_file : ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/logs/${task_id}-${execution}-mongodb-logs.tar.gz
181+ bucket : mciuploads
182+ permissions : public-read
183+ content_type : ${content_type|application/x-gzip}
184+ display_name : " mongodb-logs.tar.gz"
185+
186+ " stop mongo orchestration " :
187+ - command : shell.exec
188+ params :
189+ script : |
190+ ${PREPARE_SHELL}
191+
173192 cd "$MONGO_ORCHESTRATION_HOME"
174193 # source the mongo-orchestration virtualenv if it exists
175194 if [ -f venv/bin/activate ]; then
@@ -178,7 +197,14 @@ functions:
178197 . venv/Scripts/activate
179198 fi
180199 mongo-orchestration stop
181- cd -
200+
201+
202+ " cleanup " :
203+ - command : shell.exec
204+ params :
205+ script : |
206+ ${PREPARE_SHELL}
207+ rm -rf ~/.rustup
182208 rm -rf $DRIVERS_TOOLS || true
183209
184210 " fix absolute paths " :
229255 - func : " install dependencies"
230256
231257post :
258+ - func : " stop mongo orchestration"
259+ - func : " upload-mo-artifacts"
232260 - func : " cleanup"
233261
234262tasks :
0 commit comments