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

Render an AC Reactive reference as a functional Jenkins File Parameter

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • active-choices-plugin
    • None
    • active-choices v1.3

      An AC Reactive Reference can be rendered as formatted HTML. This allows you to render a parameter as a variety of HTML control types. In addition, if the HTML rendered is of the format <input type="InputType" name="value" > the value returned from the parameter is usable in the build.
      This works successfully with at least the following InputTypes that I've tested:

      • checkbox
      • range
      • month
      • datetime-local
      • color
        That's pretty cool, but I now want to render a Jenkins File Parameter.

      The groovy script for this is very simple:

      html='''
      <input name="value" type="file" jsonaware="true">
      '''
      return html

      This is rendered and functions correctly with one exception. The selected file never gets uploaded to the server as a normal Jenkins File Parameter would. Making this work would be a great way to render a dynamic File Parameter in the UI.

            kinow Bruno P. Kinoshita
            ioannis Ioannis Moutsatsos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: