summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib/powercycle
diff options
context:
space:
mode:
authorRichard Samuels <richard.l.samuels@gmail.com>2021-05-18 15:51:40 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-21 19:00:20 +0000
commit9d4eba20a38dd354bcf21688cf7b1751c5b090b7 (patch)
treec615ea414c308cf8cc8e5329f90a5a20f00ed4e0 /buildscripts/resmokelib/powercycle
parent918e9697af1dd8e6ded16272d15afff80ad947fd (diff)
downloadmongo-9d4eba20a38dd354bcf21688cf7b1751c5b090b7.tar.gz
SERVER-56524 Update consumers of expansions.yml to use the copy in
${workdir}
Diffstat (limited to 'buildscripts/resmokelib/powercycle')
-rw-r--r--buildscripts/resmokelib/powercycle/powercycle_constants.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/buildscripts/resmokelib/powercycle/powercycle_constants.py b/buildscripts/resmokelib/powercycle/powercycle_constants.py
index e60ea274ebb..bd7d475fb6e 100644
--- a/buildscripts/resmokelib/powercycle/powercycle_constants.py
+++ b/buildscripts/resmokelib/powercycle/powercycle_constants.py
@@ -1,6 +1,14 @@
"""Powercycle constants."""
-EXPANSIONS_FILE = "expansions.yml"
+import os
+
+if 'CI' in os.environ:
+ # in CI, the expansions file is located in the ${workdir}, one dir up
+ # from src, the checkout directory
+ EXPANSIONS_FILE = "../expansions.yml"
+else:
+ # outside of CI (local replication), the file is expected in PWD
+ EXPANSIONS_FILE = "expansions.yml"
# For ssh disable the options GSSAPIAuthentication, CheckHostIP, StrictHostKeyChecking
# & UserKnownHostsFile, since these are local connections from one AWS instance to another.