2

In Jenkins gerrit-trigger plugin, we are able to customize the build message, I wonder whether we can use variable inside ?

Like below for ${PORT} ?

enter image description here

Update in 2017.03.31, it looks there is issue already JENKINS-37885

Larry Cai
  • 55,923
  • 34
  • 110
  • 156

1 Answers1

0

I think you can use any job parameter in the format <PARAMETER> and any build environment variable in the format $VARIABLE.

In the Gerrit plugin help ("?") is written:

The following standard <PARAMETER> values are available:

GERRIT_NAME: The Gerrit project name.
CHANGE_ID: The Gerrit Change-Id (SHA-1).
BRANCH: The branch of the project.
CHANGE: The change number.
PATCHSET: The patchset number.
PATCHSET_REVISION: The patchset revision.
REFSPEC: The ref-spec. (refs/changes/xx/xxxx/z).
BUILDURL: The URL to the build.
VERIFIED: The verified vote.
CODE_REVIEW: The code review vote.
NOTIFICATION_LEVEL: The notification level. (always ALL)
The following special <PARAMETER> values are available:

STARTED_STATS: The number of builds started out of the total triggered like "(1/3)". If there is only one build triggered then the value is empty.

You can also use any environment variable from the build that was started with the $ENV_VAR syntax.