@@ -31,10 +31,10 @@ functions:
3131 - command : git.get_project
3232 params :
3333 directory : mongo-csharp-driver
34- # Applies the subitted patch, if any
34+ # Applies the submitted patch, if any
3535 # Deprecated. Should be removed. But still needed for certain agents (ZAP)
3636 - command : git.apply_patch
37- # Make an evergreen exapanstion file with dynamic values
37+ # Make an evergreen expansion file with dynamic values
3838 - command : shell.exec
3939 params :
4040 working_dir : mongo-csharp-driver
@@ -46,6 +46,11 @@ functions:
4646 CURRENT_VERSION=latest
4747 fi
4848
49+ if [ "${PACKAGE_TARGET}" != "" ]; then
50+ PACKAGE_VERSION=$(PACKAGE_TARGET="${PACKAGE_TARGET}" sh ./evergreen/packages-version.sh)
51+ fi
52+
53+ export DOTNET_SDK_PATH="$(pwd)/../.dotnet"
4954 export DRIVERS_TOOLS="$(pwd)/../drivers-tools"
5055
5156 if [ "Windows_NT" = "$OS" ]; then # Magic variable in cygwin
@@ -68,6 +73,8 @@ functions:
6873 MONGODB_BINARIES: "$MONGODB_BINARIES"
6974 UPLOAD_BUCKET: "$UPLOAD_BUCKET"
7075 PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
76+ PACKAGE_VERSION: "$PACKAGE_VERSION"
77+ DOTNET_SDK_PATH: "$DOTNET_SDK_PATH"
7178 PREPARE_SHELL: |
7279 set -o errexit
7380 set -o xtrace
@@ -76,14 +83,16 @@ functions:
7683 export MONGODB_BINARIES="$MONGODB_BINARIES"
7784 export UPLOAD_BUCKET="$UPLOAD_BUCKET"
7885 export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
79-
86+ export PACKAGE_VERSION="$PACKAGE_VERSION"
8087 export TMPDIR="$MONGO_ORCHESTRATION_HOME/db"
81- export PATH="$MONGODB_BINARIES:$PATH"
88+ export PATH="$DOTNET_SDK_PATH:$ MONGODB_BINARIES:$PATH"
8289 export PROJECT="${project}"
8390 EOT
8491 # See what we've done
8592 cat expansion.yml
8693
94+ # Do not output expansion.yml contents after this point
95+
8796 # Add CSFLE variables that shouldn't be output to the logs
8897 cat <<EOT >> expansion.yml
8998 PREPARE_CSFLE: |
@@ -97,13 +106,19 @@ functions:
97106 export FLE_GCP_PRIVATE_KEY=${FLE_GCP_PRIVATE_KEY}
98107 set -o xtrace # Enable tracing.
99108 EOT
100- # Do not output expansion.yml contents after this point
101109
102110 # Load the expansion file to make an evergreen variable with the current unique version
103111 - command : expansions.update
104112 params :
105113 file : mongo-csharp-driver/expansion.yml
106114
115+ install-dotnet :
116+ - command : shell.exec
117+ params :
118+ script : |
119+ ${PREPARE_SHELL}
120+ OS=${OS} sh ${PROJECT_DIRECTORY}/evergreen/install-dotnet.sh
121+
107122 prepare-resources :
108123 - command : shell.exec
109124 params :
@@ -1023,6 +1038,61 @@ functions:
10231038 ${PREPARE_SHELL}
10241039 echo '{"results": [{ "status": "FAIL", "test_file": "Build", "log_raw": "No test-results.json found was created" } ]}' > ${PROJECT_DIRECTORY}/test-results.json
10251040
1041+ packages-pack :
1042+ - command : shell.exec
1043+ params :
1044+ working_dir : mongo-csharp-driver
1045+ script : |
1046+ ${PREPARE_SHELL}
1047+ . ./evergreen/packages-pack.sh
1048+
1049+ packages-push :
1050+ - command : shell.exec
1051+ params :
1052+ working_dir : mongo-csharp-driver
1053+ env :
1054+ PACKAGES_SOURCE : ${PACKAGES_SOURCE}
1055+ PACKAGES_SOURCE_KEY : ${PACKAGES_SOURCE_KEY}
1056+ script : |
1057+ ${PREPARE_SHELL}
1058+ . ./evergreen/packages-push.sh
1059+
1060+ upload-package :
1061+ - command : s3.put
1062+ params :
1063+ aws_key : ${aws_key}
1064+ aws_secret : ${aws_secret}
1065+ local_file : ${PROJECT_DIRECTORY}/build/nuget/${PACKAGE_ID}.${PACKAGE_VERSION}.nupkg
1066+ remote_file : ${UPLOAD_BUCKET}/${revision}/${PACKAGE_ID}.${PACKAGE_VERSION}.nupkg
1067+ bucket : mciuploads
1068+ permissions : public-read
1069+ content_type : ${content_type|application/octet-stream}
1070+ - command : s3.put
1071+ params :
1072+ aws_key : ${aws_key}
1073+ aws_secret : ${aws_secret}
1074+ local_file : ${PROJECT_DIRECTORY}/build/nuget/${PACKAGE_ID}.${PACKAGE_VERSION}.snupkg
1075+ remote_file : ${UPLOAD_BUCKET}/${revision}/${PACKAGE_ID}.${PACKAGE_VERSION}.snupkg
1076+ bucket : mciuploads
1077+ permissions : public-read
1078+ content_type : ${content_type|application/octet-stream}
1079+
1080+ download-package :
1081+ - command : s3.get
1082+ params :
1083+ aws_key : ${aws_key}
1084+ aws_secret : ${aws_secret}
1085+ local_file : ${PROJECT_DIRECTORY}/build/nuget/${PACKAGE_ID}.${PACKAGE_VERSION}.nupkg
1086+ remote_file : ${UPLOAD_BUCKET}/${revision}/${PACKAGE_ID}.${PACKAGE_VERSION}.nupkg
1087+ bucket : mciuploads
1088+ - command : s3.get
1089+ params :
1090+ aws_key : ${aws_key}
1091+ aws_secret : ${aws_secret}
1092+ local_file : ${PROJECT_DIRECTORY}/build/nuget/${PACKAGE_ID}.${PACKAGE_VERSION}.snupkg
1093+ remote_file : ${UPLOAD_BUCKET}/${revision}/${PACKAGE_ID}.${PACKAGE_VERSION}.snupkg
1094+ bucket : mciuploads
1095+
10261096pre :
10271097 - func : fetch-source
10281098 - func : prepare-resources
@@ -1040,7 +1110,6 @@ post:
10401110 - func : cleanup
10411111
10421112tasks :
1043-
10441113 - name : test-net472
10451114 commands :
10461115 - func : bootstrap-mongo-orchestration
@@ -1676,6 +1745,47 @@ tasks:
16761745 export GCPKMS_INSTANCENAME=${GCPKMS_INSTANCENAME}
16771746 GCPKMS_CMD="MONGODB_URI='mongodb://localhost:27017' ./evergreen/run-csfle-gcp-tests.sh" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
16781747
1748+ - name : packages-create
1749+ commands :
1750+ - func : packages-pack
1751+ - func : upload-package
1752+ vars :
1753+ PACKAGE_ID : " MongoDB.Bson"
1754+ - func : upload-package
1755+ vars :
1756+ PACKAGE_ID : " MongoDB.Driver"
1757+ - func : upload-package
1758+ vars :
1759+ PACKAGE_ID : " MongoDB.Driver.Core"
1760+ - func : upload-package
1761+ vars :
1762+ PACKAGE_ID : " MongoDB.Driver.GridFS"
1763+ - func : upload-package
1764+ vars :
1765+ PACKAGE_ID : " mongocsharpdriver"
1766+
1767+ - name : packages-push
1768+ commands :
1769+ - func : download-package
1770+ vars :
1771+ PACKAGE_ID : " MongoDB.Bson"
1772+ - func : download-package
1773+ vars :
1774+ PACKAGE_ID : " MongoDB.Driver"
1775+ - func : download-package
1776+ vars :
1777+ PACKAGE_ID : " MongoDB.Driver.Core"
1778+ - func : download-package
1779+ vars :
1780+ PACKAGE_ID : " MongoDB.Driver.GridFS"
1781+ - func : download-package
1782+ vars :
1783+ PACKAGE_ID : " mongocsharpdriver"
1784+ - func : packages-push
1785+ vars :
1786+ PACKAGES_SOURCE : " https://api.nuget.org/v3/index.json"
1787+ PACKAGES_SOURCE_KEY : ${nuget_api_key}
1788+
16791789axes :
16801790 - id : version
16811791 display_name : MongoDB Version
@@ -1897,6 +2007,19 @@ task_groups:
18972007 tasks :
18982008 - test-csfle-with-gcp-kms
18992009
2010+ - name : dev-package
2011+ setup_task :
2012+ - func : fetch-source
2013+ vars :
2014+ PACKAGE_TARGET : " dev"
2015+ - func : prepare-resources
2016+ - func : fix-absolute-paths
2017+ - func : make-files-executable
2018+ - func : install-dotnet
2019+ tasks :
2020+ - packages-create
2021+ - packages-push
2022+
19002023buildvariants :
19012024
19022025- matrix_name : " secure-tests"
@@ -2200,3 +2323,11 @@ buildvariants:
22002323 - name : test-smoke-tests-netcoreapp31
22012324 - name : test-smoke-tests-net50
22022325 - name : test-smoke-tests-net60
2326+
2327+ - name : dev-package-pack
2328+ git_tag_only : true
2329+ display_name : " Dev Package Pack"
2330+ run_on : ubuntu1804-small
2331+ tags : ["dev-package"]
2332+ tasks :
2333+ - name : dev-package
0 commit comments