forked from phaniprasad009/Ant-JavaProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
48 lines (29 loc) · 960 Bytes
/
Jenkinsfile
File metadata and controls
48 lines (29 loc) · 960 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
43
44
45
46
#!groovy
node {
currentBuild.result = "SUCCESS"
try {
stage('Checkout'){
checkout scm
}
stage('Sonar') {
//add stage sonar
sh 'mvn sonar:sonar'
}
stage('mail'){
mail body: 'project build successful',
from: 'devopstrainingblr@gmail.com',
replyTo: 'mithunreddytechnologies@gmail.com',
subject: 'project build successful',
to: 'mithunreddytechnologies@gmail.com'
}
}
catch (err) {
currentBuild.result = "FAILURE"
mail body: "project build error is here: ${env.BUILD_URL}" ,
from: 'devopstrainingblr@gmail.com',
replyTo: 'mithunreddytechnologies@gmail.com',
subject: 'project build failed',
to: 'mithunreddytechnologies@gmail.com'
throw err
}
}