forked from fatimatabassum05/simple-java-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsVars
More file actions
34 lines (33 loc) · 785 Bytes
/
JenkinsVars
File metadata and controls
34 lines (33 loc) · 785 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
pipeline {
agent any
environment {
name='ArtisanTek'
}
stages {
stage('Variable-Toplevel') {
environment {
place='Bangaluru'
}
steps {
echo "Job ${env.JOB_NAME} is running on ${env.JENKINS_URL} and having build no: ${env.BUILD_ID}"
echo "Name is: ${name}"
echo "Place is: ${place}"
}
}
stage('Variable-Stagelevel') {
steps {
echo "Job ${env.JOB_NAME} is running on ${env.JENKINS_URL} and having build no: ${env.BUILD_ID}"
echo "Name is: ${name}"
}
}
}
post {
always {
emailext (
subject: "Build Notification",
body: "Job ${env.JOB_NAME} is running on ${env.JENKINS_URL} and having build no: ${env.BUILD_ID}",
to: '[email protected]'
)
}
}
}