summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rwxr-xr-xicktool7
2 files changed, 8 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index bcfe459..5e40907 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,9 @@ Version 0.22+git, not yet released
* The `name` field in pipeline resources is now called `pipeline`.
+* `icktool status` output now has a new column to indicate latest
+ build status.
+
Version 0.22, released 2018-01-15
----------------------------------
diff --git a/icktool b/icktool
index 494c85c..3ad8c60 100755
--- a/icktool
+++ b/icktool
@@ -134,6 +134,7 @@ class Icktool(cliapp.Application):
build = {
'build_id': 'never',
'log': 'none',
+ 'status': 'n/a',
}
status = self._get_pipeline_status(
project['project'], pipeline)
@@ -142,10 +143,12 @@ class Icktool(cliapp.Application):
'pipeline': pipeline,
'build_id': build['build_id'],
'status': status['status'],
+ 'build_status': build['status'],
'log': build['log'],
}
rows.append(row)
- self._pretty_table(rows, ['project', 'pipeline', 'status', 'log'])
+ self._pretty_table(
+ rows, ['project', 'pipeline', 'status', 'build_status', 'log'])
def _get_projects(self):
rc = self._new_rc('/projects', 'project')
@@ -376,7 +379,7 @@ class Icktool(cliapp.Application):
for row in [headings] + rows:
for column in columns:
- widths[column] = max(widths[column], len(row[column]))
+ widths[column] = max(widths[column], len(str(row[column])))
underlines = {
column: '-' * widths[column]