Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: jira-trigger-plugin
-
Labels:None
-
Similar Issues:
Description
The JIRA-trigger-plugin fails the build job if a requested attribute set to null.
For example, in my Issue shape I have
resolution: null
Jenkins fails per below. I believe this should be caught and handled by the plugin rather than pass a null to the EnvInject plugin.
JIRA comment is added [EnvInject] - Loading node environment variables. FATAL: Null value not allowed as an environment variable: resolution java.lang.IllegalArgumentException: Null value not allowed as an environment variable: resolution at hudson.EnvVars.put(EnvVars.java:356) at hudson.model.StringParameterValue.buildEnvironment(StringParameterValue.java:56) at org.jenkinsci.plugins.envinject.util.RunHelper.getBuildVariables(RunHelper.java:88) at org.jenkinsci.plugins.envinject.util.RunHelper.getBuildVariables(RunHelper.java:154) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:236) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:50) at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:528) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:448) at hudson.model.Run.execute(Run.java:1735) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405) Finished: FAILURE
Code changed in jenkins
User: Wisen Tanasa
Path:
src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTriggerIntegrationTest.groovy
src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/ParameterMappingAction.groovy
http://jenkins-ci.org/commit/jira-trigger-plugin/9375c1b6141fcb6ff12873e7151dbe99e87a951a
Log:
JENKINS-46836Convert parameterResolver null return value to empty string.