[Buildbot-devel] gerrit integration

Pierre Tardy tardyp at gmail.com
Tue Mar 31 12:51:38 UTC 2015

I'm not sure exactly what you are expecting.

git fetch sha1 will never work as git fetch can only fetch branches.

Normally what should happen is

git fetch refs/changes/<patchid>/<patchsetid>

You can see here how gerrit is integrated in buildbot_travis

buildbot_travis implement project + branch filtering, which makes it a
little bit more complicated, but you can see how the filter is configured,
and how gerrit step is configured.

Actually what it should *really* do is:
git fetch refs/changes/<patchid>/<patchsetid>
git merge FETCH_HEAD

git checkout only will not validate whether the patch is rebased on HEAD of
the branch.

Le mar. 31 mars 2015 à 14:39, Nicolas Bock <nicolasbock at gmail.com> a écrit :

> Hi,
> I can't seem to figure out how to integrate buildbot with gerrit. In
> master.cfg I have:
> c['change_source'].append(GerritChangeSource("host", "some_name"))
> c['schedulers'].append(AnyBranchScheduler(name="gerrit",
>   change_filter=GerritChangeFilter(eventtype="patchset-created"))
> factory.addStep(Gerrit(repourl="URL"))
> The build is triggered correctly, but the git command (from Gerrit())
> is not fetching the commit properly. It is doing a 'git reset --hard
> SHA1" instead of "git fetch SHA1; git checkout SHA1". Am I missing an
> argument to the Gerrit() constructor in the BuildFactory?
> Thanks already,
> nick
> ------------------------------------------------------------
> ------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20150331/e88ba47c/attachment.html>

More information about the devel mailing list