[JIRA] (JENKINS-60364) Environment variables not being set when Gerrit 2.14

23 views
Skip to first unread message

felipecassiors@gmail.com (JIRA)

unread,
Dec 4, 2019, 7:13:03 AM12/4/19
to jenkinsc...@googlegroups.com
Felipe Santos created an issue
 
Jenkins / Bug JENKINS-60364
Environment variables not being set when Gerrit 2.14
Issue Type: Bug Bug
Assignee: Luca Domenico Milanesio
Components: gerrit-code-review-plugin
Created: 2019-12-04 12:12
Environment: gerrit-code-review 0.3.7
Priority: Minor Minor
Reporter: Felipe Santos

For some reason the environment variables are not created for open changes in multibranch pipeline. I tried with GerritHub (latest version of Gerrit) and it seems to be working fine, however, with my local Gerrit implementation (v2.14) this issue happens. Only these environment variables are being set (I'm testing with sh 'printenv'): 

  • GERRIT_API_URL
  • GERRIT_PROJECT
  • GERRIT_CREDENTIALS_ID
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

luca.milanesio@gmail.com (JIRA)

unread,
Dec 5, 2019, 5:37:03 PM12/5/19
to jenkinsc...@googlegroups.com
Luca Domenico Milanesio commented on Bug JENKINS-60364
 
Re: Environment variables not being set when Gerrit 2.14

Gerrit v2.14 is EOL (see https://www.gerritcodereview.com/support.html). Have you considered upgrading?

Do you see any error on the Gerrit logs? Or on the Jenkins logs?

felipecassiors@gmail.com (JIRA)

unread,
Dec 9, 2019, 4:34:03 PM12/9/19
to jenkinsc...@googlegroups.com
Felipe Santos updated an issue
 
Change By: Felipe Santos
Attachment: chrome_fjTOLApGQw.png

felipecassiors@gmail.com (JIRA)

unread,
Dec 9, 2019, 4:34:03 PM12/9/19
to jenkinsc...@googlegroups.com
Felipe Santos commented on Bug JENKINS-60364
 
Re: Environment variables not being set when Gerrit 2.14

The upgrade to Gerrit 3.0 in our company is scheduled on the road-map for Q4 2020 (and I would love to change this, sadly I can't).

The log isn't very clear. Did I configured it right? 

felipecassiors@gmail.com (JIRA)

unread,
Dec 9, 2019, 4:49:02 PM12/9/19
to jenkinsc...@googlegroups.com
Felipe Santos updated an issue
Change By: Felipe Santos
Attachment: gerrit-code-review-plugin.log

felipecassiors@gmail.com (JIRA)

unread,
Dec 9, 2019, 4:52:02 PM12/9/19
to jenkinsc...@googlegroups.com
 
Re: Environment variables not being set when Gerrit 2.14

By using that logger configuration, I see one error that just occurs when trying to build an open change. The error happens all the time after hitting the button "Build now", only stops when the build finishes. Does't happen when trying to build from a branch (not a open change). The error seems to be the same every time, however, the stack trace is different. Log is attached to do not pollute the chat: gerrit-code-review-plugin.log
 
Dec 09, 2019 9:44:10 PM SEVERE jenkins.plugins.gerrit.ProjectChanges get
Unable to retrieve change 6566742
Dec 09, 2019 9:44:10 PM FINER jenkins.plugins.gerrit.ProjectChanges get
THROW
com.urswolfer.gerrit.client.rest.http.HttpStatusException: Request not successful. Message: Bad Request. Status-Code: 400. Content: "TRACKING_IDS" is not a valid value for "-o".
    at com.urswolfer.gerrit.client.rest.http.GerritRestClient.throwHttpStatusException(GerritRestClient.java:494)
 
 

luca.milanesio@gmail.com (JIRA)

unread,
Dec 30, 2019, 8:56:02 AM12/30/19
to jenkinsc...@googlegroups.com

I believe this is more an issue with the GerritRestClient (see https://github.com/uwolfer/gerrit-rest-java-client). Will have a look on that code-base to see what is needed to support Gerrit v2.14 or earlier.

luca.milanesio@gmail.com (JIRA)

unread,
Dec 30, 2019, 9:23:01 AM12/30/19
to jenkinsc...@googlegroups.com

Raised as https://github.com/uwolfer/gerrit-rest-java-client/issues/97.

As soon as the Gerrit REST API java layer will be fixed, I'll include it in the plugin.

Thanks for raising it and for providing meaningful and comprehensive logs for reproducing . the issue.

felipecassiors@gmail.com (JIRA)

unread,
Dec 30, 2019, 9:45:03 AM12/30/19
to jenkinsc...@googlegroups.com

Awesome! I just saw the Issue there. You're very welcome and thank you so much.

luca.milanesio@gmail.com (JIRA)

unread,
Dec 30, 2019, 9:46:02 AM12/30/19
to jenkinsc...@googlegroups.com

I am trying to downgrade for the time being the Gerrit REST API java layer, so that compatibility with Gerrit v2.14 is resumed.

luca.milanesio@gmail.com (JIRA)

unread,
Dec 30, 2019, 9:55:02 AM12/30/19
to jenkinsc...@googlegroups.com

luca.milanesio@gmail.com (JIRA)

unread,
Dec 30, 2019, 9:55:03 AM12/30/19
to jenkinsc...@googlegroups.com

luca.milanesio@gmail.com (JIRA)

unread,
Dec 30, 2019, 9:55:03 AM12/30/19
to jenkinsc...@googlegroups.com
Status: Open In Progress

felipecassiors@gmail.com (JIRA)

unread,
Dec 30, 2019, 3:33:02 PM12/30/19
to jenkinsc...@googlegroups.com
Felipe Santos commented on Bug JENKINS-60364
 
Re: Environment variables not being set when Gerrit 2.14

I loaded the generated plugin into my Jenkins and I can confirm now all the environment variables is being set.

felipecassiors@gmail.com (JIRA)

unread,
Jan 5, 2020, 8:30:02 PM1/5/20
to jenkinsc...@googlegroups.com

I think this Issue can be closed now, don't you think?

Reply all
Reply to author
Forward
0 new messages