-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[JENKINS-73161] Ensure file parameters are retained across Jenkins restarts #11081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…starts Save the file as temporary file and store the filename in the value That way we can recover the file
This comment was marked as outdated.
This comment was marked as outdated.
needed to be able to apply the annotation
jglick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK (did not review too closely).
| locationFilePath.delete(); | ||
| if (location != null && !location.isBlank() && file != null && file.getName() != null && !file.getName().isBlank()) { | ||
| try { | ||
| listener.getLogger().println("Copying file to " + location); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ignore WS)
NotMyFault
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/label ready-for-merge
This PR is now ready for merge. We will merge it after ~24 hours if there is no negative feedback.
Please see the merge process documentation for more information about the merge process.
Thanks!
A1exKH
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Save the file as temporary file and store the filename in the value. That way we can recover the file parameter on a restart.
See JENKINS-73161.
Testing done
Added a unit test that fails without the fix
Manually verified that when deleting a freestyle job from the queue that the temporary file is deleted.
Manually verified that the temporary file is deleted once the job starts running
Proposed changelog entries
Proposed changelog category
/label bug
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered (see query).