Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
09ac9d1f
Commit
09ac9d1f
authored
Sep 04, 2013
by
Christos Stavrakakis
Browse files
ci: Allow multiple commands in snf-ci script
Allow snf-ci script to accept a comma seperated list of commands to run.
parent
85c669ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
ci/snf-ci
View file @
09ac9d1f
...
...
@@ -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
:
command
s
=
args
[
0
]
if
command
s
==
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment