Skip to content

Commit 22986b1

Browse files
Pass env name also to release commands
1 parent 36095fd commit 22986b1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

night_rally.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,20 +210,22 @@ def command_line(self, track, challenge, car):
210210

211211

212212
class DockerCommand(BaseCommand):
213-
def __init__(self, effective_start_date, target_host, root_dir, distribution_version):
213+
def __init__(self, effective_start_date, target_host, root_dir, distribution_version, configuration_name):
214214
super().__init__(effective_start_date, target_host, root_dir)
215+
self.configuration_name = configuration_name
215216
self.pipeline = "docker"
216217
self.distribution_version = distribution_version.replace("Docker ", "")
217218

218219
def runnable(self, track, challenge, car):
219220
return car not in ["two_nodes", "verbose_iw"]
220221

221222
def command_line(self, track, challenge, car):
222-
cmd = "rally --target-host={7} --pipeline={6} --quiet --distribution-version={0} --effective-start-date \"{1}\" " \
223-
"--track={2} --challenge={3} --car={4} --report-format=csv --report-file={5} --cluster-health=yellow " \
223+
cmd = "rally --configuration-name={8} --target-host={7} --pipeline={6} --quiet --distribution-version={0} " \
224+
"--effective-start-date \"{1}\" --track={2} --challenge={3} --car={4} --report-format=csv --report-file={5} " \
225+
"--cluster-health=yellow " \
224226
"--client-options=\"basic_auth_user:'elastic',basic_auth_password:'changeme',timeout:60000,request_timeout:60000\"". \
225227
format(self.distribution_version, self.ts, track, challenge, car, self.report_path(track, challenge, car), self.pipeline,
226-
self.target_host)
228+
self.target_host, self.configuration_name)
227229
return cmd
228230

229231

@@ -579,9 +581,9 @@ def main():
579581
env_name = sanitize(args.release)
580582
configure_rally(env_name, args.dry_run)
581583
if args.release.startswith("Docker"):
582-
command = DockerCommand(args.effective_start_date, args.target_host, root_dir, args.release)
584+
command = DockerCommand(args.effective_start_date, args.target_host, root_dir, args.release, env_name)
583585
else:
584-
command = ReleaseCommand(args.effective_start_date, args.target_host, root_dir, args.release)
586+
command = ReleaseCommand(args.effective_start_date, args.target_host, root_dir, args.release, env_name)
585587
elif adhoc_mode:
586588
env_name = sanitize(args.release)
587589
command = AdHocCommand(args.revision, args.effective_start_date, args.target_host, root_dir, env_name, args.override_src_dir)

0 commit comments

Comments
 (0)