diff options
author | Felix Edel <felix.edel@bmw.de> | 2022-12-07 12:24:57 +0100 |
---|---|---|
committer | Felix Edel <felix.edel@bmw.de> | 2023-01-02 10:07:26 +0100 |
commit | f9786ac2a85f03a871d18bfe19283a1272b17fc7 (patch) | |
tree | 2dbe9b0bea744c87196d43be6842f99ccd885ded /zuul/driver/mqtt | |
parent | 532c30469ffc1a1b35d812455fa8271b392915cd (diff) | |
download | zuul-f9786ac2a85f03a871d18bfe19283a1272b17fc7.tar.gz |
Store pause and resume events on the build and report them
When a build is paused or resumed, we now store this information on the
build together with the event time. Instead of additional attributes for
each timestamp, we add an "event" list attribute to the build which can
also be used for other events in the future.
The events are stored in the SQL database and added to the MQTT payload
so the information can be used by the zuul-web UI (e.g. in the "build
times" gantt chart) or provided to external services.
Change-Id: I789b4f69faf96e3b8fd090a2e389df3bb9efd602
Diffstat (limited to 'zuul/driver/mqtt')
-rw-r--r-- | zuul/driver/mqtt/mqttreporter.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zuul/driver/mqtt/mqttreporter.py b/zuul/driver/mqtt/mqttreporter.py index 5c95a19ea..8c3905e35 100644 --- a/zuul/driver/mqtt/mqttreporter.py +++ b/zuul/driver/mqtt/mqttreporter.py @@ -79,7 +79,8 @@ class MQTTReporter(BaseReporter): 'result': result, 'dependencies': [j.name for j in job.dependencies], 'artifacts': get_artifacts_from_result_data( - build.result_data, logger=log) + build.result_data, logger=log), + 'events': [e.toDict() for e in build.events], }) if include_returned_data: rdata = build.result_data.copy() |