1
+ <?xml version =' 1.1' encoding =' UTF-8' ?>
2
+ <
flow-definition plugin =
" [email protected] _0c6f3a_4b_4" >
3
+ <actions >
4
+ <
org .jenkinsci.plugins.workflow.multibranch.JobPropertyTrackerAction
plugin =
" [email protected] _a_660950e" >
5
+ <jobPropertyDescriptors >
6
+ <string >hudson.model.ParametersDefinitionProperty</string >
7
+ </jobPropertyDescriptors >
8
+ </org .jenkinsci.plugins.workflow.multibranch.JobPropertyTrackerAction>
9
+ <
org .jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobAction
plugin =
" [email protected] _d93" />
10
+ <
org .jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction
plugin =
" [email protected] _d93" >
11
+ <jobProperties />
12
+ <triggers />
13
+ <parameters />
14
+ <options />
15
+ </org .jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction>
16
+ </actions >
17
+ <description ></description >
18
+ <keepDependencies >false</keepDependencies >
19
+ <properties >
20
+ <hudson .model.ParametersDefinitionProperty>
21
+ <parameterDefinitions >
22
+ <
org .biouno.unochoice.ChoiceParameter
plugin =
" [email protected] " >
23
+ <name >paramA</name >
24
+ <description >Choose opion</description >
25
+ <randomName >choice-parameter-26751749888928</randomName >
26
+ <visibleItemCount >1</visibleItemCount >
27
+ <script class =" org.biouno.unochoice.model.GroovyScript" >
28
+ <
secureScript plugin =
" [email protected] _98a_4e95b_2d" >
29
+ <script >return [" AAA" ," BBB" ," CCC" ]</script >
30
+ <sandbox >true</sandbox >
31
+ <classpath />
32
+ </secureScript >
33
+ <
secureFallbackScript plugin =
" [email protected] _98a_4e95b_2d" >
34
+ <script >return[" ERROR paramA" ]</script >
35
+ <sandbox >true</sandbox >
36
+ <classpath />
37
+ </secureFallbackScript >
38
+ </script >
39
+ <choiceType >PT_SINGLE_SELECT</choiceType >
40
+ <filterable >true</filterable >
41
+ <filterLength >1</filterLength >
42
+ </org .biouno.unochoice.ChoiceParameter>
43
+ <
org .biouno.unochoice.CascadeChoiceParameter
plugin =
" [email protected] " >
44
+ <name >paramB</name >
45
+ <description >chose related option</description >
46
+ <randomName >choice-parameter-26751750130750</randomName >
47
+ <visibleItemCount >1</visibleItemCount >
48
+ <script class =" org.biouno.unochoice.model.GroovyScript" >
49
+ <
secureScript plugin =
" [email protected] _98a_4e95b_2d" >
50
+ <script >
51
+ if (paramA.equals(" AAA" )) {
52
+ return [" AAA-1" ," AAA-2" ," AAA-3" ]
53
+ }
54
+ else if (paramA.equals(" BBB" )) {
55
+ return [" BBB-1" ," BBB-2" ," BBB-3" ]
56
+ }
57
+ else if (paramA.equals(" CCC" )) {
58
+ return [" CCC-1" ," CCC-2" ," CCC-3" ]
59
+ }
60
+ else {
61
+ return [" UNK" ]
62
+ }
63
+ </script >
64
+ <sandbox >true</sandbox >
65
+ <classpath />
66
+ </secureScript >
67
+ <
secureFallbackScript plugin =
" [email protected] _98a_4e95b_2d" >
68
+ <script >return[" ERROR paramB" ]</script >
69
+ <sandbox >true</sandbox >
70
+ <classpath />
71
+ </secureFallbackScript >
72
+ </script >
73
+ <parameters class =" linked-hash-map" />
74
+ <referencedParameters >paramA</referencedParameters >
75
+ <choiceType >PT_RADIO</choiceType >
76
+ <filterable >false</filterable >
77
+ <filterLength >1</filterLength >
78
+ </org .biouno.unochoice.CascadeChoiceParameter>
79
+ </parameterDefinitions >
80
+ </hudson .model.ParametersDefinitionProperty>
81
+ </properties >
82
+ <
definition class =
" org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin =
" [email protected] _30" >
83
+ <script >#!groovy
84
+
85
+ properties([
86
+ parameters([
87
+ [
88
+ $class: ' ChoiceParameter' ,
89
+ choiceType: ' PT_SINGLE_SELECT' ,
90
+ description: ' Choose opion' ,
91
+ filterLength: 1,
92
+ filterable: true,
93
+ name: ' paramA' ,
94
+ script: [
95
+ $class: ' GroovyScript' ,
96
+ script: [
97
+ classpath: [],
98
+ sandbox: true,
99
+ script: ' return [" AAA" ," BBB" ," CCC" ]'
100
+ ],
101
+ fallbackScript: [
102
+ classpath: [],
103
+ sandbox: true,
104
+ script: ' return[" ERROR paramA" ]'
105
+ ]
106
+ ]
107
+ ],
108
+ [
109
+ $class: ' CascadeChoiceParameter' ,
110
+ choiceType: ' PT_RADIO' ,
111
+ description: ' chose related option' ,
112
+ filterLength: 1,
113
+ filterable: false,
114
+ name: ' paramB' ,
115
+ referencedParameters: ' paramA' ,
116
+ script: [
117
+ $class: ' GroovyScript' ,
118
+ script: [
119
+ classpath: [],
120
+ sandbox: true,
121
+ script: '''
122
+ if (paramA.equals(" AAA" )) {
123
+ return [" AAA-1" ," AAA-2" ," AAA-3" ]
124
+ }
125
+ else if (paramA.equals(" BBB" )) {
126
+ return [" BBB-1" ," BBB-2" ," BBB-3" ]
127
+ }
128
+ else if (paramA.equals(" CCC" )) {
129
+ return [" CCC-1" ," CCC-2" ," CCC-3" ]
130
+ }
131
+ else {
132
+ return [" UNK" ]
133
+ }
134
+ '''
135
+ ],
136
+ fallbackScript: [
137
+ classpath: [],
138
+ sandbox: true,
139
+ script: ' return[" ERROR paramB" ]'
140
+ ]
141
+ ]
142
+ ]
143
+ ])
144
+ ])
145
+
146
+ pipeline {
147
+ agent any
148
+
149
+ stages {
150
+ stage(' Params' ) {
151
+ steps {
152
+ echo " paramA: ${params.paramA}"
153
+ echo " paramB: ${params.paramB}"
154
+ }
155
+ }
156
+ }
157
+ }
158
+ </script >
159
+ <sandbox >true</sandbox >
160
+ </definition >
161
+ <triggers />
162
+ <disabled >false</disabled >
163
+ </flow-definition >
0 commit comments