Details
-
Improvement
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
-
Jenkins 2.214, workflow-durable-task-step 2.36
Description
WorkspaceList.createTempDir (JENKINS-27152) is used by various plugins, and from Pipeline builds you can even use pwd tmp: true to use this location for custom purposes, but this is awkward. In practice many scripts wind up just binding this to a variable (example). We should define it out of the box.
$WORKSPACE is used for the main workspace (though not frequently needed as this is also the default working directory). $WORKSPACE_TMP seems like an intuitive name for the new property and matches the style of the @tmp suffix. Standard practice in Linux is to allow $TMPDIR to define a temporary directory, but using this variable name would result in a behavioral change for some existing scripts that may be unwanted, for example if /tmp is a RAM filesystem while the Jenkins workspace is persistent; we would like to offer a facility that users can opt in to where it makes sense (for example for project-specific caches) but not where it does not make sense (temporary files that are soon after deleted).
Attachments
Issue Links
- causes
-
JENKINS-61197 Running a job with a custom workspace set to eg. 'F:\' causes NullPointerException
-
- Resolved
-
- relates to
-
JENKINS-27152 Store sh control files outside of workspace
-
- Resolved
-
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Status | Open [ 1 ] | In Progress [ 3 ] |
Description |
{{WorkspaceList.createTempDir}} ( |
{{WorkspaceList.createTempDir}} ( {{$WORKSPACE}} is used for the main workspace (though not frequently needed as this is also the default working directory). {{$WORKSPACE_TMP}} seems like an intuitive name for the new property and matches the style of the {{@tmp}} suffix. [Standard practice in Linux|https://en.wikipedia.org/wiki/TMPDIR] is to allow {{$TMPDIR}} to define a temporary directory, but using this variable name would result in a behavioral change for some existing scripts that may be unwanted, for example if {{/tmp}} is a RAM filesystem while the Jenkins workspace is persistent; we would like to offer a facility that users can opt in to where it makes sense (for example for project-specific caches) but not where it does not make sense (temporary files that are soon after deleted). |
Remote Link | This issue links to "jenkins #4414 (Web Link)" [ 24229 ] |
Remote Link | This issue links to "workflow-durable-task-step #128 (Web Link)" [ 24230 ] |
Status | In Progress [ 3 ] | In Review [ 10005 ] |
Released As | Jenkins 2.214 | |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10005 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | In Review [ 10005 ] |
Released As | Jenkins 2.214 | Jenkins 2.214, workflow-durable-task-step 2.36 |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10005 ] | Fixed but Unreleased [ 10203 ] |
Link |
This issue causes |
Status | Fixed but Unreleased [ 10203 ] | Resolved [ 5 ] |