|
| 1 | +#! /bin/bash |
| 2 | + |
| 3 | +cd ~/dev/node-mongodb-native |
| 4 | +export MONGODB_VERSION=latest |
| 5 | +export AUTH=auth |
| 6 | +# export MONGODB_BINARIES=$DRIVERS_TOOLS/mongodb/bin |
| 7 | +export MONGO_ORCHESTRATION_HOME=/Users/bailey.pearson/dev/drivers-evergreen-tools/.evergreen/orchestration |
| 8 | +# export PROJECT_ORCHESTRATION_HOME=$DRIVERS_TOOLS/.evergreen/orchestration |
| 9 | +# export REQUIRE_API_VERSION='1' |
| 10 | +# export MONGODB_API_VERSION='1' |
| 11 | +# export TOPOLOGY=replica_set |
| 12 | +export TOPOLOGY=sharded_cluster |
| 13 | +# export TOPOLOGY=server |
| 14 | +# export SSL=nossl |
| 15 | + |
| 16 | +# export ORCHESTRATION_FILE='auth-aws.json' |
| 17 | + |
| 18 | +export LOAD_BALANCER=true |
| 19 | + |
| 20 | +cd $DRIVERS_TOOLS |
| 21 | +rm -rf mongosh mongodb mo |
| 22 | +mkdir mo |
| 23 | +cd - |
| 24 | + |
| 25 | +rm expansions.sh 2>/dev/null |
| 26 | + |
| 27 | +bash $DRIVERS_TOOLS/.evergreen/run-orchestration.sh |
| 28 | + |
| 29 | +read -r -d '' SOURCE_SCRIPT <<EOM |
| 30 | +const fs = require('fs'); |
| 31 | +const file = fs.readFileSync('mo-expansion.yml', { encoding: 'utf-8' }) |
| 32 | + .trim().split('\\n'); |
| 33 | +const regex = /^(?<key>.*): "(?<value>.*)"$/; |
| 34 | +const variables = file.map( |
| 35 | + (line) => regex.exec(line.trim()).groups |
| 36 | +).map( |
| 37 | + ({key, value}) => \`export \${key}='\${value}'\` |
| 38 | +).join('\n'); |
| 39 | +
|
| 40 | +process.stdout.write(variables); |
| 41 | +process.stdout.write('\n'); |
| 42 | +EOM |
| 43 | + |
| 44 | +node --eval "$SOURCE_SCRIPT" | tee expansions.sh |
| 45 | +source expansions.sh |
| 46 | + |
| 47 | +bash ${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh start |
0 commit comments