@@ -283,29 +283,25 @@ def get_run_full_filename(
283
283
return benchmark_output_filename
284
284
285
285
286
- def fetchRemoteSetupFromConfig (remote_setup_config ):
287
- branch = "master"
288
- repo = None
289
- path = None
286
+ def fetchRemoteSetupFromConfig (remote_setup_config , repo = "https://github.com/RedisLabsModules/testing-infrastructure.git" ,branch = "master" ):
287
+ type = None
288
+ setup = None
290
289
for remote_setup_property in remote_setup_config :
291
- if "repo" in remote_setup_property :
292
- repo = remote_setup_property ["repo" ]
293
- if "branch" in remote_setup_property :
294
- branch = remote_setup_property ["branch" ]
295
- if "path" in remote_setup_property :
296
- path = remote_setup_property ["path" ]
290
+ if "type" in remote_setup_property :
291
+ type = remote_setup_property ["type" ]
292
+ if "setup" in remote_setup_property :
293
+ setup = remote_setup_property ["setup" ]
297
294
# fetch terraform folder
295
+ path = "/terraform/{}-{}" .format (type ,setup )
298
296
temporary_dir = tempfile .mkdtemp ()
299
297
logging .info (
300
298
"Fetching infrastructure definition from git repo {}/{} (branch={})" .format (
301
299
repo , path , branch
302
300
)
303
301
)
304
302
git .Repo .clone_from (repo , temporary_dir , branch = branch , depth = 1 )
305
- terraform_working_dir = temporary_dir
306
- if path is not None :
307
- terraform_working_dir += path
308
- return terraform_working_dir
303
+ terraform_working_dir = temporary_dir + path
304
+ return terraform_working_dir , type
309
305
310
306
311
307
def pushDataToRedisTimeSeries (rts : Client , branch_time_series_dict : dict ):
0 commit comments