How to take and assign value from force scheduler in buildbot

299 Views Asked by At

I need to take value (publish) from force scheduler (true/false), to be specified from checkbox and pass it to variable - to check if its true|false and the proceed proper step, then run build step.

properties=[
        util.NestedParameter(name="options", label="Build Options", layout="vertical", fields=[
            util.BooleanParameter(name="publish",
                                  label="Publish",
                                  default=False)
        ])

So I tried to do it with Interpolate:

util.Interpolate('%(prop:options)s')

Gettings {'publish': False} - but only in steps - how can I pass it to variable?

1

There are 1 best solutions below

0
maitza On

I figured it out. I used doStepIf.. and step.getProperty..

steps.ShellCommand(
    name='Change to TRUE publish',
    doStepIf=lambda step: step.getProperty('options') == {'publish': True},