-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Ubuntu server, Jenkins 1.451, Gerrit Trigger 2.4.0, Git Plugin 1.1.15
When a build is started by the Gerrit Trigger, it always fails with the error and
stack track pasted below:
Manually triggered by user admin for Gerrit: http://localhost:8080/79
Building in workspace /mntf/jenkins/jobs/GerritBuilder/workspace
Checkout:workspace / /mntf/jenkins/jobs/GerritBuilder/workspace - hudson.remoting.LocalChannel@72cbb9
Using strategy: Gerrit Trigger
Checkout:workspace / /mntf/jenkins/jobs/GerritBuilder/workspace - hudson.remoting.LocalChannel@72cbb9
Fetching changes from 1 remote Git repository
Fetching upstream changes from ssh://jenkins@localhost:29418/myrepo.git
Commencing build of Revision 4514e900f88eb22c7c006aa8b8971f55e08b0324 ()
FATAL: Null value not allowed as an environment variable: GIT_BRANCH
java.lang.IllegalArgumentException: Null value not allowed as an environment variable: GIT_BRANCH
at hudson.EnvVars.put(EnvVars.java:162)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:576)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:465)
at hudson.model.Run.run(Run.java:1409)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
The configuration of the trigger is along the lines given in Alex Blewitt's article (http://www.infoq.com/articles/Gerrit-jenkins-hudson). Specifically, the project and branch are configure as:
Path - ** - Path - **
Searching the forums, mailing lists, and irc logs did not yield a solution, so we're assuming it's a bug and not
a config issue.
There is also an exception visible in the Jenkins log, which might be related to this issue:
Caused by: java.lang.AssertionError: class com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch is missing its descriptor in public java.util.List com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject.getBranches(). See https://wiki.jenkins-ci.org/display/JENKINS/My+class+is+missing+descriptor
at hudson.model.Descriptor$PropertyType.getItemTypeDescriptorOrDie(Descriptor.java:194)
The full stack trace of this exception can be seen here: http://pastebin.com/Nm5FVKZB