Version Number Plugin does not work when job is running more then once

33 views
Skip to first unread message

Andrew Novinger

unread,
Jan 21, 2016, 11:19:13 AM1/21/16
to Jenkins Users
I have a Jenkins job that is using the Version Number Plugin to change the build label in Jenkins to show the environment name and job number.

This job is not throttle so it can run many times concurrently for different environments.

The issue I am having is the first environment that is run, the label gets update and is correct, the next job that is running while the first job is running.  We get a null pointer exception thrown (see below), and the Jenkins label does not change. 

ERROR: java.lang.NullPointerException
java.lang.NullPointerException
	at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.incBuild(VersionNumberBuilder.java:262)
	at org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder.setUp(VersionNumberBuilder.java:540)
	at hudson.model.Build$BuildExecution.doRun(Build.java:156)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
	at hudson.model.Run.execute(Run.java:1738)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)

Any ideas on how to make this plugin work on a job that can run concurrently?

Baptiste Mathus

unread,
Jan 23, 2016, 8:24:30 AM1/23/16
to jenkins...@googlegroups.com
Looking at the code [1], IMO this is a likely a bug. This is indeed gonna blow up each time the previous build will still be building, as build.getResult() will by contract return null if currently building.

So, I think you should file an issue in the tracker about that. And if possible the associated PR to higher your chances to get an official release with that fix.

Cheers


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/41c4eebd-8df9-4af9-8ca3-67e042db0f7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages