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

File parameter builds started via the web interface fail when the file is copied into a workspace subdirectory.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Hudson 1.363

      To reproduce:

      • Create a build with a file parameter. Set the file location to be under a subdirectory of the workspace, i.e. "dir/fileParam".
      • Start a build through the web interface and provide a file.
      • The following stack trace appears in the build console output:
      Copying file to dir/fileParam
      FATAL: C:\Users\Steve\.hudson\jobs\test\workspace\dir\fileParam (The system cannot find the path specified)
      java.io.FileNotFoundException: C:\Users\Steve\.hudson\jobs\test\workspace\dir\fileParam (The system cannot find the path specified)
      	at java.io.FileOutputStream.open(Native Method)
      	at java.io.FileOutputStream.<init>(Unknown Source)
      	at java.io.FileOutputStream.<init>(Unknown Source)
      	at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:416)
      	at hudson.FilePath.copyFrom(FilePath.java:690)
      	at hudson.model.FileParameterValue$1.setUp(FileParameterValue.java:85)
      	at hudson.model.Build$RunnerImpl.doRun(Build.java:132)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
      	at hudson.model.Run.run(Run.java:1241)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:124)
      

      The build is successful if the file is provided via the CLI, since the DiskFileItem class is not used in that case.

      It is also successful when the file location is directly under the workspace root directory.

            stevengbrown Steven G Brown
            stevengbrown Steven G Brown
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: