-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile8
More file actions
42 lines (42 loc) · 831 Bytes
/
Jenkinsfile8
File metadata and controls
42 lines (42 loc) · 831 Bytes
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
39
40
41
42
pipeline{
agent any
environment {
bnch = "${BRANCH_NAME}"
id = "${JOB_BASE_NAME}"
}
parameters {
booleanParam (description: 'OS', name: 'OsBuild')
choice (choices: ['UAT', 'SIT', 'DEV'], description: 'Build Environment ', name: 'Env')
string (defaultValue: 'Demo', description: 'NameOfJob', name: 'JobName')
}
stages{
stage("Test"){
steps{
echo "Hello Testing"
echo "${id}"
}
}
stage("Test1"){
steps{
script{
if (params.Env == 'UAT'){
echo params.Env
}
else {
echo "Not If "
}
}
}
}
stage("Branch Wise Test"){
when {
expression {
"${bnch}" == "master"
}
}
steps{
echo "Hello Master"
}
}
}
}