-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
gerrit-code-review-plugin 0.3.7
I just started a new Jenkins, created a repo in GerritHub and set it up. When Jenkins builds the open changes, all the environment variables are being created and exposed accordingly. However, in a build of the branch such as master, none of these variables are set (only PROJECT, API_URL and CREDENTIALS_ID).
I suppose this is what causes the gerritReview step to fail when trying to post comments on a merged change. (When using plain Pipeline with Gerrit Trigger, the gerritReview step works fine on post-submit changes).
True, change-related variables on a regular branch are not set.
That is due to the fact that Gerrit doesn't know what is the associated change because the branch is not pointing to a change ref.
Jenkins is typically used with Gerrit for allowing pre-commit validation. What is your use-case on a regular branch?