[users at bb.net] NestedParameter retrieval
Pierre Tardy
tardyp at gmail.com
Wed Nov 23 12:04:41 UTC 2016
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 <riccardo.corsi at kairos3d.it> 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
> users at buildbot.net
> https://lists.buildbot.net/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20161123/8fb6cb4c/attachment.html>
More information about the users
mailing list