forked from LandmakTechnology/tesla-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
33 lines (31 loc) · 1.16 KB
/
Jenkinsfile
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
node{ def MavenHome = tool name: 'Maven3.8.6'
stage('clonecode'){
git "https://github.com/Olubusuyi/tesla-app.git"
}
stage('test&build'){
sh " ${MavenHome}/bin/mvn clean package"
}
stage('CodeQaulitytest'){
sh " ${MavenHome}/bin/mvn sonar:sonar"
}
stage('deployartifacts'){
sh " ${MavenHome}/bin/mvn deploy"
}
stage('deploytoUAT'){
sh "echo 'deploy to UAT' "
deploy adapters: [tomcat9(credentialsId: 'tomcatcredaABC', path: '', url: 'http://54.177.121.14:8080/')], contextPath: null, war: 'target/*war'
}
stage('approvalgate'){
sh "echo 'ready for prod' "
timeout(time:1, unit:"MINUTES"){
input message: 'Application ready for deployment,please review and approve'}
}
stage('deploy'){
deploy adapters: [tomcat9(credentialsId: 'tomcatcredaABC', path: '', url: 'http://54.177.121.14:8080/')], contextPath: null, war: 'target/*war'
}
stage('emailnotification'){
emailext body: '''Dear All,
Check Build Status
Glo''', recipientProviders: [requestor()], subject: 'Build Status', to: '[email protected]'
}
}