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

InputStep doesn't support File Parameters

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      1. Input step form submissions are broken for File params because InputStepExecution doesn't support multipart/form-data.
      2. The input step is not handling the file param (FileParameterValue) properly. See InputStepExecution.convert; it's copying the file to the build directory, while I think it should be copying it to the active workspace associated with the input build step, allowing the file to be read from the workspace (by the workflow script - might be possible to get from the build, but I think it would be more intuitive to get it from the workspace) + allowing it to be archived via the archive step (I don't think this can be worked around because the archive step only archives from the workspace afaik).

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Possibly you did not know about JENKINS-27413? There I had an idea (possibly workable, possibly not!) about how to handle FileParameter without special-case code in Workflow. In that case I was thinking about build parameters, but the handling of input parameters could probably be similar.

            Show
            jglick Jesse Glick added a comment - Possibly you did not know about JENKINS-27413 ? There I had an idea (possibly workable, possibly not!) about how to handle FileParameter without special-case code in Workflow. In that case I was thinking about build parameters, but the handling of input parameters could probably be similar.
            Hide
            tfennelly Tom FENNELLY added a comment -

            Jesse Glick ah ok ... I didn't see that. I did look, but I was filtering on "Bug" only (not "Feature" since it looked as though it was already supposed to be a feature) and so didn't see it when I scanned the list.

            There was code in there for handling File Parameters, though I have my doubts that it ever worked since the multipart formdata handling was missing (no tests for it either). So were you thinking of doing something similar to the BuildWrapper stuff used in Freestyle builds (would require core changes I suspect)?

            In any case, maybe we could have short and longer-term fixes perhaps. What I put in this WiP PR is horribly hacky, but gets it working. It could be cleaner if Stapler allowed better access to parsed formdata. Longer-term we could fix it better with whatever you have in mind?

            Show
            tfennelly Tom FENNELLY added a comment - Jesse Glick ah ok ... I didn't see that. I did look, but I was filtering on "Bug" only (not "Feature" since it looked as though it was already supposed to be a feature) and so didn't see it when I scanned the list. There was code in there for handling File Parameters, though I have my doubts that it ever worked since the multipart formdata handling was missing (no tests for it either). So were you thinking of doing something similar to the BuildWrapper stuff used in Freestyle builds (would require core changes I suspect)? In any case, maybe we could have short and longer-term fixes perhaps. What I put in this WiP PR is horribly hacky, but gets it working. It could be cleaner if Stapler allowed better access to parsed formdata. Longer-term we could fix it better with whatever you have in mind?
            Hide
            jglick Jesse Glick added a comment -
            Show
            jglick Jesse Glick added a comment - There is some basic support in: https://github.com/jenkinsci/file-parameters-plugin

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              tfennelly Tom FENNELLY
              Votes:
              9 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: