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

ExportXMLWordPrintable

      Enter the following pipe

      stage "NOK"
          "A.AA\nB.BB\n".splitEachLine(/\./) {
              line -> println "${line[0]} -> ${line[1]}"
          }
      
      stage "OK"
          "A.AA\nB.BB\n".split(/\n/).each {
              line = it.split(/\./)
              println "${line[0]} -> ${line[1]}"
          }
      

      and disable the sandbox. When you run the pipeline you will see

      [Pipeline] stage (NOK)
      Entering stage NOK
      Proceeding
      [Pipeline] echo
      A -> AA
      [Pipeline] stage (OK)
      Entering stage OK
      Proceeding
      [Pipeline] echo
      A -> AA
      [Pipeline] echo
      B -> BB
      [Pipeline] End of Pipeline
      Finished: SUCCESS
      

      You see that the splitEachLine() is only processing the first line (NOK-stage). I would expect the same result as in the OK-stage.

            Assignee:
            Unassigned
            Reporter:
            Andreas Schrell
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: