forked from JOMACS-IT/web-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jenkins
34 lines (34 loc) · 1008 Bytes
/
jenkins
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
//scripted
node(""){
def MHD = tool name: "maven3.8.6"
stage('GitClone'){
sh "echo this is git clone"
git credentialsId: 'Github-Cred', url: 'https://github.com/jomacs-it/web-app.git'
}
stage('Build'){
sh "echo start of build process"
sh "${MHD}/bin/mvn package"
}
stage('CodeQuality'){
sh "echo performing SonarQube Test"
//sh "${MHD}/bin/mvn sonar:sonar"
}
stage('BackupArtifacts'){
sh "echo backup to Nexus"
sh "${MHD}/bin/mvn deploy"
}
stage('DeploytoStaging'){
sh "echo Deploy to Tomcat server"
deploy adapters: [tomcat9(credentialsId: 'Tomcat-cred', path: '', url: 'http://54.196.234.205:7000/')], contextPath: null, war: 'target/*war'
}
stage('Approval'){
sh "echo approval for Jenkins-file-app"
timeout(time:5, UNIT:'DAYS'){
input message:'Approval for Prod'
}
}
stage('DeploytoProd'){
sh "echo Deploy to Tomcat server"
deploy adapters: [tomcat9(credentialsId: 'Tomcat-cred', path: '', url: 'http://54.196.234.205:7000/')], contextPath: null, war: 'target/*war'
}
}