-
Bug
-
Resolution: Duplicate
-
Critical
-
None
-
jenkins-2.157
node("A_WINDOWS_NODE") { ws("test11") { cleanWs() tee("a_file") { bat "echo u mama" bat "echo u mama" } } }
When the tee body contains more then one statement, then the file is always corrupted. This means that the file cannot be opened, or deleted until the slave is restarted. This is closely related to JENKINS-54346 but is not the same problem!
When tee only contains one statement, the problem does not occur
This is a very critical issue because the job will fail the second time on cleanWs() and will continue to fail until the slave is restarted.
The problem does not occur on Linux
Splitting the tee comment so it contains only one statement works as well:
node("wind") { cleanWs() tee("a_file") { bat "echo u mama" } tee("a_file") { bat "echo u mama" } }
Notice that on Linux:
node("master") { cleanWs() tee("a_file") { sh "echo u mama" sh "echo u mama" } }
Leads to a_file having 'Terminated' as last line? Thats also a bit strange
cat a_file >> + echo u mama u mama + echo u mama u mama Terminated
- relates to
-
JENKINS-54346 tee keeps file open
-
- In Review
-
Updated the ticket with a simplified example