Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46836

JIRA Trigger Plugin fails job on null value attributes

    Details

    • 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

        Attachments

          Activity

          mgreville Marcus Greville created issue -
          mgreville Marcus Greville made changes -
          Field Original Value New Value
          Description The JIRA-trigger-plugin The JIRA-trigger-plugin place holder while the ticket is created
          mgreville Marcus Greville made changes -
          Description The JIRA-trigger-plugin place holder while the ticket is created The JIRA-trigger-plugin fails the build job if a requested attribute set to null.

          For example, in my Issue shape I have
          {code:java}
          resolution: null{code}
          Jenkins fails per below. I believe this should be caught and handled.
          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
          mgreville Marcus Greville made changes -
          Description The JIRA-trigger-plugin fails the build job if a requested attribute set to null.

          For example, in my Issue shape I have
          {code:java}
          resolution: null{code}
          Jenkins fails per below. I believe this should be caught and handled.
          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
          The JIRA-trigger-plugin fails the build job if a requested attribute set to null.

          For example, in my Issue shape I have
          {code:java}
          resolution: null{code}
          Jenkins fails per below. I believe this should be caught and handled by the plugin rather than pass a null to the EnvInject plugin.

           
          {code:java}
          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}
          mgreville Marcus Greville made changes -
          Summary JIRA Trigger Plugin doesn't map Issue Objects JIRA Trigger Plugin fails null value attributes
          mgreville Marcus Greville made changes -
          Summary JIRA Trigger Plugin fails null value attributes JIRA Trigger Plugin fails job on null value attributes
          ceilfors Wisen Tanasa made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          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-46836 Convert parameterResolver null return value to empty string.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - 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-46836 Convert parameterResolver null return value to empty string.
          Hide
          ceilfors Wisen Tanasa added a comment -

          Fixed under 0.6.1

          Show
          ceilfors Wisen Tanasa added a comment - Fixed under 0.6.1
          ceilfors Wisen Tanasa made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              ceilfors Wisen Tanasa
              Reporter:
              mgreville Marcus Greville
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: