Skip to content

Commit 8c92163

Browse files
authored
PHPLIB-1410: Invoke drivers-evergreen-tools scripts with bash (mongodb#1267)
This also applies bash to PHPLIB's scripts since it makes no difference.
1 parent f1cbc70 commit 8c92163

File tree

5 files changed

+26
-15
lines changed

5 files changed

+26
-15
lines changed

.evergreen/compile-extension.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -o errexit # Exit the script with error if any of the commands fail
33

44
PATH="$PHP_PATH/bin:$PATH"

.evergreen/config/functions.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,17 @@ functions:
141141
params:
142142
script: |
143143
${PREPARE_SHELL}
144-
SKIP_CRYPT_SHARED=${SKIP_CRYPT_SHARED} SKIP_LEGACY_SHELL=true MONGODB_VERSION=${MONGODB_VERSION} ORCHESTRATION_FILE=${ORCHESTRATION_FILE} TOPOLOGY=${TOPOLOGY} AUTH=${AUTH} SSL=${SSL} STORAGE_ENGINE=${STORAGE_ENGINE} LOAD_BALANCER=${LOAD_BALANCER} REQUIRE_API_VERSION=${REQUIRE_API_VERSION} ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
144+
SKIP_CRYPT_SHARED=${SKIP_CRYPT_SHARED} \
145+
SKIP_LEGACY_SHELL=true \
146+
MONGODB_VERSION=${MONGODB_VERSION} \
147+
ORCHESTRATION_FILE=${ORCHESTRATION_FILE} \
148+
TOPOLOGY=${TOPOLOGY} \
149+
AUTH=${AUTH} \
150+
SSL=${SSL} \
151+
STORAGE_ENGINE=${STORAGE_ENGINE} \
152+
LOAD_BALANCER=${LOAD_BALANCER} \
153+
REQUIRE_API_VERSION=${REQUIRE_API_VERSION} \
154+
bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
145155
# run-orchestration generates expansion file with MONGODB_URI and CRYPT_SHARED_LIB_PATH
146156
- command: expansions.update
147157
params:
@@ -152,7 +162,7 @@ functions:
152162
params:
153163
script: |
154164
${PREPARE_SHELL}
155-
${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
165+
bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
156166
157167
"bootstrap mongohoused":
158168
- command: shell.exec
@@ -161,14 +171,14 @@ functions:
161171
cd ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake
162172
163173
DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
164-
./pull-mongohouse-image.sh
174+
bash ./pull-mongohouse-image.sh
165175
- command: shell.exec
166176
params:
167177
script: |
168178
cd ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake
169179
170180
DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
171-
./run-mongohouse-image.sh
181+
bash ./run-mongohouse-image.sh
172182
173183
"create serverless instance":
174184
- command: subprocess.exec
@@ -235,7 +245,7 @@ functions:
235245
PHP_VERSION=${PHP_VERSION} \
236246
SSL=${SSL} \
237247
TESTS=${TESTS} \
238-
${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
248+
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
239249
240250
"run atlas data lake test":
241251
- command: shell.exec
@@ -248,7 +258,7 @@ functions:
248258
249259
MONGODB_URI="mongodb://mhuser:[email protected]:27017" \
250260
TESTS="atlas-data-lake" \
251-
${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
261+
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
252262
253263
"run serverless tests":
254264
- command: shell.exec
@@ -284,7 +294,7 @@ functions:
284294
CRYPT_SHARED_LIB_PATH=${CRYPT_SHARED_LIB_PATH} \
285295
MONGODB_URI="${SERVERLESS_URI}" \
286296
TESTS="serverless" \
287-
${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
297+
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
288298
289299
"cleanup":
290300
- command: shell.exec
@@ -310,7 +320,7 @@ functions:
310320
${PREPARE_SHELL}
311321
file="${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh"
312322
# Don't use ${file} syntax here because evergreen treats it as an empty expansion.
313-
[ -f "$file" ] && sh $file || echo "$file not available, skipping"
323+
[ -f "$file" ] && bash $file || echo "$file not available, skipping"
314324
315325
"install composer":
316326
- command: shell.exec
@@ -321,13 +331,14 @@ functions:
321331
${PREPARE_SHELL}
322332
file="${PROJECT_DIRECTORY}/.evergreen/install-composer.sh"
323333
# Don't use ${file} syntax here because evergreen treats it as an empty expansion.
324-
[ -f "$file" ] && DEPENDENCIES=${DEPENDENCIES} sh $file || echo "$file not available, skipping"
334+
[ -f "$file" ] && DEPENDENCIES=${DEPENDENCIES} bash $file || echo "$file not available, skipping"
325335
326336
"start load balancer":
327337
- command: shell.exec
328338
params:
329339
script: |
330-
MONGODB_URI="${MONGODB_URI}" ${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh start
340+
MONGODB_URI="${MONGODB_URI}" \
341+
bash ${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh start
331342
- command: expansions.update
332343
params:
333344
file: lb-expansion.yml
@@ -338,7 +349,7 @@ functions:
338349
script: |
339350
# Only run if a load balancer was started
340351
if [ -n "${SINGLE_MONGOS_LB_URI}" ]; then
341-
${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh stop
352+
bash ${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh stop
342353
fi
343354
344355
"start kms servers":

.evergreen/install-composer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -o errexit # Exit the script with error if any of the commands fail
33

44
# Supported environment variables

.evergreen/install-dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -o errexit # Exit the script with error if any of the commands fail
33

44
# Functions to fetch MongoDB binaries

.evergreen/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
set -o errexit # Exit the script with error if any of the commands fail
33

44
# Supported environment variables

0 commit comments

Comments
 (0)