Commit 5246c96e authored by Christos Stavrakakis's avatar Christos Stavrakakis

ci: Allow multiple commands in snf-ci script

Allow snf-ci script to accept a comma seperated list of commands to run.
parent ca12aa38
......@@ -27,7 +27,7 @@ AVAILABLE_COMMANDS = [
RUN_BURNIN_CMD,
]
USAGE = """usage: %%prog [options] command
USAGE = """usage: %%prog [options] command[,command...]
command:
* %s: Create the slave server
......@@ -100,18 +100,22 @@ def main(): # Too many branches. pylint: disable-msg=R0912
print msg
return
command = args[0]
if command == ALL_CMDS:
commands = args[0]
if commands == ALL_CMDS:
for cmd in AVAILABLE_COMMANDS:
setattr(options, cmd, True)
elif command not in AVAILABLE_COMMANDS:
msg = "ERROR: Unknown command: %s" % command
parser.print_help()
print
print msg
return
else:
setattr(options, command, True)
commands = commands.split(",")
for command in commands:
if command not in AVAILABLE_COMMANDS:
msg = "ERROR: Unknown command: %s" % command
parser.print_help()
print
print msg
return
else:
setattr(options, command, True)
synnefo_ci = SynnefoCI(config_file=options.config_file,
build_id=options.build_id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment