1

I am stuck with the problem i have with Gerrit trigger plugin for Jenkins Earlier all was ok but suddenly build broke, configuration did not changed.

Here is the log i have.

Building in workspace /var/lib/jenkins/jobs/Jobname/workspace
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url ssh://username@testserver.com:29418/test # timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
 > git submodule foreach --recursive git reset --hard # timeout=10
ERROR Failed to submit result to Gerritjava.net.SocketException: Connection reset > git submodule foreach --recursive git clean -fdx # timeout=10
Fetching upstream changes from ssh://username@testserver.com:29418/test
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git -c core.askpass=true fetch --tags --progress ssh://username@testserver.com:29418/test refs/changes/*:refs/changes/*
 > git rev-parse origin/$GERRIT_REFSPEC^{commit} # timeout=10
 > git rev-parse $GERRIT_REFSPEC^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE

As i can see for some reason Gerrit build parameters that are generated with Gerrit-trigger plugin are empty

Screenshot : enter image description here

Does anybody have any ideas how i can fix it?

tharindu_DG
  • 8,900
  • 6
  • 52
  • 64
  • Have you upgraded Jenkins to the latest version? – ElpieKay May 19 '16 at 13:56
  • Version of jenkins is 2,4 , i should upgrade to the latest? – Stanislav Yanovych May 19 '16 at 14:15
  • I'm not sure. My jenkins job encountered a similar problem . Gerrit trigger's parameter like GERRIT_PATCHSET_REVISION became empty after our jenkins was upgraded to v2.5. But I have no idea about its previous version. I was told v2.5 has some upgrade on security. So direct usage of variables like GERRIT_PATCHSET_REVISION is forbidden by default. But GERRIT_CHANGE_OWNER was okay. The Jenkins administrator then did some configuration, not rolled back jenkins to the previous version, but something like 'keep it as before', and then everything is okay. – ElpieKay May 19 '16 at 14:18
  • If i could know what did your jenkins administrator :) Thanks anyway , you gave me hope that rollback can prob. help – Stanislav Yanovych May 19 '16 at 14:24
  • It's almost mid-night here so I'll ask the administrator for details tomorrow and update my comment here if I can. – ElpieKay May 19 '16 at 14:29
  • I would appreciate your help. Waiting for your response. – Stanislav Yanovych May 19 '16 at 14:35
  • This issue is introduced by v2.3. You could read `security advisory` in What's new in 2.3 at https://jenkins.io/changelog/. The first part SECURITY-170/CVE-2016-3721 describes how to solve it. – ElpieKay May 20 '16 at 01:47

1 Answers1

0

This was caused by SECURITY 170 and was fixed in v2.21.0 of the Gerrit plugin.

Mark Stosberg
  • 12,961
  • 6
  • 44
  • 49