forked from DEVOPSA12/web-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjks
51 lines (42 loc) · 1.08 KB
/
jks
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
pipeline{
agent any
tools {maven "maven3.8.4" }
//triggers {
// pollSCM '* * * * *'
// }
stages{
stage ('1.GitClone'){steps{
git credentialsId: 'GithubCredentials', url: 'https://github.com/Ndolino/web-app'
}}
stage ('2.Build'){steps{
sh "mvn clean package"
}}
stage ('3.CodeQuality'){steps{
sh "mvn sonar:sonar"
}}
stage ('4.uploadsArtifacts'){steps{
sh "mvn deploy"
}}
stage ('4.Deploy'){steps{
sshagent(['2f836cfe-c2e5-4a99-a1ab-627ca444e650']) {
sh "scp -o StrictHostKeyChecking=no target/*war [email protected]:/opt/tomcat9/webapps"
}}
}
}
post{
always {mail bcc: '', body: '''Build Done!
Regards.
Decisoft''', cc: '[email protected]', from: '', replyTo: '', subject: 'Build Done', to: '[email protected]'
}
failure{
mail bcc: '', body: '''Build Failed!
Regards.
Decisoft''', cc: '[email protected]', from: '', replyTo: '', subject: 'Build Failed', to: '[email protected]'
}
success{
mail bcc: '', body: '''Build successful!
Regards.
Decisoft''', cc: '[email protected]', from: '', replyTo: '', subject: 'Build Sucess', to: '[email protected]'
}
}
}