-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparametercode
38 lines (24 loc) · 989 Bytes
/
parametercode
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
pipeline {
agent {
label 'docker-slave-demo'
}
parameters {
string(name: 'NAME', description: 'Please tell me your name?')
text(name: 'DESC', description: 'Describe about the job details')
booleanParam(name: 'SKIP_TEST', description: 'Want to skip running Test cases?')
choice(name: 'BRANCH', choices: ['Master', 'Dev'], description: 'Choose branch')
password(name: 'SONAR_SERVER_PWD', description: 'Enter SONAR password')
}
stages {
stage('Printing Parameters') {
steps {
echo params.NAME
echo "Hello ${params.NAME}"
echo "Job Details: ${params.DESC}"
echo "Skip Running Test case ?: ${params.SKIP_TEST}"
echo "Branch Choice: ${params.BRANCH}"
echo "SONAR Password: ${params.SONAR_SERVER_PWD}"
}
}
}
}