Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55505

tee on windows results in corrupt files

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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
      
      
      

        Attachments

          Issue Links

            Activity

            Hide
            roel0 roel postelmans added a comment -

            Updated the ticket with a simplified example

            Show
            roel0 roel postelmans added a comment - Updated the ticket with a simplified example
            Hide
            jglick Jesse Glick added a comment -

            I do not see any indication that this is not a duplicate.

            Show
            jglick Jesse Glick added a comment - I do not see any indication that this is not a duplicate.

              People

              Assignee:
              rsandell rsandell
              Reporter:
              roel0 roel postelmans
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: