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

GString not flattened to String by DSL inside a map

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • workflow-cps-plugin
    • 1.580.13.1 / Workflow 1.4

      I want to resolve the artifact to be unarchived at execution time.

      Therefore I want to be able to perform the following:

      requiredFile = 'target/<some archived file name>'

      unarchive mapping: [requiredFile: .]

      Unfortunately this does not replace `requiredFile` with its value.

      trying to use the Groovy style like this:

      unarchive mapping: ["$requiredFile": .]

      results in

      java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String

          [JENKINS-27916] GString not flattened to String by DSL inside a map

          Nigel Harniman created issue -
          Jesse Glick made changes -
          Labels New: groovy
          Summary Original: Unable to pass variable to file path element of unarchive map New: GString not flattened to String by DSL inside a map
          Jesse Glick made changes -
          Epic Link New: JENKINS-35390 [ 171183 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 162512 ] New: JNJira + In-Review [ 180953 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Jesse Glick made changes -
          Component/s New: workflow-cps-plugin [ 21713 ]
          Component/s Original: pipeline [ 21692 ]
          Andrew Bayer made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Andrew Bayer [ abayer ]
          Andrew Bayer made changes -
          Remote Link New: This issue links to "PR #161 (Web Link)" [ 17426 ]
          Andrew Bayer made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Andrew Bayer made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

            abayer Andrew Bayer
            nharniman Nigel Harniman
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: