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

GString not flattened to String by DSL inside a map

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: