This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      This is somewhat hard to reproduce.

      Sometimes the output of a bat step is truncated. Given the following pipeline script :

      node("Windows") {
          def output = bat returnStdout: true, script: "some_program"
          echo output
      }
      

      some_program outputs a file path, say C:\Jenkins\workspace\Project\file.zip

      Instead, this prints something like C:\Jenk or C:\Jenkins\workspace\Project\fil for instance.

      I use the following work around

      node("Windows") {
          bat script: "some_program > stdout"
          def output = readFile("stdout")
          echo output
      }
      

      Which always work.

            Assignee:
            Unassigned
            Reporter:
            Charles Bouchard-Légaré
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: