I am using jenkins gerrit-trigger plugin. It works. The problem is that after completing the work, Jenkins cannot send feedback, because I do not have a “verified” tag in gerrit.
I found that there is a Gerrit Reporting Values section in the configuration (Jenkins -> Manager -> Gerrit Trigger -> Click on the gerrit edit button). This section has hard-coded subsections for Verification and Code Overview. Another unit is Gerrit's Verified Teams with commands such as:
gerrit review <CHANGE>,<PATCHSET> --message 'Build Successful <BUILDS_STATS>' --verified <VERIFIED> --code-review <CODE_REVIEW>
How can I add custom tags here?
I tried changing the commands to something like:
gerrit review <CHANGE>,<PATCHSET> --message 'Build Successful <BUILDS_STATS>' --acceptance-tests $ACCEPTANCE_TESTS_VOTE --code-quality $CODE_QUALITY_VOTE
From the docs:
Variables and will have the values defined above. The variable will have the URL of the result of the assembly.
and
You can also use any environment variable from the assembly that was launched with the syntax $ ENV_VAR.
How to add a new "parameter", how or how to pass an environment variable?
I tried to use the plugin EnvInject, but it seems that the environment variable is not populated with a value (an error message from jenkins says that there is no $ VAR parameter).
source
share