Using the below pipeline script fails in the second stage and in any subsequent runs until the master or slave isn't restarted.

       

      The error is:
      ERROR: Cannot delete workspace...
       

      The script:

      stage('first') {
        node() {
          cleanWs()

          tee('output.log')

      Unknown macro: {      echo 'test'    }

        }
      }

      stage('second') {
        node()

      Unknown macro: {    cleanWs()     echo 'cleaned'  }

      }

      Marked as critical due to the fact that slave/master restart is required to resolve the issue and allow further runs to wipe the workspace (until tee is used again).

       

          [JENKINS-54346] tee keeps file open

          Szabolcs Tolnai created issue -
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-55505 [ JENKINS-55505 ]
          Jesse Glick made changes -
          Assignee Original: rsandell [ rsandell ] New: Szabolcs Tolnai [ szabi_tolnai ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

            szabi_tolnai Szabolcs Tolnai
            szabi_tolnai Szabolcs Tolnai
            Votes:
            15 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated: