forked from MithunTechnologiesDevOps/maven-web-application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinspipelineDW
73 lines (54 loc) · 1.16 KB
/
JenkinspipelineDW
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
pipeline{
agent any;
tools{
maven 'maven3.6.3'
}
options{
timestamps()
}
stages{
stage('CheckOutCode'){
steps{
git branch: 'development', credentialsId: '347c3760-8e63-4289-9fe9-0a03f8442491', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git'
}
}
stage('Build'){
steps{
sh "mvn clean package"
}
}
/*
stage('ExecuteSonarQubeReport'){
steps{
sh "mvn sonar:sonar"
}
}
stage('UploadArtifactsIntoNexus'){
steps{
sh "mvn deploy"
}
}
stage('DeployAppIntoTomcatServer'){
steps{
sshagent(['a2b944b0-d466-4676-8997-3658e2ab4fca']) {
sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war [email protected]:/opt/apache-tomcat-9.0.41/webapps/"
}
}
}
*/
}
post{
success{
mail body: '''Build Over!.. Success
Regards,
Mithun Technologies,
9980923226''', subject: 'Build Over...Successfull', to: '[email protected]'
}
failure{
mail body: '''Build Over!.. Failed
Regards,
Mithun Technologies,
9980923226''', subject: 'Build Over...Failed', to: '[email protected]'
}
}
}