forked from Landmark-Technologies/maven-web-application
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
Jenkinsfile_March2023
36 lines (34 loc) · 1.14 KB
/
Jenkinsfile_March2023
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
node{
def mavenHome = tool name: 'maven3.9.1'
stage('1.CodeClone'){
git credentialsId: 'gitHubCredentials', url: 'https://github.com/LandmakTechnology/maven-web-application'
}
stage('2MavenBuild'){
sh "${mavenHome}/bin/mvn package"
}
/*
stage('3codeQuality'){
sh "${mavenHome}/bin/mvn sonar:sonar"
}
stage('4UploadArtifacts'){
sh "${mavenHome}/bin/mvn deploy"
}
stage('5deploy2UAT'){
deploy adapters: [tomcat9(credentialsId: 'tomcat-credentials', path: '', url: 'http://100.26.217.86:8080/')], contextPath: null, war: 'target/*war'
}
stage('6Manualapproval'){
sh "echo 'ready for review' "
timeout(time:5, unit:'HOURS') {
input message: 'Application ready for deployment, Please review and approve'
}
}
stage('7deploy2Prod'){
deploy adapters: [tomcat9(credentialsId: 'tomcat-credentials', path: '', url: 'http://100.26.217.86:8080/')], contextPath: null, war: 'target/*war'
}
stage('8emailNotify'){
emailext body: '''Hello Team,
Build is done.
LANDMARKTECH''', recipientProviders: [developers(), contributor(), upstreamDevelopers()], subject: 'Build Status', to: '[email protected]'
}
*/
}