<div dir="ltr"><div dir="auto">Hi kipade,</div><div dir="auto"><br></div><div>First, here is an example which can be found <a href="https://lists.buildbot.net/pipermail/devel/2014-August/010857.html">here</a>. <a href="https://stackoverflow.com/questions/26428062/buildbot-master-cfg-conditional-depending-on-property">Here</a> is an another example.</div><div dir="auto"><br></div><div dir="auto">Now, for the doStepIf, you should set it to a function that returns a boolean value (e.g., True or False). This function will only take one parameter which is the "step" object itself.</div><div dir="auto"><br></div><div>Now, for the conditions you want:</div><div>1) it's dependent repo source changed<br>2) it's corresponding scheduler is "Force"<br></div><div>I suggest 2 separate buildsteps each with a doStepIf parameter. And it sounds like you would have to separate build factories:</div><div>1 - For the dependent repo change</div><div>1 - For the "Force" scheduler</div><div><br></div><div>Then, you would create 1 function for each buildstep (for example: checkIfBuildOne and checkIfBuildTwo).</div><div><br></div><div>I hope this helps.</div><div><br></div><div>Regards,</div><div><br></div><div>Alvaro</div><div><br><div class="gmail_quote"><div>On Sat, Aug 5, 2017 at 8:42 PM kipade <<a href="mailto:kipade@163.com" target="_blank">kipade@163.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
Thanks for your reply.<br>
<br>
And I have a nother issue, I want to use doStepIf for a step, but
puzzled<br>
doStepIf is a bool property of a step, now I want to control it by
following conditions:<br>
1) it's dependent repo source changed<br>
2) it's corresponding scheduler is "Force"<br>
What should I passed to doStepIf parameter?<br>
If I passed it a function like checkIfBuild:<br>
1) how should I define such a function?<br>
2) what parameters should I pass to this function<br>
<br>
btw, Im newbie for python, and started buildbot the day before
yesterday<span class="gmail-m_3890621782962578702m_-2218303963579521155moz-smiley-s3"><span>;-)</span></span><br>
thanks all</div><div bgcolor="#FFFFFF"><br>
<br>
<div class="gmail-m_3890621782962578702m_-2218303963579521155moz-cite-prefix">在 2017/8/6 上午10:07, Alvaro Erickson 写道:<br>
</div>
<blockquote type="cite">
<div>Hi kipade,
<div><br>
</div>
<div>Yes, you use codebases (i.e., a codebase generator) for
multiple codebases. Now, if you want to look for a specific
branch during your checkout step, you need to set the "branch"
property for the git poller you are using. If you are using
one.</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Alvaro</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sat, Aug 5, 2017 at 3:17 AM, kipade
<span><<a href="mailto:kipade@163.com" target="_blank">kipade@163.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks
Alvaro, I can download multiple git repos from the server
use<br>
codebases now. but I found the branch property take no sense
for<br>
codebases, right?<br>
I have to set branch parameter for source steps.<br>
<br>
Regards,<br>
kipade<br>
<div class="gmail-m_3890621782962578702m_-2218303963579521155HOEnZb">
<div class="gmail-m_3890621782962578702m_-2218303963579521155h5"><br>
<br>
On Fri, 04 Aug 2017 15:36:47 +0000<br>
Alvaro Erickson <<a href="mailto:alvaro.erickson@gmail.com" target="_blank">alvaro.erickson@gmail.com</a>>
wrote:<br>
<br>
> Greetings,<br>
><br>
> Do you have more details around your issue? For
example, have you created a<br>
> change source for each repo (e.g., for GitHub a
change hook:<br>
> <a href="http://docs.buildbot.net/current/manual/cfg-wwwhooks.html#chsrc-GitHub" rel="noreferrer" target="_blank">http://docs.buildbot.net/<wbr>current/manual/cfg-wwwhooks.<wbr>html#chsrc-GitHub</a>)?<br>
><br>
> Also, for source checkout for each repo, it is best
to have a separate<br>
> source checkout step for each one. For example, for
Git, using the<br>
> following source checkout:<br>
><br>
> <a href="http://docs.buildbot.net/current/manual/cfg-buildsteps.html#git" rel="noreferrer" target="_blank">http://docs.buildbot.net/<wbr>current/manual/cfg-buildsteps.<wbr>html#git</a><br>
><br>
> Regards,<br>
><br>
> Alvaro<br>
><br>
><br>
> On Fri, Aug 4, 2017 at 5:06 AM kipade <<a href="mailto:kipade@163.com" target="_blank">kipade@163.com</a>>
wrote:<br>
><br>
> > My build project have sevral code repos. I use
factory.addStep to add<br>
> > multiple repo downloading.<br>
> ><br>
> > But, I found only the last one was saved, all
previous code repo were gone.<br>
> ><br>
> > How should I download multiple code repos?<br>
> ><br>
> > Regards,<br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > users mailing list<br>
> > <a href="mailto:users@buildbot.net" target="_blank">users@buildbot.net</a><br>
> > <a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/<wbr>mailman/listinfo/users</a><br>
> ><br>
<br>
<br>
</div>
</div>
<span class="gmail-m_3890621782962578702m_-2218303963579521155HOEnZb"><font color="#888888">--<br>
kipade <<a href="mailto:kipade@163.com" target="_blank">kipade@163.com</a>><br>
<br>
</font></span></blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></blockquote></div></div></div>