Gerrit build with a default REFSPEC value?

24 views
Skip to first unread message

John Mellor

unread,
Oct 21, 2015, 9:12:32 AM10/21/15
to jenkins...@googlegroups.com

I have a couple of prototype Gerrit integration builds up and running, with some issues.  All of the builds are freestyle projects, in case that matters.

 

One of the issues is that I do not seem to be able to kick off a build manually because of the way that the sourcecode management has to be configured.  I have to use a repo Refspec of $GERRIT_REFSPEC, which is not valid unless the build is triggered by the Gerrit plugin.

 

For a build-now pushbutton build or a dependent build, how can I set this value to some default that can be overloaded when triggered by Gerrit?

mpapo - Michael Pailloncy

unread,
Oct 22, 2015, 5:30:31 AM10/22/15
to Jenkins Users, John....@esentire.com
Hi,

I think you can add "GERRIT_REFSPEC" parameter to this job (and all others needed parameters by your job) with a default value and it'll be overridden when triggered by a Gerrit event.
But the GERRIT_REFSPEC parameter, and some others Gerrit's parameters will change on each changeset. Not sure that you really want this behaviour.

If your usecase is to rebuild a previous build, you can use the "Retrigger" button on the build page. 

Michaël
Reply all
Reply to author
Forward
0 new messages