forked from honeysundar/java_application
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
31 lines (26 loc) · 816 Bytes
/
Jenkinsfile
File metadata and controls
31 lines (26 loc) · 816 Bytes
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
pipeline {
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build') {
steps {
echo 'Building..'
sh 'mvn package'
}
}
stage('Deploy') {
steps {
sh 'sudo yum update -y'
sh 'sudo yum install tomcat8 -y'
sh 'sudo yum install tomcat8-admin -y'
sh 'sudo yum install tomcat8-user -y'
sh 'sudo cp /home/centos/workspace/app_deploy/target/grants.war /var/lib/tomcat8/webapps/'
sh 'sudo cp /home/centos/workspace/app_deploy/tomcat-users.xml /etc/tomcat8/'
sh 'sudo systemctl restart tomcat8'
}
}
}
}