Boolean Parameter¶
This will prompt the user to enter a boolean value 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<booleanParameter>
2 <name>Target</name>
3 <true>Yes</true>
4 <false>No</false>
5</booleanParameter>
Full example
1<booleanParameter>
2 <name>Target</name>
3 <true name="PROD">Yes</true>
4 <false name="DEV">No</false>
5 <display>Production Build</display>
6 <description>Do you want to generate a production build?</description>
7 <default>DEV</default>
8 <required>false</required>
9</booleanParameter>
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 <booleanParameter>
16 <name>Target</name>
17 <true name="PROD">Yes</true>
18 <false name="DEV">No</false>
19 <display>Production Build</display>
20 <description>Do you want to generate a production build?</description>
21 <default>DEV</default>
22 <required>false</required>
23 </booleanParameter>
24 </parameters>
25</project>
Configuration Elements¶
Element | Description | Type | Required | Default | Version |
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 |
false | The value to use when the parameter is false. If the name attribute is set, then the user will see that as the selection value. Otherwise the actual value will be displayed. | Named Value | Yes | n/a | 1.5 |
required | Is the parameter required? | Boolean | No | false | 1.5 |
name | The name of the parameter. | String | Yes | n/a | 1.5 |
true | The value to use when the parameter is true. If the name attribute is set, then the user will see that as the selection value. Otherwise the actual value will be displayed. | Named Value | Yes | n/a | 1.5 |
Automatically Generated¶
Documentation generated on Monday, 26 May 2014 at 7:17:59 AM