[users at bb.net] Polling git for tags only fires once

Wayne Keenan wayne at thebubbleworks.com
Sat Nov 25 10:45:41 UTC 2017


Hi,

I would like to trigger a build on all commits to a master and if a tag is
added I want to trigger a different builder for release, does anyone got an
example please?

I have the master working but I'm having trouble triggering a builder on
tag commit working.

I'm adding a tag using:

git tag -a RELEASE_%s -m 'Release version %s
git push --tags


The config below will sometimes trigger, but its not consistent, to poke it
I have tried `buildbot reconfig` restarting and changing the `workdir` to
see if its cache related, but no joy.

Config snippet (*these are the only gitpoller and scheduler in the config*):

c['change_source'].append(changes.GitPoller(MY_REPO,
                                            workdir='bleson-tags-workdir5',
                                            pollinterval=5
                                            only_tags=True,
                                            #branches=True,
                                            #buildPushesWithNoCommits=True,
                                            #project="python-bleson",
                                            #category="tagged_commit",
                                            #branch='master',
                                            ))


# output confirmation in the master's log the that a change filter was
called by the scheduler, i.e the gitpoller fired an event

def my_branch_func(branch):
    log.msg('*' * 1000)
    log.msg(repr(branch))
    return True

my_change_filter = util.ChangeFilter(branch_fn=my_branch_func,
                                     #branch_re=re.compile('.*', re.I)
#^RELEASE_.*
                                     )


c['schedulers'].append(schedulers.SingleBranchScheduler(name='tags',
                                                        change_filter=
my_change_filter,

treeStableTimer=None,

builderNames=['runtests_linux']))


Environment:

Buildbot version: 0.9.13
Twisted version: 17.9.0

Linux cam1 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux

Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170124] on linux

Running in a virtual env

Thanks,
Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20171125/7bdd1262/attachment.html>


More information about the users mailing list