[devel at bb.net] Accessing step result in the factory
Pierre Tardy
tardyp at gmail.com
Wed Jul 11 09:01:24 UTC 2018
Hi Aakash,
The BuildFactories cannot be dynamic like you say, because they are run at
the begining of the build.
You can use doStepIf in order to do that, or you can also use a customStep,
with dynamicSteps.
You have an example in the doc:
http://docs.buildbot.net/latest/manual/cfg-buildfactories.html#dynamic-build-factories
Regards
Pierre
On Wed, Jul 11, 2018 at 2:25 AM Aakash Jain <aj355 at cornell.edu> wrote:
> Hello,
>
> Is it possible to access the result/status of a step inside the factory
> which executed that step?
>
> For e.g.: I want to add step-2 only if step-1 failed, then I want to write
> some logic to analyze results of step-1 and step-2, and decide whether to
> run step-3 or not, and so on.
>
> I understand I can use doStepIf inside step-2 and step-3. But it would be
> easier if I can have this information in factory, and the factory will use
> addStep appropriately.
>
> To give an example, I want to run some tests on a patch, but these tests
> are flaky. So, I have a try builder which:
> 1) Apply the patch
> 2) Execute a step which run these flaky tests
> 3) If the tests have any failure, add another step to re-run the tests
> 4) Analyze the failures from both the run
> 5) If applicable run another step to un-apply the patch
> 6) Run the tests again
> 7) Analyze the results and decide whether the patch introduce new test
> failures
>
> Adding doStepIf in each of the steps might not be the cleanest approach.
> If the step results/status can be accessed in the factory, then the factory
> can easily decide whether to do addStep() for next step or not. Also the
> factory could easily analyze the results from multiple steps (multiple
> test-runs).
>
> So, is it is possible to access a step status and results in the factory
> which executes that step. If not, is using 'doStepIf inside every step' the
> recommended solution?
>
> Thanks
>
> Aakash
>
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/devel/attachments/20180711/334a5ef0/attachment.html>
More information about the devel
mailing list