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

Redeploy fails when the original build node has been removed

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If you are using elastic cloud slaves, and a Maven installation has no fixed location on the master (instead provided using tool installers on slaves only), redeployment may fail with an unhelpful error such as

      ERROR: Couldn't find path for tool 'Maven 3.0.4' 
      java.lang.NullPointerException 
      	at java.io.File.<init>(Unknown Source) 
      	at hudson.tasks.Maven$MavenInstallation.getHomeDir(Maven.java:485) 
      	at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:114) 
      	at hudson.maven.reporters.MavenAbstractArtifactRecord$1.perform(MavenAbstractArtifactRecord.java:226) 
      	at hudson.model.TaskThread.run(TaskThread.java:127)
      

      It would be better to allocate a slave to run redeployment on, or at a minimum fail with a polite error message (AbortException perhaps) saying that the original environment can no longer be reconstructed.

      Null safety issues here: getHomeDir should presumably return null if it is unset; createEmbedder should try to fall back to finding a Maven installation which exists on the master; MavenEmbedderRequest.getMavenHome must be documented to be potentially null.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: