[users at bb.net] Get previous step build result
Hugh Sorby
h.sorby at auckland.ac.nz
Thu Jul 14 10:10:32 UTC 2022
Thanks Roland for the pointer, I ended up with this
@defer.inlineCallbacks
def end_to_end_testing_succeeded(build_step):
build_id = build_step.build.buildid
master = build_step.build.master
build_steps = yield master.data.get(("builds", build_id, 'steps'))
for step in build_steps:
if step['name'] == 'Trigger End-to-End Testing':
return step['results'] == SUCCESS
return False
And applied it like this:
doStepIf=end_to_end_testing_succeeded,
Seems to work.
________________________________
From: users <users-bounces at buildbot.net> on behalf of Roland van Laar <roland at micite.net>
Sent: 14 July 2022 00:36
To: users at buildbot.net <users at buildbot.net>
Subject: Re: [users at bb.net] Get previous step build result
Caution - Forged External Domain!
This e-mail cannot be validated and may not have been sent by the sender shown in the 'From' field.
If you were not expecting to receive this e-mail we recommend you contact the sender to confirm that they sent it.
If you believe this email was legitimately sent, we suggest the sender notify their e-mail administrator that it has been received as a forged (fake) e-mail by the University of Auckland.
Please contact the Staff Service Centre on extension 86000 if you require further assistance.
On 12-07-2022 11:13, Hugh Sorby wrote:
I'm using Buildbot 3.5.0 and I would like to know if the previous step failed or succeeded.
I have tried to use the doStepIf method to figure out the previous steps status, but I haven't been able to make this work.
Is it possible to do this with 3.5.0?
Hey,
sorry can't give you a dry cut answer. I do have a few pointers for when we needed to fetch a previous build.
Have a look at: `getPreviousBuild` from:
https://github.com/buildbot/buildbot/blob/master/master/buildbot/reporters/utils.py<https://github.com/buildbot/buildbot/blob/master/master/buildbot/reporters/utils.py>
Over at scummvm we use a custom reporter which compares the current build to the last one on master branch.
Here is our vendorized `getPreviousBuild`:
https://github.com/scummvm/scummvm-sites/blob/director-buildbot/director/vendor/reporter_utils.py<https://github.com/scummvm/scummvm-sites/blob/director-buildbot/director/vendor/reporter_utils.py>
Note: we're on 2.8.4
Regards,
Roland
Many thanks for any suggestions/pointers.
_______________________________________________
users mailing list
users at buildbot.net<mailto:users at buildbot.net>
https://lists.buildbot.net/mailman/listinfo/users<https://lists.buildbot.net/mailman/listinfo/users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20220714/f91aab05/attachment.htm>
More information about the users
mailing list