Repository navigation
[JENKINS-65327] File parameters no longer overwrite previous files #11989
Copy link
Copy link
Closed
Description
This is a regression in 2.278, it worked in 2.277.
Steps to reproduce:
- Create a freestyle job
- Define a file parameter
- Trigger a build, uploading a file
- 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
Originally reported by
danielbeck, imported from: File parameters no longer overwrite previous files
- assignee: basil
- status: Closed
- priority: Major
- component(s): core
- label(s): 2.277.4-rejected, regression
- resolution: Fixed
- resolved: 2021-04-15T18:07:03+00:00
- votes: 0
- watchers: 2
- imported: 2025-11-24
Raw content of original issue
This is a regression in 2.278, it worked in 2.277.
Steps to reproduce:
- Create a freestyle job
- Define a file parameter
- Trigger a build, uploading a file
- 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
Reactions are currently unavailable
Activity
jenkins-infra-bot commentedon Apr 9, 2021
Remote link associated with this issue:
jenkins-infra-bot commentedon Apr 15, 2021
basil:
Raw content of original comment:
Fixed in jenkinsci/jenkins#5411.