@@ -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
@@ -639,6 +651,55 @@ functions:
639
651
name : perf
640
652
file : mongo-cxx-driver/results.json
641
653
654
+ " run scan build " :
655
+ - command : subprocess.exec
656
+ type : test
657
+ params :
658
+ binary : bash
659
+ working_dir : " mongo-cxx-driver"
660
+ add_expansions_to_env : true
661
+ redirect_standard_error_to_output : true
662
+ args :
663
+ - -c
664
+ - .evergreen/compile-scan-build.sh
665
+
666
+ " upload scan artifacts " :
667
+ - command : subprocess.exec
668
+ type : test
669
+ params :
670
+ working_dir : " mongo-cxx-driver"
671
+ binary : bash
672
+ args :
673
+ - -c
674
+ - |
675
+ set -o errexit
676
+ if find scan -name \*.html | grep -q html; then
677
+ (cd scan && find . -name index.html -exec echo "<li><a href='{}'>{}</a></li>" \;) >> scan.html
678
+ else
679
+ echo "No issues found" > scan.html
680
+ fi
681
+ - command : subprocess.exec
682
+ params :
683
+ silent : true
684
+ working_dir : mongo-cxx-driver
685
+ binary : bash
686
+ env :
687
+ AWS_ACCESS_KEY_ID : ${aws_key}
688
+ AWS_SECRET_ACCESS_KEY : ${aws_secret}
689
+ args :
690
+ - -c
691
+ - aws s3 cp scan s3://mciuploads/${project}/${build_variant}/${revision}/${version_id}/${build_id}/scan/ --recursive --acl public-read --region us-east-1
692
+ - command : s3.put
693
+ params :
694
+ aws_key : ${aws_key}
695
+ aws_secret : ${aws_secret}
696
+ remote_file : ${project}/${build_variant}/${revision}/${version_id}/${build_id}/scan/index.html
697
+ bucket : mciuploads
698
+ permissions : public-read
699
+ local_file : mongo-cxx-driver/scan.html
700
+ content_type : text/html
701
+ display_name : Scan Build Report
702
+
642
703
# ######################################
643
704
# Post Task #
644
705
# ######################################
@@ -1109,6 +1170,66 @@ tasks:
1109
1170
1110
1171
./build/src/mongocxx/test/test_driver "atlas search indexes prose tests"
1111
1172
1173
+ - name : scan-build-ubuntu2204-std11-mnmlstc
1174
+ run_on : ubuntu2204-large
1175
+ tags : [scan-build-matrix]
1176
+ commands :
1177
+ - func : " setup"
1178
+ - func : " fetch_c_driver_source"
1179
+ - func : " run scan build"
1180
+ vars :
1181
+ CXX_STANDARD : 11
1182
+ BSONCXX_POLYFILL : mnmlstc
1183
+ - func : " upload scan artifacts"
1184
+
1185
+ - name : scan-build-ubuntu2204-std11-boost
1186
+ run_on : ubuntu2204-large
1187
+ tags : [scan-build-matrix]
1188
+ commands :
1189
+ - func : " setup"
1190
+ - func : " fetch_c_driver_source"
1191
+ - func : " run scan build"
1192
+ vars :
1193
+ CXX_STANDARD : 11
1194
+ BSONCXX_POLYFILL : boost
1195
+ - func : " upload scan artifacts"
1196
+
1197
+ - name : scan-build-ubuntu2204-std11-impls
1198
+ run_on : ubuntu2204-large
1199
+ tags : [scan-build-matrix]
1200
+ commands :
1201
+ - func : " setup"
1202
+ - func : " fetch_c_driver_source"
1203
+ - func : " run scan build"
1204
+ vars :
1205
+ CXX_STANDARD : 11
1206
+ BSONCXX_POLYFILL : impls
1207
+ - func : " upload scan artifacts"
1208
+
1209
+ - name : scan-build-ubuntu2204-std14-impls
1210
+ run_on : ubuntu2204-large
1211
+ tags : [scan-build-matrix]
1212
+ commands :
1213
+ - func : " setup"
1214
+ - func : " fetch_c_driver_source"
1215
+ - func : " run scan build"
1216
+ vars :
1217
+ CXX_STANDARD : 14
1218
+ BSONCXX_POLYFILL : impls
1219
+ - func : " upload scan artifacts"
1220
+
1221
+ - name : scan-build-ubuntu2204-std17
1222
+ run_on : ubuntu2204-large
1223
+ tags : [scan-build-matrix]
1224
+ commands :
1225
+ - func : " setup"
1226
+ - func : " fetch_c_driver_source"
1227
+ - func : " run scan build"
1228
+ vars :
1229
+ CXX_STANDARD : 17
1230
+ BSONCXX_POLYFILL : std
1231
+ - func : " upload scan artifacts"
1232
+
1112
1233
task_groups :
1113
1234
- name : tg-abi-stability
1114
1235
max_hosts : -1
@@ -2045,3 +2166,8 @@ buildvariants:
2045
2166
- name : lint
2046
2167
display_name : Lint
2047
2168
tasks : [lint]
2169
+
2170
+ - name : scan-build-matrix
2171
+ display_name : scan-build-matrix
2172
+ tasks :
2173
+ - name : .scan-build-matrix
0 commit comments