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

Boot up Vagrant VM not using relative path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • vagrant-plugin
    • None

      Under the Boot Up Vagrant VM task, specifying a relative path to the Vagrantfile doesnt work.

      Tried:
      ./Vagrantfile and Vagrantfile

      It appears as though 'vagrant up' tries to execute in /

      leaving the field empty gives a stack trace:

      java.lang.NullPointerException
      	at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
      	at java.util.regex.Matcher.reset(Matcher.java:308)
      	at java.util.regex.Matcher.<init>(Matcher.java:228)
      	at java.util.regex.Pattern.matcher(Pattern.java:1088)
      	at hudson.FilePath.normalize(FilePath.java:285)
      	at hudson.FilePath.<init>(FilePath.java:230)
      	at org.jenkinsci.plugins.vagrant.VagrantWrapper.parseVagrantEnvironment(VagrantWrapper.java:107)
      	at org.jenkinsci.plugins.vagrant.VagrantWrapper.validate(VagrantWrapper.java:184)
      	at org.jenkinsci.plugins.vagrant.VagrantWrapper.executeCommand(VagrantWrapper.java:133)
      	at org.jenkinsci.plugins.vagrant.VagrantUpCommand.perform(VagrantUpCommand.java:101)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      	at hudson.model.Build$BuildExecution.build(Build.java:199)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      	at hudson.model.Run.execute(Run.java:1745)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:89)
      	at hudson.model.Executor.run(Executor.java:240)
      

      I can fix this by using the full path (/var/lib/jenkins/jobs/project/workspace/Vagrantfile), but it's not ideal

            rwyss1 Roy Wyss
            jessebs jessebs
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: