forked from Sonal0409/DevOps_ClassNotes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParametersPipeline
More file actions
38 lines (37 loc) · 1.41 KB
/
ParametersPipeline
File metadata and controls
38 lines (37 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
pipeline {
agent any
stages {
stage('Setup parameters') {
steps {
script {
properties([
parameters([
choice(
choices: ['ONE', 'TWO'],
name: 'PARAMETER_01'
),
booleanParam(
defaultValue: true,
description: '',
name: 'BOOLEAN'
),
text(
defaultValue: '''
this is a multi-line
string parameter example
''',
name: 'MULTI-LINE-STRING'
),
string(
defaultValue: 'scriptcrunch',
name: 'STRING-PARAMETER',
trim: true
)
])
])
}
}
}
}
}
The parameters specified in the Jenkinsfile will appear in the job only after the first run. Your first job run will fail as you will not be able to provide the parameter value through the job.