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