Chained Build Options

Version 1 by Robin Shen
on Apr 09, 2011 13:44.


 
compared with
Current by Robin Shen
on Jun 23, 2011 13:23.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 2 changes. View first change.

 h1. Situation
 When prompt build options for a manually triggered build, it is often desirable to chain two or more selection boxes together so that available choices of latter selection box are calculated based on selected value of prior selection box.
  
 h1. Demonstration
 # Switch to the [demo configuration|http://demo.pmease.com/dashboard/96], and hit the run button.
  # Switch to the [demo configuration|http://demo.pmease.com/overview/96], and hit the run button.
 # The build option page prompts user to select a directory and a file inside that directory.
 # Select a directory, and available choices of the file selection box will change to reflect contained files under that directory.
 # Run the build, and check the [build log|http://demo.pmease.com/build/96:latest]. The selected directory name and file name will be printed there as a demonstration.
  # Run the build, and check the [build log|http://demo.pmease.com/build/96.latest]. The selected directory name and file name will be printed there as a demonstration.
  
 h1. Resolution
 # Switch to [variables definition|http://demo.pmease.com/settings/96/variables] of the demo configuration.
 # The variable _dir_ is defined to prompt as a selection box, with choices field defined as a groovy script returning all sub directory names under _/home/pmease/skyagent_.
 # The variable _file_ is defined to prompt as a selection box, with choices field defined as a groovy script returning all file names under the selected sub directory.
 # Check the [steps definition|http://demo.pmease.com/settings/96/steps], a test step is added to print selected value of the directory and file.