[users at bb.net] Interpolating arguments to steps.Trigger?
Dan Kegel
dank at kegel.com
Wed Aug 8 20:01:45 UTC 2018
Hi all,
I'm trying to use a generic factory that looks up which builders to
trigger next from a property (which in turn is set from a custom data
member in the current builder), but evidently I'm getting too fancy
and/or am confused.
@util.renderer
def getTriggerList(props):
buildername = props.getProperty('buildername')
for builder in c['builders']:
if buildername == builder.name:
return builder.users
return []
...
f.addStep(steps.Trigger(
schedulerNames=getTriggerList,
waitForFinish=False,
alwaysUseLatest=True,
#set_properties={"triggered_by" :
util.Interpolate('%(prop:buildername)s')}
)
)
First off, that fails checkconfig:
File "master.cfg", line 246, in makeFactory
alwaysUseLatest=True,
File "...python3.6/site-packages/buildbot/steps/trigger.py", line
73, in __init__
if not set(schedulerNames).issuperset(set(unimportantSchedulerNames)):
builtins.TypeError: '_Renderer' object is not iterable
so I guess deferring the list of schedulers is not allowed :-(
Second off, if I uncomment the Interpolate, that fails as well with
File "master.cfg", line 249, in makeFactory
set_properties={"triggered_by" : util.Interpolate('%(prop:buildername)s')}
File ".../python3.6/site-packages/buildbot/steps/trigger.py", line
73, in __init__
if not set(schedulerNames).issuperset(set(unimportantSchedulerNames)):
builtins.TypeError: '_Renderer' object is not iterable
I guess I can work around this by having zillions of factories, each with
a different last step, instead of one shared factory.
Or am I confused? Is there a way to do this?
Thanks,
Dan
More information about the users
mailing list