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

Version 1.1.1 of Pipeline Model Definition plugin does not allow triple quoted strings.

    Details

    • Similar Issues:

      Description

      When using declarative pipelines, and defining environment variables to be multi line strings using triple quotes ('''), since 1.1.1, the pipeline fails to parse.

      Example input:

      https://gist.github.com/khobbits/e60a0b086fd73e6ea8ef64175dce0ab1

      Stack trace & error:

      https://gist.github.com/khobbits/8d7f0851fd3410d3369aacea1f896ad7

      Error Extract:

      hudson.remoting.ProxyException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      Script8.groovy: 1: expecting anything but ''\n''; got it anyway @ line 1, column 14.
      "STACK_INFO={

      Possibly related to JENKINS-42771

        Attachments

          Issue Links

            Activity

            Hide
            bitwiseman Liam Newman added a comment -

            Bulk closing resolved issues.

            Show
            bitwiseman Liam Newman added a comment - Bulk closing resolved issues.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/EnvironmentTest.java
            pipeline-model-definition/src/test/resources/multilineEnvironment.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/ff93a66f4862e73b5995768864649d5d5262217d
            Log:
            [FIXED JENKINS-43137] Properly escape multiline env vars

            And env vars containing double-quotes.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/EnvironmentTest.java pipeline-model-definition/src/test/resources/multilineEnvironment.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/ff93a66f4862e73b5995768864649d5d5262217d Log: [FIXED JENKINS-43137] Properly escape multiline env vars And env vars containing double-quotes.
            Show
            abayer Andrew Bayer added a comment - PR up at  https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/147

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                khobbits Robert Gornall
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: