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.
- Switch to the demo configuration, 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. The selected directory name and file name will be printed there as a demonstration.
- Switch to variables definition 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, a test step is added to print selected value of the directory and file.