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

Add a lineSeparator step

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We can't use System.lineSeparator() reliably as it returns the master node's line separator. Adding a lineSeparator() step is useful for writing files on various agents.

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Yoav Miles it may be safe to add it, but it will unlikely get you the result you expect in Jenkins Pipeline. In Pipeline scripts will always return the master's system separator. Maybe it's better to propose a new step in Pipeline Utility steps

           

          Show
          oleg_nenashev Oleg Nenashev added a comment - Yoav Miles it may be safe to add it, but it will unlikely get you the result you expect in Jenkins Pipeline. In Pipeline scripts will always return the master's system separator. Maybe it's better to propose a new step in Pipeline Utility steps  
          Hide
          towel Yoav Miles added a comment -

          Oleg Nenashev thanks for the prompt response. I'll change this report to ask for a new step, as my case can't be generalized (Jenkins only manages Windows machines at my site).

          Show
          towel Yoav Miles added a comment - Oleg Nenashev thanks for the prompt response. I'll change this report to ask for a new step, as my case can't be generalized (Jenkins only manages Windows machines at my site).
          Hide
          towel Yoav Miles added a comment -

          On second thought, I think it's better for readFile and writeFile to know how to convert line endings than having to do it manually with another step, but then the change would be less trivial...

          Show
          towel Yoav Miles added a comment - On second thought, I think it's better for readFile and writeFile to know how to convert line endings than having to do it manually with another step, but then the change would be less trivial...

            People

            Assignee:
            rsandell rsandell
            Reporter:
            towel Yoav Miles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: