forked from tongueroo/demo-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
31 lines (30 loc) · 995 Bytes
/
Jenkinsfile
File metadata and controls
31 lines (30 loc) · 995 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 {
agent any
tools{
maven 'local_maven'
}
stages {
stage('Checkout') {
steps {
git branch: 'master', credentialsId: 'github', url: 'https://github.com/shashi26g/demo-java.git'
}
}
stage('Build') {
steps {
sh 'mvn clean package'
}
}
stage('Push') {
steps {
echo 'This is Push Stage'
}
}
stage('Deploy') {
steps {
sshagent(['tomcat']){
sh 'rsync /var/lib/jenkins/workspace/deploy_tomcat/target/*.war [email protected]:/opt/tomcat/apache-tomcat-9.0.87/webapps/'
}
}
}
}
}