[Buildbot-devel] Skip step on a branch

Dmitry Nezhevenko dion at dion.org.ua
Tue Aug 23 06:23:27 UTC 2011


On Mon, Aug 22, 2011 at 10:54:04PM -0700, Ian Zimmerman wrote:
> 
> Is there any nice way of deciding whether do perform a particular step
> depending on the source branch?  The doStepIf parameter can be a
> function but that function is only passed the step itself as an
> argument, i.e. a config-time entity.  How can I make the function
> sensitive to run-time environment/properties?

You can access "build" object so it's possible to get access to all build
properties (that are visible in WebStatus):

def checkSCMChanges(step):
        if NoChanges in step.build.getProperties():
                return not step.build.getProperty(NoChanges) in ["1", "True"]
        return True

-- 
WBR, Dmitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://buildbot.net/pipermail/devel/attachments/20110823/7e781987/attachment.bin>


More information about the devel mailing list