Select Parameter

This will prompt the user to select a value from a list of values when a force build is requested.

This parameter can then be used by a dynamic value in a task.

Version

Available from version 1.5

Examples

Minimalist example

1<selectParameter>
2  <name>Target</name>
3  <allowedValues>
4    <value name="Development">DEV</value>
5    <value name="Test">TEST</value>
6    <value name="Production">PROD</value>
7  </allowedValues>
8</selectParameter>

Full example

 1<selectParameter>
 2  <name>Target</name>
 3  <display>Target to Build</display>
 4  <description>Which target do you want to build?</description>
 5  <default>DEV</default>
 6  <minimum>3</minimum>
 7  <maximum>10</maximum>
 8  <required>false</required>
 9  <sourceFile>C:\Builds\Values.txt</sourceFile>
10</selectParameter>

Example in Context

 1<project name="Test Project">
 2  <sourcecontrol type="svn">
 3    <!-- Omitted for brevity -->
 4  </sourcecontrol>
 5  <triggers>
 6    <intervalTrigger />
 7  </triggers>
 8  <tasks>
 9    <!-- Omitted for brevity -->
10  </tasks>
11  <publishers>
12    <!-- Omitted for brevity -->
13  </publishers>
14  <parameters>
15    <selectParameter>
16      <name>Target</name>
17      <allowedValues>
18        <value name="Development">DEV</value>
19        <value name="Test">TEST</value>
20        <value name="Production">PROD</value>
21      </allowedValues>
22    </selectParameter>
23  </parameters>
24</project>

Configuration Elements

Element Description Type Required Default Version
allowedValues An array of allowed values. Named Value array No None 1.5
default The default value to use. String No None 1.5
description The description of the parameter. String No None 1.5
display The display name of the parameter. String No None 1.5
required Is the parameter required? Boolean No false 1.5
name The name of the parameter. String Yes n/a 1.5
sourceFile Load the values from a file. String No None 1.5

Notes

In order for this parameter to work, either the allowed values or a source file must be set. If both are set, the source file will be used.

Automatically Generated

Documentation generated on Monday, 26 May 2014 at 7:17:59 AM