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

environmentVariables doesn't escape multiline content

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • job-dsl-plugin
    • None

      This keeps tripping me.

      This will result in invalid properties file format:

              environmentVariables {
                  env 'config', '''multiline
      content
      '''
      }
      

      You have to add sth like

      string.replaceAll('\n','\n\\' )

      to escape it manually

      EDIT: above should work but doesn't because of some bug in the envijector, but

      string.replace('\n','\\n')

      works

            jbochenski Jakub Bochenski
            jbochenski Jakub Bochenski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: