Skip to content

Commit ea4fc4f

Browse files
Update Jenkinsfile
1 parent d5017e2 commit ea4fc4f

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

Jenkinsfile

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1-
node {
2-
checkout scm
3-
}
1+
#!groovy
2+
3+
node('node') {
4+
5+
6+
currentBuild.result = "SUCCESS"
7+
8+
try {
9+
10+
stage('Checkout'){
11+
12+
checkout scm
13+
}
14+
15+
16+
17+
stage('mail'){
18+
19+
20+
mail body: 'project build successful',
21+
22+
replyTo: '[email protected]',
23+
subject: 'project build successful',
24+
25+
}
26+
27+
28+
29+
}
30+
catch (err) {
31+
32+
currentBuild.result = "FAILURE"
33+
34+
mail body: "project build error is here: ${env.BUILD_URL}" ,
35+
36+
replyTo: '[email protected]',
37+
subject: 'project build failed',
38+
39+
40+
throw err
41+
}
42+
43+

0 commit comments

Comments
 (0)