forked from Hari25cs/SaiJavaCode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
26 lines (26 loc) · 718 Bytes
/
Jenkinsfile
File metadata and controls
26 lines (26 loc) · 718 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
pipeline{
agent any
stages{
stage("Git Checkout"){
steps{
git credentialsId: 'github', url: 'https://github.com/maniumjayaraj/SaiJavaCode.git'
}
}
stage("Maven Build"){
steps{
sh "/opt/maven/bin/mvn package"
}
}
stage("deploy-dev"){
steps{
sshagent(['3.6.41.252']) {
sh """
scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/jai/webapp/target/webapp.war ec2-user@3.6.41.252:/tomcat/webapps
ssh ec2-user@3.6.41.252 /tomcat/bin/shutdown.sh
ssh ec2-user@3.6.41.252 /tomcat/bin/startup.sh
"""
}
}
}
}
}