Trigger the build on Gerrit events.
The triggered build will be provided with the following parameters:
-
For all events
- GERRIT_PROJECT: The name of the project.
- GERRIT_EVENT_HASH: A unique hash making all triggered builds unique in the queue.
- GERRIT_EVENT_ACCOUNT: The name and email of the account associated with the event, if any.
"Name" <name@somewhere.com>.
- GERRIT_EVENT_ACCOUNT_NAME: The name of the account associated with the event, if any.
- GERRIT_EVENT_ACCOUNT_EMAIL: The email of the account associated with the event, if any.
-
For events on a change (Patch set created, Draft published, Change merged, Comment added)
- GERRIT_CHANGE_ID: The Change-Id.
- GERRIT_CHANGE_SUBJECT: The first line of the commit message.
- GERRIT_CHANGE_NUMBER: The change number.
- GERRIT_CHANGE_URL: The URL to the change.
- GERRIT_PATCHSET_NUMBER: The Patch Set number.
- GERRIT_PATCHSET_REVISION: The Patch Set revision id.
- GERRIT_BRANCH: The name of the branch.
- GERRIT_REFSPEC: The ref-spec. (refs/changes/xx/xxxx/z).
- GERRIT_CHANGE_OWNER: The name and email of the owner of the change
"Name" <name@somewhere.com>.
- GERRIT_CHANGE_OWNER_NAME: The name of the owner of the change.
- GERRIT_CHANGE_OWNER_EMAIL: The email of the owner of the change.
- GERRIT_PATCHSET_UPLOADER: The name and email of the uploader of the Patch Set
"Name" <name@somewhere.com>.
- GERRIT_PATCHSET_UPLOADER_NAME: The name of the uploader of the Patch Set.
- GERRIT_PATCHSET_UPLOADER_EMAIL: The email of the uploader of the Patch Set.
-
For Reference updated events
- GERRIT_REFNAME: Ref name within project.
- GERRIT_OLDREV: The old value of the ref, prior to the update.
- GERRIT_NEWREV: The new value the ref was updated to.
The parameters will be available to the build as environment variables.
E.g. $GERRIT_REFSPEC