在Jenkins gerrit-trigger plugin中,我们能够自定义构建消息,我想知道我们是否可以在内部使用变量?
如下${PORT}
?
2017.03.31更新,看起来已经存在问题JENKINS-37885
答案 0 :(得分:0)
我认为您可以使用格式为<PARAMETER>
的任何作业参数以及格式为$ VARIABLE的任何构建环境变量。
在Gerrit插件中,帮助(“?”)写成:
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.