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

File parameters no longer overwrite previous files

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.289 released Apr 20, 2021

      Description

      This is a regression in 2.278, it worked in 2.277.

      Steps to reproduce:

      1. Create a freestyle job
      2. Define a file parameter
      3. Trigger a build, uploading a file
      4. Trigger another build, uploading a file

      Expected behavior: The file is replaced, the build is successful (2.277 and earlier)

      Actual result: The build fails with:

      Building in workspace /var/jenkins_home/workspace/fs
      Copying file to f
      FATAL: Destination '/var/jenkins_home/workspace/fs/f' already exists
      org.apache.commons.io.FileExistsException: Destination '/var/jenkins_home/workspace/fs/f' already exists
      	at org.apache.commons.io.FileUtils.moveFile(FileUtils.java:2266)
      	at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:405)
      	at hudson.FilePath.copyFrom(FilePath.java:1092)
      	at hudson.model.FileParameterValue$2.setUp(FileParameterValue.java:173)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:157)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
      	at hudson.model.Run.execute(Run.java:1907)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE 

        Attachments

          Issue Links

            Activity

            Hide
            basil Basil Crow added a comment -
            Show
            basil Basil Crow added a comment - Fixed in jenkinsci/jenkins#5411 .

              People

              Assignee:
              basil Basil Crow
              Reporter:
              danielbeck Daniel Beck
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: