Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Tip

There is Job Parameter Summary Plugin to visualize job parameters.

Excerpt

This scripts displays the parameters for all the jobs along with their default values (if applicable).

Code Block
import hudson.model.*

for(item in Hudson.instance.items) {
  prop = item.getProperty(ParametersDefinitionProperty.class)
  if(prop != null) {
    println("--- Parameters for " + item.name + " ---")
    for(param in prop.getParameterDefinitions()) {
      try {
        println(param.name + " " + param.defaultValue)
      }
      catch(Exception e) {
        println(param.name)
      }
    }
    println()
  }
}

Sample ouput produced:

Code Block
--- Parameters for GRA-00-UploadIntoClearCase ---
ONCSDAP1_USER jdoe
ONCSDAP1_PASSWORD 
GRA_ZIP_NAME GRA_Delivery_r.2.0.0_28-5_impl.zip
GRA_RELEASE n.28

--- Parameters for IN8-03-DeployXnetWebAppToRecette ---
STOP_START_AS