[users at bb.net] ForceScheduler trouble converting from 0.8.12 to 0.9.0
Pierre Tardy
tardyp at gmail.com
Mon Oct 17 15:05:36 UTC 2016
Hi Falk,
Unfortunatly, getChoices do not work anymore with buildbot nine.
The configuration fo the forceschedulers is now purely static.
There is a bug for that:
http://trac.buildbot.net/ticket/3351
I can see from another email on this list that you are interrested in
having a list of recently pushed tags.
I think this make sense, and buildbot_travis has some experimental
implementation for similar stuff.
I think the best option is for yout is to create a custom parameter which
would query the change api, and filter by category, and repository
for example this gives the list of pull requests of buildbot.
https://nine.buildbot.net/api/v2/changes?category=pull&project=buildbot/buildbot
There is no tag changes yet in this bot, as the github hook wasn't
configured to push tag events.
There is an example in the source code of a custom parameter.
https://github.com/buildbot/buildbot/tree/master/www/nestedexample
The use case is slightly more complex, but it should be easily simplifyable.
I understand however that this method is much more work thant the previous
getChoices method :-/
Pierre
Le lun. 17 oct. 2016 à 16:21, Tristram, Falk <falk.tristram at cognex.com> a
écrit :
Hi,
I am currently in the process to convert an existing master.cfg from 0.8.12
to 0.9.0.
The guide “Upgrading to Nine” helped.
Now I am stuck at the point where the ChoiceStringParameters don’t work as
before.
The corresponding selection forms on the website are empty.
I could track the problem down, that the function “getChoices” is not
called any longer.
I post some code that worked with 0.8.12:
class GitChoiceParameter(ChoiceStringParameter):
name = "gitchoice"
def __init__(self,
name,
label,
repository, **kwargs):
self.repository = repository
log.msg("Initialized GitChoiceParameter for %s %s" % (name, label))
ChoiceStringParameter.__init__(self, name=name, label=label,
**kwargs)
def getChoices(self, master, scheduler, buildername):
# This never gets called
log.msg("GitChoiceParameter getChoices %s " % self.label)
master.cfg:
# As from the docu
codebase = util.CodebaseParameter(“”, “Repo”,
branch=GitChoiceParameter(name=’branch’, label=’Branch:’, repository=’…’))
Once I add choices=[‘A’, ‘B’, ‘C’]
util.CodebaseParameter( …., repository=’…’, choices=[‘A’, ‘B’, ‘C’])
I can see ‘A’, ‘B’ and ‘C’ on the website.
BUT my getChoices function is still not called at all.
Best regards,
Falk
_______________________________________________
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/20161017/cd990702/attachment.html>
More information about the users
mailing list