I'm using jenkins gerrit-trigger plugin. It does trigger the job. The problem is that after job is finished jenkins cannot send review becasue I have no 'verified' label in gerrit.
I found that in configuration there is Gerrit Reporting Values section (Jenkins -> Manager -> Gerrit Trigger -> Click on your gerrit "edit" button). In that section there are hardcoded subsections for "Verify" and "Code Review". Another subsection is "Gerrit Verified Commands" with commands like:
gerrit review <CHANGE>,<PATCHSET> --message 'Build Successful <BUILDS_STATS>' --verified <VERIFIED> --code-review <CODE_REVIEW>
How I can add custom labels here?
I've tried to change commands to something like:
gerrit review <CHANGE>,<PATCHSET> --message 'Build Successful <BUILDS_STATS>' --acceptance-tests $ACCEPTANCE_TESTS_VOTE --code-quality $CODE_QUALITY_VOTE
From docs:
The variables and will have the values defined above. The variable will have the URL to the build result.
and
You can also use any environment variable from the build that was started with the $ENV_VAR syntax.
How to add new "parameter" like or how to pass environment variable?
I've tried to use EnvInject
plugin, but it seems the environment variable is not filled with value (the error message from jenkins says that there is no $VAR parameter).