<div dir="ltr">Hi Aakash,<div><br></div><div>The BuildFactories cannot be dynamic like you say, because they are run at the begining of the build.</div><div><br></div><div>You can use doStepIf in order to do that, or you can also use a customStep, with dynamicSteps.</div><div>You have an example in the doc:</div><div><a href="http://docs.buildbot.net/latest/manual/cfg-buildfactories.html#dynamic-build-factories">http://docs.buildbot.net/latest/manual/cfg-buildfactories.html#dynamic-build-factories</a><br></div><div><br></div><div>Regards</div><div>Pierre</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 11, 2018 at 2:25 AM Aakash Jain <<a href="mailto:aj355@cornell.edu">aj355@cornell.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<br><br>Is it possible to access the result/status of a step inside the factory which executed that step? <br><br>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. <br><br>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.<br><br>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:<br>1) Apply the patch<br>2) Execute a step which run these flaky tests<br>3) If the tests have any failure, add another step to re-run the tests<br>4) Analyze the failures from both the run<br>5) If applicable run another step to un-apply the patch<br>6) Run the tests again<br>7) Analyze the results and decide whether the patch introduce new test failures<br><br>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).<br><br>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?<br><br>Thanks</div><div dir="ltr"><br>Aakash<br></div></blockquote></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p dir="ltr"><br></p>
</div></div>