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

File parameters no longer overwrite previous files



    • 2.289 released Apr 20, 2021


      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 


        Issue Links


            danielbeck Daniel Beck created issue -
            basil Basil Crow made changes -
            Field Original Value New Value
            Link This issue is caused by JENKINS-64650 [ JENKINS-64650 ]
            basil Basil Crow made changes -
            Remote Link This issue links to "jenkinsci/jenkins#5411 (Web Link)" [ 26618 ]
            basil Basil Crow made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            basil Basil Crow made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            basil Basil Crow made changes -
            Assignee Basil Crow [ basil ]
            basil Basil Crow added a comment - Fixed in jenkinsci/jenkins#5411 .
            basil Basil Crow made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Fixed but Unreleased [ 10203 ]
            markewaite Mark Waite made changes -
            Released As 2.289 released Apr 20, 2021
            Status Fixed but Unreleased [ 10203 ] Closed [ 6 ]
            bmunoz Beatriz Muñoz made changes -
            Labels lts-candidate regression 2.277.4-rejected lts-candidate regression
            raihaan Raihaan Shouhell made changes -
            Labels 2.277.4-rejected lts-candidate regression 2.277.4-rejected regression


              basil Basil Crow
              danielbeck Daniel Beck
              0 Vote for this issue
              3 Start watching this issue