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

tee on windows results in corrupt files

XMLWordPrintable

      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
      
      
      

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

              Created:
              Updated:
              Resolved: