Skip to content

Commit

Permalink
Extend logging of report uploads (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
tt-marcel committed Feb 29, 2024
1 parent cfb0b48 commit 4d89da0
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,19 +214,27 @@ class UploadReportsStep extends Step {
reportIds = apiClient.getAllReportIds()
}

String status = 'successful'
Integer cntReports = reportIds.size()
Integer cntStable = 0

reportIds.each { reportId ->
listener.logger.println("- Uploading ATX report for report id ${reportId}...")

UploadResult uploadResult = apiClient.uploadReport(reportId, uploadOrder)
if (uploadResult.reportLink == null || uploadResult.reportLink.isEmpty()) {
status = 'unstable. Please check pipeline and test.guide configuration.'
if (uploadResult.reportLink != null && !uploadResult.reportLink.isEmpty()) {
cntStable += 1
listener.logger.println(" -> Successful")
} else {
listener.logger.println(" -> Error! Please check your pipeline or test.guide configuration.")
}
result.add(uploadResult)
}

listener.logger.println("Report upload ${status}")
if ( cntReports == cntStable) {
listener.logger.println("Report upload(s) successful")
} else {
listener.logger.println("Report upload(s) unstable. Please see the logging of the uploads.")
}

return result
}
Expand Down

0 comments on commit 4d89da0

Please sign in to comment.