Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What environment variables are passed to Jenkins when using the Gerrit Trigger Plugin?

I'm using the Gerrit Trigger Plugin to kick off Jenkins builds, but haven't found a good place where all of the environment variables are documented. Does such documentation exist?

like image 912
Alan Thompson Avatar asked May 16 '13 00:05

Alan Thompson


People also ask

How does Gerrit integrate with Jenkins?

Jenkins SetupCreate a new Multibranch Pipeline item. Select Branch Source of type Gerrit . Specify project repository URL, only http or https based protocol is supported at this point, copy the URL from project settings at Gerrit. Trigger Scan Multibranch Pipeline now either manually or by external trigger.


1 Answers

As a start, I had a Jenkins build shell script dump all environment variables with GERRIT in the name:

GERRIT_PATCHSET_UPLOADER=\"Alan Thompson\" <[email protected]>
GERRIT_PATCHSET_REVISION=eec3b0b65fcdf30872befa2e9ace06e96cd487b4
GERRIT_CHANGE_ID=Ieec3b0b65fcdf30872befa2e9ace06e96cd487b4
GERRIT_PATCHSET_NUMBER=1
[email protected]
GERRIT_CHANGE_NUMBER=8
GERRIT_CHANGE_OWNER=\"Alan Thompson\" <[email protected]>
GERRIT_REFSPEC=refs/changes/08/8/1
GERRIT_EVENT_TYPE=change-merged
GERRIT_EVENT_ACCOUNT=\"Alan Thompson\" <[email protected]>
GERRIT_CHANGE_SUBJECT=toast:  this is great with coffee
GERRIT_CHANGE_OWNER_NAME=Alan Thompson
GERRIT_PROJECT=kitchen
GERRIT_EVENT_HASH=-1357519550
GERRIT_BRANCH=master
[email protected]
[email protected]
GERRIT_CHANGE_URL=http://localhost/8
GERRIT_PATCHSET_UPLOADER_NAME=Alan Thompson
GERRIT_EVENT_ACCOUNT_NAME=Alan Thompson
like image 82
Alan Thompson Avatar answered Oct 04 '22 16:10

Alan Thompson