-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipelinescript
33 lines (33 loc) · 1 KB
/
pipelinescript
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
pipeline {
agent {label 'main'}
parameters {
choice(choices: ['ONE', 'TWO', 'THREE', 'FOUR', 'FIVE'], name: 'CHOCIE_Param')
booleanParam(defaultValue: true, description: '', name: 'BOOLEAN')
text(defaultValue: '''default value for Multi Line''', name: 'MULTI_LINE_STRING')
booleanParam(defaultValue: true, description: 'Description of the Job', name: 'Update_Param')
string(defaultValue: 'Siva AWS #$@!%', name: 'STRING_PARAMETER', trim: true)
}
environment { SERVICE_CREDS = 'ABC' }
stages {
stage('1st Stage'){
steps {
echo "My Env command $SERVICE_CREDS"
println('My 1st Step command')
}
}
stage('2nd Stage'){
steps{
println('Hello CHOCIE-Param!! ' + CHOCIE_Param)
println("Hello MULTI-LINE-STRING!! ${MULTI_LINE_STRING}")
println('Hello STRING-PARAMETER!! ' + STRING_PARAMETER)
}
}
stage('3rd Stage'){
steps {
script {
sh"echo My Env command $SERVICE_CREDS"
}
}
}
}
}