-
Notifications
You must be signed in to change notification settings - Fork 0
/
NewDeclarativePipeline
44 lines (42 loc) · 1.17 KB
/
NewDeclarativePipeline
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
pipeline
{
agent any
stages
{
stage('ContinuousDownload')
{
steps
{
script
{
try
{
git 'https://github.com/selenium-saikrishna/maven.git'
}
catch(Exception e)
{
mail bcc: '', body: 'Jenkins is unable to download from git hub', cc: '', from: '', replyTo: '', subject: 'Jenkins facing isse with Git', to: '[email protected]'
exit(1)
}
}
}
}
stage('ContinuousBuild')
{
steps
{
script
{
try
{
sh label: '', script: 'mvn package'
}
catch(Exception e)
{
mail bcc: '', body: 'Jenkins is unable to create an artifact', cc: '', from: '', replyTo: '', subject: 'Build issue', to: '[email protected]'
}
}
}
}
}
}