Report batch notifications in CLI output
This commit is contained in:
@@ -378,6 +378,28 @@ func writeRunLogs(stderr io.Writer, result *app.BatchResult) {
|
||||
}
|
||||
_, _ = fmt.Fprintf(stderr, "report=%s status=succeeded output=%q%s\n", item.ReportID, item.OutputPath, notificationFields)
|
||||
}
|
||||
if result.Notification != nil {
|
||||
_, _ = fmt.Fprintf(stderr, "batchNotification status=%q", result.Notification.Status)
|
||||
if result.Notification.Reason != "" {
|
||||
_, _ = fmt.Fprintf(stderr, " reason=%q", result.Notification.Reason)
|
||||
}
|
||||
if result.Notification.RunID != "" {
|
||||
_, _ = fmt.Fprintf(stderr, " runId=%q", result.Notification.RunID)
|
||||
}
|
||||
if result.Notification.PipelineID != "" {
|
||||
_, _ = fmt.Fprintf(stderr, " pipelineId=%q", result.Notification.PipelineID)
|
||||
}
|
||||
if result.Notification.BundleID != "" {
|
||||
_, _ = fmt.Fprintf(stderr, " bundleId=%q", result.Notification.BundleID)
|
||||
}
|
||||
if result.Notification.Path != "" {
|
||||
_, _ = fmt.Fprintf(stderr, " path=%q", result.Notification.Path)
|
||||
}
|
||||
if result.Notification.Error != "" {
|
||||
_, _ = fmt.Fprintf(stderr, " error=%q", result.Notification.Error)
|
||||
}
|
||||
_, _ = fmt.Fprintln(stderr)
|
||||
}
|
||||
_, _ = fmt.Fprintf(stderr, "batch=%s total=%d succeeded=%d failed=%d\n", result.Batch, result.Total, result.Succeeded, result.Failed)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user