jenkinsci / jenkinsci/workflow-durable-task-step-plugin

[JENKINS-45549] unable to stash in pipeline in readonly dir

Open
#534 1 comment 0 reactions 0 assignees View on GitHub
component:workflow-basic-steps-plugin component:workflow-durable-task-step-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
46
Forks
110
PR merge metrics
No merged PRs in 30d

Description

the following code generates IOException:

dir($READONLY_DIR){

stash name: abc, includes:$SOMEFILE

}

running into error:

java.io.IOException: Failed to mkdirs: $READONLY_DIR@​tmp/durable-XXXXXXXX

seems stash is trying to create dir with the dir given in context here

there are workaround of this (e.g. write to a different file) but I feel this can be solved by adding a parameter to control where that tmp file is stored.

---
Originally reported by shiqiyang, imported from: unable to stash in pipeline in readonly dir


  • status: Open
  • priority: Minor
  • component(s): workflow-basic-steps-plugin, workflow-durable-task-step-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20251212-090250

Raw content of original issue

the following code generates IOException:

dir($READONLY_DIR){
stash name: abc, includes:$SOMEFILE
}

running into error:
java.io.IOException: Failed to mkdirs: $READONLY_DIR@tmp/durable-XXXXXXXX

seems stash is trying to create dir with the dir given in context here
there are workaround of this (e.g. write to a different file) but I feel this can be solved by adding a parameter to control where that tmp file is stored.

environment

```
jenkins 2.46.3

pipeline 2.5
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.