• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker

      I noticed some NPE's after upgrading the build-name-setter plugin using GIT_BRANCH and GIT_REVISION from token-macro. Downgrading to 1.5.1 cleared it up.

          [JENKINS-34195] NPE after upgrade to build-name-setter 1.6.0

          Jacob Blain Christen added a comment - - edited

          I think I upgraded token-macro at the same time, possibly the source of the problem.

          pertinent stack trace
          23:02:12 FATAL: null
          23:02:12 java.lang.NullPointerException
          23:02:12 	at org.jenkinsci.plugins.buildnamesetter.BuildNameSetter.setUp(BuildNameSetter.java:41)
          23:02:12 	at hudson.model.Build$BuildExecution.doRun(Build.java:156)
          23:02:12 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
          23:02:12 	at hudson.model.Run.execute(Run.java:1738)
          23:02:12 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          23:02:12 	at hudson.model.ResourceController.execute(ResourceController.java:98)
          23:02:12 	at hudson.model.Executor.run(Executor.java:410)
          23:02:12 Finished: FAILURE
          

          Jacob Blain Christen added a comment - - edited I think I upgraded token-macro at the same time, possibly the source of the problem. pertinent stack trace 23:02:12 FATAL: null 23:02:12 java.lang.NullPointerException 23:02:12 at org.jenkinsci.plugins.buildnamesetter.BuildNameSetter.setUp(BuildNameSetter.java:41) 23:02:12 at hudson.model.Build$BuildExecution.doRun(Build.java:156) 23:02:12 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) 23:02:12 at hudson.model.Run.execute(Run.java:1738) 23:02:12 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 23:02:12 at hudson.model.ResourceController.execute(ResourceController.java:98) 23:02:12 at hudson.model.Executor.run(Executor.java:410) 23:02:12 Finished: FAILURE

          Peter Rifel added a comment -

          I experienced this too. I noticed that the config.xml for the failing job did not have tags for the new settings in 1.6.0. Simply resaving the job added them to the configuration with their default values and the job began working again.

          Before the save (notice the 1.6.0 version)

          <buildWrappers>
            <org.jenkinsci.plugins.buildnamesetter.BuildNameSetter plugin="build-name-setter@1.6.0">
              <template>#${BUILD_NUMBER}</template>
            </org.jenkinsci.plugins.buildnamesetter.BuildNameSetter>
          </buildWrappers>
          

          Compared to after the save:

          <buildWrappers>
            <org.jenkinsci.plugins.buildnamesetter.BuildNameSetter plugin="build-name-setter@1.6.0">
              <template>#${BUILD_NUMBER}</template>
              <runAtStart>true</runAtStart>
              <runAtEnd>true</runAtEnd>
            </org.jenkinsci.plugins.buildnamesetter.BuildNameSetter>
          </buildWrappers>
          

          Peter Rifel added a comment - I experienced this too. I noticed that the config.xml for the failing job did not have tags for the new settings in 1.6.0. Simply resaving the job added them to the configuration with their default values and the job began working again. Before the save (notice the 1.6.0 version) <buildWrappers> <org.jenkinsci.plugins.buildnamesetter.BuildNameSetter plugin= "build-name-setter@1.6.0" > <template> #${BUILD_NUMBER} </template> </org.jenkinsci.plugins.buildnamesetter.BuildNameSetter> </buildWrappers> Compared to after the save: <buildWrappers> <org.jenkinsci.plugins.buildnamesetter.BuildNameSetter plugin= "build-name-setter@1.6.0" > <template> #${BUILD_NUMBER} </template> <runAtStart> true </runAtStart> <runAtEnd> true </runAtEnd> </org.jenkinsci.plugins.buildnamesetter.BuildNameSetter> </buildWrappers>

          Jon Starbird added a comment -

          I hit this same issue with 1.6.0. The above work around given by Peter does work but this type of bug should be a higher priority than minor, I had to save off practically every single job we have, upwards of 50. I can imagine there are even bigger setups out there than ours so Minor just doesn't cover it so I've bumped it up to Major at the very least.

          Jon Starbird added a comment - I hit this same issue with 1.6.0. The above work around given by Peter does work but this type of bug should be a higher priority than minor, I had to save off practically every single job we have, upwards of 50. I can imagine there are even bigger setups out there than ours so Minor just doesn't cover it so I've bumped it up to Major at the very least.

          Lev Mishin added a comment -

          I'm working on it

          Lev Mishin added a comment - I'm working on it

          Lev Mishin added a comment -

          Closed as duplicate

          Lev Mishin added a comment - Closed as duplicate

            le0 Lev Mishin
            dweomer Jacob Blain Christen
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: