forked from akshu20791/DevOpsClassCodes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsFile1
More file actions
37 lines (30 loc) · 723 Bytes
/
JenkinsFile1
File metadata and controls
37 lines (30 loc) · 723 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
33
34
35
36
37
pipeline{
agent any
// tools{
// maven "test-maven"
// }
stages{
stage('Checkout'){
steps{
echo 'cloning..'
git 'https://github.com/akshu20791/DevOpsClassCodes.git'
}
}
stage('Compile'){
steps{
echo 'compiling..'
sh 'mvn compile'
}
}
stage('Package'){
steps{
sh 'mvn package'
}
}
stage('deploy'){
steps{
sh 'sudo cp -f /var/lib/jenkins/workspace/project/target/*.war /opt/tomcat/apache-tomcat-8.5.93/webapps/'
}
}
}
}