Skip to content

Commit f785da2

Browse files
authored
Create PARAMETERS_PIPELINE
1 parent 1701444 commit f785da2

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

JENKINS/PARAMETERS_PIPELINE

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Parameters, Declarative Pipeline
2+
pipeline {
3+
agent any
4+
parameters {
5+
string(name: 'PERSON', defaultValue: 'Mr Jenkins', description: 'Who should I say hello to?')
6+
7+
text(name: 'BIOGRAPHY', defaultValue: '', description: 'Enter some information about the person')
8+
9+
booleanParam(name: 'TOGGLE', defaultValue: true, description: 'Toggle this value')
10+
11+
choice(name: 'CHOICE', choices: ['One', 'Two', 'Three'], description: 'Pick something')
12+
13+
password(name: 'PASSWORD', defaultValue: 'SECRET', description: 'Enter a password')
14+
}
15+
stages {
16+
stage('Example') {
17+
steps {
18+
echo "Hello ${params.PERSON}"
19+
20+
echo "Biography: ${params.BIOGRAPHY}"
21+
22+
echo "Toggle: ${params.TOGGLE}"
23+
24+
echo "Choice: ${params.CHOICE}"
25+
26+
echo "Password: ${params.PASSWORD}"
27+
}
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)