summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib/powercycle/powercycle_constants.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/resmokelib/powercycle/powercycle_constants.py')
-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.