#2800: build is not triggered for new branches on gitlab
------------------------+-----------------------
Reporter: qsorix | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone: undecided
Version: 0.8.8 | Keywords:
------------------------+-----------------------
This may not be a bug on buildbot, perhaps the proper fix should be done
on gitlab.
I've noticed that when I create a new branch on gitlab, the notification
from web-hook does not include any commits, so no changes are generated
and hence no builds happen.
I've worked around the problem by modifying gitlab's hook. I've pasted the
code previously imported from github's hook -- this is bad, but I don't
know github's behaviour in this case -- and added some lines to fake a
change on new branches.
I'm reporting it, in case someone else finds it useful. Perhaps someone
will have enough time to create proper patch and integrate it.
{{{
elif re.match(r"^0*$", oldrev):
log.msg("Branch `%s' created, faking commit" % branch)
# new branch notifications has no commits, fake one to trigger
build
change = {
'author': user,
'files': [],
'comments': 'Branch %s created' % branch,
'revision': newrev,
'when_timestamp': datetime.datetime.utcnow(),
'branch': branch,
'revlink': '',
'repository': repo_url,
'project': project
}
changes.append(change)
}}}
--
Ticket URL: <http://trac.buildbot.net/ticket/2800>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits