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

Promoted Build NullPointer when not manual promotion

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • promoted-builds-plugin
    • None
    • Promoted Build 2.14

      After upgrading to Promoted Build Plugin 2.14 I am getting a null pointer exception for builds which perform an Automatic Promotion after the build completes.
      Reexecuting the promotion manually also fails.
      If the Promotion is configured for manual promotion, it promotes successfully when I click apply

      java.lang.NullPointerException
      	at hudson.plugins.promoted_builds.Promotion.getParameterValues(Promotion.java:142)
      	at hudson.plugins.promoted_builds.Promotion$RunnerImpl.doRun(Promotion.java:206)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:562)
      	at hudson.model.Run.execute(Run.java:1665)
      	at hudson.model.Run.run(Run.java:1612)
      	at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:170)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:246)
      

      initial guess would be the manualCondition is null?

      ManualCondition manualCondition=(ManualCondition) getProject().getPromotionCondition(ManualCondition.class.getName());
              for (ParameterValue pvalue:parametersAction.getParameters()){
                if (manualCondition.getParameterDefinition(pvalue.getName())!=null)

          [JENKINS-20166] Promoted Build NullPointer when not manual promotion

          Clecio Varjao added a comment -

          Thanks for reporting. I've submitted Pull Request #33 to fix this issue.

          Clecio Varjao added a comment - Thanks for reporting. I've submitted Pull Request #33 to fix this issue.

          Bruce Edge added a comment -

          Still waiting for 2.15 to show up on the jenkins plugin updater. Does this need a push to get propagated?

          Bruce Edge added a comment - Still waiting for 2.15 to show up on the jenkins plugin updater. Does this need a push to get propagated?

          I don't think that this has been merged and that 2.15 has been released yet.

          Mads Mohr Christensen added a comment - I don't think that this has been merged and that 2.15 has been released yet.

          Adam H added a comment - - edited

          Seeing the same thing. Jenkins 1.522 with version 2.14.
          Downgrading to 2.13 seem to solve the issue.

          Adam H added a comment - - edited Seeing the same thing. Jenkins 1.522 with version 2.14. Downgrading to 2.13 seem to solve the issue.

          Hannes Kogler added a comment -

          same here with Jenkins LTS version 1.532.1

          Hannes Kogler added a comment - same here with Jenkins LTS version 1.532.1

          Bruce Edge added a comment -

          This was fixed over a month ago (Oct 27). What does it take to get a release?

          Bruce Edge added a comment - This was fixed over a month ago (Oct 27). What does it take to get a release?

          Code changed in jenkins
          User: cvarjao
          Path:
          src/main/java/hudson/plugins/promoted_builds/Promotion.java
          http://jenkins-ci.org/commit/promoted-builds-plugin/cb976b9f0dfc28a2992eb42967c8cb3cd41057ac
          Log:
          [FIXED JENKINS-20166] Promoted Build NullPointer when not manual promotion

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: cvarjao Path: src/main/java/hudson/plugins/promoted_builds/Promotion.java http://jenkins-ci.org/commit/promoted-builds-plugin/cb976b9f0dfc28a2992eb42967c8cb3cd41057ac Log: [FIXED JENKINS-20166] Promoted Build NullPointer when not manual promotion

          Code changed in jenkins
          User: Nicolas De loof
          Path:
          src/main/java/hudson/plugins/promoted_builds/Promotion.java
          http://jenkins-ci.org/commit/promoted-builds-plugin/ca1bfbe304209b5191a6c0cd7afdc8190545ef52
          Log:
          Merge pull request #33 from cvarjao/JENKINS-20166

          [FIXED JENKINS-20166] Promoted Build NullPointer when not manual promoti...

          Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/262703f3ef46...ca1bfbe30420

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: src/main/java/hudson/plugins/promoted_builds/Promotion.java http://jenkins-ci.org/commit/promoted-builds-plugin/ca1bfbe304209b5191a6c0cd7afdc8190545ef52 Log: Merge pull request #33 from cvarjao/ JENKINS-20166 [FIXED JENKINS-20166] Promoted Build NullPointer when not manual promoti... Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/262703f3ef46...ca1bfbe30420

          Bruce Edge added a comment -

          2.14 is still the latest version available from the jenkins plugin manager.
          How does one get this fix?

          Bruce Edge added a comment - 2.14 is still the latest version available from the jenkins plugin manager. How does one get this fix?

          Can someone please release 2.15? I am getting the NullPointerException as well..

          Frieder Bluemle added a comment - Can someone please release 2.15? I am getting the NullPointerException as well..

            cvarjao Clecio Varjao
            gcummings Geoff Cummings
            Votes:
            18 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved: