@@ -335,14 +335,16 @@ functions:
335
335
336
336
337
337
" stop_mongod " :
338
- command : shell .exec
338
+ command : subprocess .exec
339
339
params :
340
- shell : bash
340
+ binary : bash
341
341
working_dir : " ."
342
- script : |
342
+ args :
343
+ - -c
344
+ - |
343
345
set -o errexit
344
346
set -o pipefail
345
- if cd drivers-evergreen-tools/.evergreen/orchestration; then
347
+ if cd drivers-evergreen-tools/.evergreen/orchestration 2>/dev/null ; then
346
348
. ../venv-utils.sh
347
349
if venvactivate venv; then
348
350
mongo-orchestration stop
@@ -579,13 +581,23 @@ functions:
579
581
display_name : " working-dir.tar.gz"
580
582
581
583
" upload mongo orchestration artifacts " :
582
- - command : shell .exec
584
+ - command : subprocess .exec
583
585
params :
584
586
working_dir : " ."
585
- script : |
586
- find . -name \*.log | xargs tar czf mongodb-logs.tar.gz
587
+ binary : bash
588
+ args :
589
+ - -c
590
+ - |
591
+ set -o errexit
592
+ for log in $(find . -name '*.log'); do
593
+ tar rf mongodb-logs.tar "$log"
594
+ done
595
+ if [[ -f mongodb-logs.tar ]]; then
596
+ gzip mongodb-logs.tar
597
+ fi
587
598
- command : s3.put
588
599
params :
600
+ optional : true
589
601
aws_key : ${aws_key}
590
602
aws_secret : ${aws_secret}
591
603
local_file : mongodb-logs.tar.gz
@@ -638,6 +650,55 @@ functions:
638
650
name : perf
639
651
file : mongo-cxx-driver/results.json
640
652
653
+ " run scan build " :
654
+ - command : subprocess.exec
655
+ type : test
656
+ params :
657
+ binary : bash
658
+ working_dir : " mongo-cxx-driver"
659
+ add_expansions_to_env : true
660
+ redirect_standard_error_to_output : true
661
+ args :
662
+ - -c
663
+ - .evergreen/compile-scan-build.sh
664
+
665
+ " upload scan artifacts " :
666
+ - command : subprocess.exec
667
+ type : test
668
+ params :
669
+ working_dir : " mongo-cxx-driver"
670
+ binary : bash
671
+ args :
672
+ - -c
673
+ - |
674
+ set -o errexit
675
+ if find scan -name \*.html | grep -q html; then
676
+ (cd scan && find . -name index.html -exec echo "<li><a href='{}'>{}</a></li>" \;) >> scan.html
677
+ else
678
+ echo "No issues found" > scan.html
679
+ fi
680
+ - command : subprocess.exec
681
+ params :
682
+ silent : true
683
+ working_dir : mongo-cxx-driver
684
+ binary : bash
685
+ env :
686
+ AWS_ACCESS_KEY_ID : ${aws_key}
687
+ AWS_SECRET_ACCESS_KEY : ${aws_secret}
688
+ args :
689
+ - -c
690
+ - aws s3 cp scan s3://mciuploads/${project}/${build_variant}/${revision}/${version_id}/${build_id}/scan/ --recursive --acl public-read --region us-east-1
691
+ - command : s3.put
692
+ params :
693
+ aws_key : ${aws_key}
694
+ aws_secret : ${aws_secret}
695
+ remote_file : ${project}/${build_variant}/${revision}/${version_id}/${build_id}/scan/index.html
696
+ bucket : mciuploads
697
+ permissions : public-read
698
+ local_file : mongo-cxx-driver/scan.html
699
+ content_type : text/html
700
+ display_name : Scan Build Report
701
+
641
702
# ######################################
642
703
# Post Task #
643
704
# ######################################
@@ -1108,6 +1169,66 @@ tasks:
1108
1169
1109
1170
./build/src/mongocxx/test/test_driver "atlas search indexes prose tests"
1110
1171
1172
+ - name : scan-build-ubuntu2204-std11-mnmlstc
1173
+ run_on : ubuntu2204-large
1174
+ tags : [scan-build-matrix]
1175
+ commands :
1176
+ - func : " setup"
1177
+ - func : " fetch_c_driver_source"
1178
+ - func : " run scan build"
1179
+ vars :
1180
+ CXX_STANDARD : 11
1181
+ BSONCXX_POLYFILL : mnmlstc
1182
+ - func : " upload scan artifacts"
1183
+
1184
+ - name : scan-build-ubuntu2204-std11-boost
1185
+ run_on : ubuntu2204-large
1186
+ tags : [scan-build-matrix]
1187
+ commands :
1188
+ - func : " setup"
1189
+ - func : " fetch_c_driver_source"
1190
+ - func : " run scan build"
1191
+ vars :
1192
+ CXX_STANDARD : 11
1193
+ BSONCXX_POLYFILL : boost
1194
+ - func : " upload scan artifacts"
1195
+
1196
+ - name : scan-build-ubuntu2204-std11-impls
1197
+ run_on : ubuntu2204-large
1198
+ tags : [scan-build-matrix]
1199
+ commands :
1200
+ - func : " setup"
1201
+ - func : " fetch_c_driver_source"
1202
+ - func : " run scan build"
1203
+ vars :
1204
+ CXX_STANDARD : 11
1205
+ BSONCXX_POLYFILL : impls
1206
+ - func : " upload scan artifacts"
1207
+
1208
+ - name : scan-build-ubuntu2204-std14-impls
1209
+ run_on : ubuntu2204-large
1210
+ tags : [scan-build-matrix]
1211
+ commands :
1212
+ - func : " setup"
1213
+ - func : " fetch_c_driver_source"
1214
+ - func : " run scan build"
1215
+ vars :
1216
+ CXX_STANDARD : 14
1217
+ BSONCXX_POLYFILL : impls
1218
+ - func : " upload scan artifacts"
1219
+
1220
+ - name : scan-build-ubuntu2204-std17
1221
+ run_on : ubuntu2204-large
1222
+ tags : [scan-build-matrix]
1223
+ commands :
1224
+ - func : " setup"
1225
+ - func : " fetch_c_driver_source"
1226
+ - func : " run scan build"
1227
+ vars :
1228
+ CXX_STANDARD : 17
1229
+ BSONCXX_POLYFILL : std
1230
+ - func : " upload scan artifacts"
1231
+
1111
1232
task_groups :
1112
1233
- name : tg-abi-stability
1113
1234
max_hosts : -1
@@ -2044,3 +2165,8 @@ buildvariants:
2044
2165
- name : lint
2045
2166
display_name : Lint
2046
2167
tasks : [lint]
2168
+
2169
+ - name : scan-build-matrix
2170
+ display_name : scan-build-matrix
2171
+ tasks :
2172
+ - name : .scan-build-matrix
0 commit comments