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

Parameterized Build: get the list of declared parameters and default values

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      I'm using "Parameterized Build"
      (http://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build) and hudson
      eclipse plugin (http://code.google.com/p/hudson-eclipse/). It would be good to
      get the list of declared parameters and default values from hudson
      (http://code.google.com/p/hudson-eclipse/issues/detail?id=31#c1).

      With URL "http://server/job/myjob/buildParameters" hudson should return simple
      page with parameters and assigned values:
      ...
      Param1=value1
      Param2=
      Param3=value3
      ...

      This page can be parsed with a script or eclipse plugin. So it is possible to
      schedule build with default parameters or changed parameters by user:
      http://server/job/myjob/buildWithParameters?Param1=value1?Param2=user_value2?Param3=user_value3

      If the build is not parametrized, hudson should return an empty page and normal
      build can be started:
      http://server/job/myjob/build

      Andre

          [JENKINS-3703] Parameterized Build: get the list of declared parameters and default values

          anb0s added a comment -

          I tried api/xml interface and it is possible to get list of declared parameters
          from build (e.g. lastBuild, see hudson-eclipse implementation:
          http://code.google.com/p/hudson-eclipse/issues/detail?id=36). But the values are
          from build and not default values. It would be good to get the list with default
          values from job directly.

          anb0s added a comment - I tried api/xml interface and it is possible to get list of declared parameters from build (e.g. lastBuild, see hudson-eclipse implementation: http://code.google.com/p/hudson-eclipse/issues/detail?id=36 ). But the values are from build and not default values. It would be good to get the list with default values from job directly.

          Code changed in hudson
          User: : huybrechts
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/BooleanParameterValue.java
          trunk/hudson/main/core/src/main/java/hudson/model/ParameterDefinition.java
          trunk/hudson/main/core/src/main/java/hudson/model/ParameterValue.java
          trunk/hudson/main/core/src/main/java/hudson/model/ParametersDefinitionProperty.java
          trunk/hudson/main/core/src/main/java/hudson/model/RunParameterDefinition.java
          trunk/hudson/main/core/src/main/java/hudson/model/StringParameterValue.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=20424
          Log:
          [FIXED JENKINS-3703] added extra @Exposed properties for parameters

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : huybrechts Path: trunk/hudson/main/core/src/main/java/hudson/model/BooleanParameterValue.java trunk/hudson/main/core/src/main/java/hudson/model/ParameterDefinition.java trunk/hudson/main/core/src/main/java/hudson/model/ParameterValue.java trunk/hudson/main/core/src/main/java/hudson/model/ParametersDefinitionProperty.java trunk/hudson/main/core/src/main/java/hudson/model/RunParameterDefinition.java trunk/hudson/main/core/src/main/java/hudson/model/StringParameterValue.java http://fisheye4.cenqua.com/changelog/hudson/?cs=20424 Log: [FIXED JENKINS-3703] added extra @Exposed properties for parameters

          anb0s added a comment -

          Hi,

          i cannot find comment about this bug (3703) in hudson changelog. Is it included
          in the last hudson release (1.321)?

          Thank You!

          Andre

          anb0s added a comment - Hi, i cannot find comment about this bug (3703) in hudson changelog. Is it included in the last hudson release (1.321)? Thank You! Andre

          anb0s added a comment -

          Hi,

          it works now with Hudson v1.323. Thank You!

          The eclipse plugin patch is updated. Now default parameters are loaded if
          available. See http://code.google.com/p/hudson-eclipse/issues/detail?id=36#c4

          Andre

          anb0s added a comment - Hi, it works now with Hudson v1.323. Thank You! The eclipse plugin patch is updated. Now default parameters are loaded if available. See http://code.google.com/p/hudson-eclipse/issues/detail?id=36#c4 Andre

            huybrechts huybrechts
            anb0s anb0s
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: