[Buildbot-devel] doStepIf triggering off of scheduler

Tommy Kudirka tommy at tornadostudios.com
Tue Aug 4 22:25:08 UTC 2009


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