1

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?

maitza
  • 41
  • 1
  • 6

1 Answers1

1

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},
maitza
  • 41
  • 1
  • 6