You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pipelines/process/includes/parameter-data-types.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,13 @@ ms.date: 08/30/2024
8
8
ai-usage: ai-assisted
9
9
---
10
10
11
+
> [!IMPORTANT]
12
+
> The new stringList data type feature will roll out over the next month.
13
+
11
14
| Data type | Notes |
12
15
|-----------|-------|
13
16
| `string` | string
17
+
| `stringList` | a list of items, multiple can be selected. Not available in templates
14
18
| `number` | may be restricted to `values:`, otherwise any number-like string is accepted
15
19
| `boolean` | `true` or `false`
16
20
| `object` | any YAML structure
@@ -23,7 +27,10 @@ ai-usage: ai-assisted
23
27
| `stage` | a single stage
24
28
| `stageList` | sequence of stages
25
29
26
-
The step, stepList, job, jobList, deployment, deploymentList, stage, and stageList data types all use standard YAML schema format. This example includes string, number, boolean, object, step, and stepList.
30
+
The `step`, `stepList`, `job`, `jobList`, `deployment`, `deploymentList`, `stage`, `stringList`, and `stageList` data types all use standard YAML schema format. This example includes `string`, `number`, `boolean`, `object`, `step`, and `stepList`.
31
+
32
+
> [!NOTE]
33
+
> The `stringList` data type isn't available in templates. Use the `object` data type in templates instead.
27
34
28
35
```yaml
29
36
parameters:
@@ -33,11 +40,22 @@ parameters:
33
40
34
41
- name: myMultiString # Define a parameter named 'myMultiString'
35
42
type: string # The parameter type is string
36
-
default: default # Default value is 'default'
43
+
default: default # Default value is 'default', only one default
37
44
values: # Allowed values for 'myMultiString'
38
45
- default
39
46
- ubuntu
40
47
48
+
- name: myStringlist # Define a parameter named 'myStringlist'
49
+
type: stringList # The parameter type is stringList
50
+
displayName: Regions
51
+
values: # Allowed values for 'myStringlist'
52
+
- WUS
53
+
- CUS
54
+
- EUS
55
+
default: # Default values
56
+
- WUS
57
+
- CUS
58
+
41
59
- name: myNumber # Define a parameter named 'myNumber'
42
60
type: number # The parameter type is number
43
61
default: 2# Default value is 2
@@ -76,7 +94,7 @@ parameters:
76
94
default: # Default value is a list of steps
77
95
- script: echo step one
78
96
- script: echo step two
79
-
97
+
80
98
trigger: none
81
99
82
100
jobs:
@@ -86,4 +104,9 @@ jobs:
86
104
- job: myStep # Define a job named 'myStep'
87
105
steps:
88
106
- ${{ parameters.myStep }} # Use the step from the 'myStep' parameter
107
+
108
+
- job: stringList # Define a job named 'stringList'
0 commit comments