JENKINS-27295 discusses getting values from various kinds of parameters. Handling FileParameterValue is another matter. buildEnvironment (what is called today) is useless since it gives only a file name. createBuildWrapper is the way this works in a freestyle project, but this cannot work in a workflow; even if it were to return a SimpleBuildWrapper (JENKINS-24673) it is not clear where that would be called, since we can only use it from a workspace. getValue as currently implemented is useless since a FileItem does not have whitelisted methods, and anyway we would not want the flow itself to be copying streams to the workspace; this needs to be done by infrastructure. The only way forward I can see at the moment is for getValue to return a SimpleBuildWrapper, so that your flow could read

      node {
        wrap([$delegate: parameters.myFileParam]) {
          sh 'cat myFileParam'
        }
      }
      

          [JENKINS-27413] Handle file parameters

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-27295 [ JENKINS-27295 ]
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-24673 [ JENKINS-24673 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-29289 [ JENKINS-29289 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 161618 ] New: JNJira + In-Review [ 180769 ]
          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: pipeline-build-step-plugin [ 21707 ]
          Component/s New: workflow-cps-plugin [ 21713 ]
          Component/s Original: pipeline [ 21692 ]
          James Dumay made changes -
          Labels New: blue-pipeline-scrub
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal OSS-1485 (Web Link)" [ 18681 ]
          Yuriy Burtsev made changes -
          Comment [ "file parameter" and "stash" enough for load file to job running on different nodes. ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            111 Vote for this issue
            Watchers:
            119 Start watching this issue

              Created:
              Updated:
              Resolved: