Show status of currently running build in fly jobs
@@ -30,7 +30,7 @@ func (command *JobsCommand) Execute([]string) error {
var jobs []atc.Job
jobs, err = target.Team().ListJobs(pipelineName)
- headers = []string{"name", "paused", "status"}
+ headers = []string{"name", "paused", "status", "current"}
if err != nil {
return err
}
@@ -78,6 +78,18 @@ func (command *JobsCommand) Execute([]string) error {
}
row = append(row, statusColumn)
+ var currentColumn ui.TableCell
+ if p.NextBuild != nil {
+ currentColumn.Contents = p.NextBuild.Status
+ switch p.NextBuild.Status {
+ case "pending:":
+ currentColumn.Color = ui.PendingColor
+ case "started":
+ currentColumn.Color = ui.StartedColor
+ }
+ row = append(row, currentColumn)
+ }
+
table.Data = append(table.Data, row)
}
