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

SCM polling stops to work if the previously used build node no longer exists

XMLWordPrintable

      When a build job is changed to use a new build node, and also the previously used node is removed from the Jenkins setup, then SCM polling starts to fail with:

      ERROR: Failed to record SCM polling for hudson.model.FreeStyleProject@587918[jobName]
      java.lang.NullPointerException
      	at hudson.plugins.zentimestamp.ZenTimestampEnvironmentContributor.buildEnvironmentFor(ZenTimestampEnvironmentContributor.java:37)
      	at hudson.model.Run.getEnvironment(Run.java:2045)
      	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:931)
      	at hudson.scm.SubversionSCM.compareRemoteRevisionWith(SubversionSCM.java:1230)
      	at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356)
      	at hudson.scm.SCM.poll(SCM.java:373)
      	at hudson.model.AbstractProject._poll(AbstractProject.java:1521)
      	at hudson.model.AbstractProject.poll(AbstractProject.java:1446)
      	at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439)
      	at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468)
      	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:662)
      

      This is because AbstractBuild#getBuiltOn may return null, but this case is not handled in hudson.plugins.zentimestamp.ZenTimestampEnvironmentContributor#buildEnvironmentFor.
      See http://javadoc.jenkins-ci.org/hudson/model/AbstractBuild.html#getBuiltOn() for reference.

            gbois Gregory Boissinot
            aldaris aldaris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: