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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Steven G Brown
            Reporter:
            Steven G Brown
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: