|
3 | 3 | set -o xtrace # Write all commands first to stderr
|
4 | 4 | set -o errexit # Exit the script with error if any of the commands fail
|
5 | 5 |
|
6 |
| -# Supported/used environment variables: |
7 |
| -# AUTH Set to enable authentication. Values are: "auth" / "noauth" (default) |
8 |
| -# SSL Set to enable SSL. Values are "ssl" / "nossl" (default) |
9 |
| -# MONGODB_URI Set the suggested connection MONGODB_URI (including credentials and topology info) |
10 |
| -# TOPOLOGY Allows you to modify variables and the MONGODB_URI based on test topology |
11 |
| -# Supported values: "server", "replica_set", "sharded_cluster" |
12 |
| -# OCSP_TLS_SHOULD_SUCCEED Set to test OCSP. Values are true/false/nil |
| 6 | +# Environment variables used as input: |
| 7 | +# AUTH Set to enable authentication. Values are: "auth" / "noauth" (default) |
| 8 | +# SSL Set to enable SSL. Values are "ssl" / "nossl" (default) |
| 9 | +# MONGODB_URI Set the suggested connection MONGODB_URI (including credentials and topology info) |
| 10 | +# TOPOLOGY Allows you to modify variables and the MONGODB_URI based on test topology |
| 11 | +# Supported values: "server", "replica_set", "sharded_cluster" |
| 12 | +# OCSP_TLS_SHOULD_SUCCEED Set to test OCSP. Values are true/false/nil |
| 13 | +# MONGODB_X509_CLIENT_P12_PATH Absolute path to client certificate in p12 format |
| 14 | +# MONGO_X509_CLIENT_CERTIFICATE_PASSWORD password for client certificate |
| 15 | +# |
| 16 | +# Environment variables produced as output: |
| 17 | +# MONGODB_X509_CLIENT_P12_PATH Absolute path to client certificate in p12 format |
| 18 | +# MONGO_X509_CLIENT_CERTIFICATE_PASSWORD Password for client certificate |
13 | 19 |
|
14 | 20 | AUTH=${AUTH:-noauth}
|
15 | 21 | SSL=${SSL:-nossl}
|
16 | 22 | MONGODB_URI=${MONGODB_URI:-}
|
17 | 23 | TOPOLOGY=${TOPOLOGY:-server}
|
18 | 24 | COMPRESSOR=${COMPRESSOR:-none}
|
19 | 25 | OCSP_TLS_SHOULD_SUCCEED=${OCSP_TLS_SHOULD_SUCCEED:-nil}
|
| 26 | +CLIENT_PEM=${CLIENT_PEM:-nil} |
20 | 27 |
|
21 | 28 | ############################################
|
22 | 29 | # Functions #
|
|
97 | 104 | for var in TMP TEMP NUGET_PACKAGES NUGET_HTTP_CACHE_PATH APPDATA; do
|
98 | 105 | export $var=z:\\data\\tmp;
|
99 | 106 | done
|
100 |
| -powershell.exe .\\build.ps1 -target ${TARGET} |
| 107 | + |
| 108 | +if [[ "$CLIENT_PEM" != "nil" ]]; then |
| 109 | + CLIENT_PEM=${CLIENT_PEM} source evergreen/convert-client-cert-to-pkcs12.sh |
| 110 | +fi |
| 111 | + |
| 112 | +if [[ -z "$MONGO_X509_CLIENT_CERTIFICATE_PATH" && -z "$MONGO_X509_CLIENT_CERTIFICATE_PASSWORD" ]]; then |
| 113 | + powershell.exe '.\build.ps1 -target' $TARGET |
| 114 | +else |
| 115 | + powershell.exe \ |
| 116 | + '$env:MONGO_X509_CLIENT_CERTIFICATE_PATH="'${MONGO_X509_CLIENT_CERTIFICATE_PATH}'";'\ |
| 117 | + '$env:MONGO_X509_CLIENT_CERTIFICATE_PASSWORD="'${MONGO_X509_CLIENT_CERTIFICATE_PASSWORD}'";'\ |
| 118 | + '.\build.ps1 -target' $TARGET |
| 119 | +fi |
0 commit comments