-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_Dec2023
44 lines (40 loc) · 1.47 KB
/
Jenkinsfile_Dec2023
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
node{
def mavenHome = tool name: 'maven 3.9.8'
stage('1.clonecode'){
git "https://github.com/smith0037/paypal34.git"
}
stage('2.mavenBuild'){
sh "${mavenHome}/bin/mvn package"
}
stage('3.codeQualityAnalysis'){
sh "${mavenHome}/bin/mvn sonar:sonar"
}
stage('4.uploadArtifacts'){
sh "${mavenHome}/bin/mvn deploy"
}
stage('5.deploy2UAT'){
deploy adapters: [tomcat9(credentialsId: 'tomcat-credential', path: '', url: 'http://18.221.147.55:8080/')], contextPath: null, war: 'target/*war'
}
stage('6.ManualApproval'){
sh " echo 'Please review & approve' "
timeout(time:300, unit:'MINUTES')
{
input message: 'Application ready for deployment, Please review and approve'
}
}
stage('7.deploy2prod'){
//use deploy to container plugin
deploy adapters: [tomcat9(credentialsId: 'tomcat-credential', path: '', url: 'http://18.221.147.55:8080/')], contextPath: null, war: 'target/*war'
}
stage('8.apm'){
sh "echo 'monitoring and observation and alerting' "
sh "echo 'application performance Monitoring in progress' "
}
stage('9.notification'){
sh "echo create email notification to resolve any issue that may arise"
//use pipeline syntax and email notification plugin to achieve this
emailext body: '''The build and Deployment status for tesla-webapp.
Regards,
Kentech solutions''', recipientProviders: [contributor(), developers()], subject: 'project', to: '[email protected]'
}
}