summaryrefslogtreecommitdiff
path: root/zuul/driver/mqtt/mqttreporter.py
diff options
context:
space:
mode:
Diffstat (limited to 'zuul/driver/mqtt/mqttreporter.py')
-rw-r--r--zuul/driver/mqtt/mqttreporter.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/zuul/driver/mqtt/mqttreporter.py b/zuul/driver/mqtt/mqttreporter.py
index 3ef2be58e..74b597fea 100644
--- a/zuul/driver/mqtt/mqttreporter.py
+++ b/zuul/driver/mqtt/mqttreporter.py
@@ -48,7 +48,8 @@ class MQTTReporter(BaseReporter):
'buildset': {
'uuid': item.current_build_set.uuid,
'result': item.current_build_set.result,
- 'builds': []
+ 'builds': [],
+ 'retry_builds': [],
},
'zuul_event_id': item.event.zuul_event_id,
}
@@ -70,6 +71,24 @@ class MQTTReporter(BaseReporter):
'result': result,
'dependencies': [j.name for j in job.dependencies],
})
+ # Report build data of retried builds if available
+ retry_builds = item.current_build_set.getRetryBuildsForJob(
+ job.name)
+ for build in retry_builds:
+ (result, url) = item.formatJobResult(job, build)
+ retry_build_information = {
+ 'job_name': job.name,
+ 'voting': job.voting,
+ 'uuid': build.uuid,
+ 'start_time': build.start_time,
+ 'end_time': build.end_time,
+ 'execute_time': build.execute_time,
+ 'log_url': url,
+ 'result': result,
+ }
+ message['buildset']['retry_builds'].append(
+ retry_build_information)
+
message['buildset']['builds'].append(job_informations)
topic = None
try: