[Buildbot-devel] doStepIf triggering off of scheduler

Rodney Stanton rodneys at broadon.com
Tue Aug 4 22:39:50 UTC 2009


Tommy,
    Thank you a thousand times.  
Side question,
     Waiting until isThisScheduler is called is what "hides" the call to 
self until the builder has starded?

Rodney
who really should remember to drink far more or far less coffee everyday.

Tommy Kudirka wrote:
> It's quite simple (fortunately). Put this in master.cfg somewhere before
> your buildsteps:
>
> def isThisScheduler(self):
>     if self.getProperty('scheduler') == 'YourSchedulerName':
>         return True
>     else:
>         return False
>
> And in your buildstep, set doStepIf = isThisScheduler
>
> doStepIf ends up getting called by a buildstep instance which has a
> getProperty method.
>
> Hope that helps,
> Tommy
>
> -----Original Message-----
> From: Rodney Stanton [mailto:rodneys at broadon.com] 
> Sent: Tuesday, August 04, 2009 5:09 PM
> To: buildbot-devel at lists.sourceforge.net
> Subject: [Buildbot-devel] doStepIf triggering off of scheduler
>
>
> The new doStepIf feature looks wonderful.  Ideally, I could execute a 
> step if the scheduler matched a certain string.  I am however very new 
> to Python/BuildBot and I cannot figure out how to extract scheduler for 
> the purposes of comparison.  While I can get WithProperties to work 
> within the context of the arguments of a shell command, I cannot 
> determine how to attain the properties and compare them for doStepIf.
>
> Any help appreciated and I apologize for this possibly being more of a 
> Python question than a BuildBot question.
>
> Thanks,
> Rodney
>
>
>
>   





More information about the devel mailing list