Hi Ricardo,

You can see in the properties tab from the build what the properties are
looking like.
In your example, the nested parameters are compiled into a dictionnary.

so you should write:


buildFactory.addStep(steps.Git(
      doStepIf = lambda step: step.build.getProperty('options',
{}).get('example', False))

Regards,
Pierre

Le mer. 23 nov. 2016 à 12:50, Riccardo Corsi <[email protected]> a
écrit :

> Hi all,
>
> when I use a ForceScheduler with a simple parameter like:
>
> schedulersList.append(schedulers.ForceScheduler(
>    # custom build properties
>    properties=[
>          util.BooleanParameter(name="examples",
>                               label="build examples", default=False)
>    ]
> )
>
> I retrieve the corresponding param in my build steps with:
>
> buildFactory.addStep(steps.Git(
>       doStepIf = lambda step: step.build.getProperty('examples')
>
>
>
> What am I supposed to do when I use NestedParameter to group some
> properties together?
> I don't know how to retrieve them in the corresponding build steps.
> For instance, how do I access the "examples" boolean property given the
> following form?
> Thank you,
> Riccardo
>
> schedulersList.append(schedulers.ForceScheduler(
>    # custom build properties
>    properties=[
>       # group build parameters together
>       util.NestedParameter(name="options", label="Build Options",
> layout="vertical", fields=[
>
>          util.BooleanParameter(name="examples",
>                               label="build examples", default=False),
>       ])
>    ]
> )
> _______________________________________________
> users mailing list
> [email protected]
> https://lists.buildbot.net/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
https://lists.buildbot.net/mailman/listinfo/users

Reply via email to