Skip to content

Commit

Permalink
Update the run status codes to "S" and "F" #22
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Druez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Sep 23, 2020
1 parent e30654e commit b3149c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/scanpipe-tutorial-1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Step-by-step
The ``scanpipe show-pipeline`` command lists all the pipelines added to the
project and their planned runs.
You can use this to get a quick overview of the pipelines that have been running already
(with their success "V" or fail status "f") and those that will be running next.
(with their success "S" or fail status "F") and those that will be running next.

- Run the docker pipeline on this project::

Expand All @@ -59,7 +59,7 @@ Step-by-step
pipeline run::

$ scanpipe show-pipeline --project staticbox
"[V] scanpipe/pipelines/docker.py"
"[S] scanpipe/pipelines/docker.py"

- Get the results of the pipeline run as a JSON file using the ``output`` command::

Expand Down
7 changes: 2 additions & 5 deletions scanpipe/management/commands/show-pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
class Command(ProjectCommand):
help = "Show pipelines of a project."

def add_arguments(self, parser):
super().add_arguments(parser)

def handle(self, *args, **options):
super().handle(*args, **options)

Expand All @@ -39,7 +36,7 @@ def handle(self, *args, **options):
def get_run_status_code(self, run):
status = " "
if run.task_succeeded:
status = self.style.SUCCESS("V")
status = self.style.SUCCESS("S")
elif run.task_exitcode and run.task_exitcode > 0:
status = self.style.ERROR("E")
status = self.style.ERROR("F")
return status

0 comments on commit b3149c4

Please sign in to comment.