Skip to content

Commit 81f6702

Browse files
Update Jenkinsfile
1 parent 143259b commit 81f6702

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎Jenkinsfile‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@ pipeline{
33
stages{
44
stage("Git Checkout"){
55
steps{
6-
git credentialsId: 'github', url: 'https://github.com/sree141/SaiJavaCode.git'
6+
git credentialsId: 'github', url: 'https://github.com/maniumjayaraj/SaiJavaCode.git'
77
}
88
}
99
stage("Maven Build"){
1010
steps{
11-
sh "/opt/apache-maven-3.8.3/bin/mvn package"
11+
sh "/opt/maven/bin/mvn package"
12+
sh "mv target/*.war target/myweb.war"
1213
}
1314
}
1415
stage("deploy-dev"){
1516
steps{
16-
sshagent(['3.82.186.105']) {
17+
sshagent(['3.6.41.252']) {
1718
sh """
18-
scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/sree55/webapp/target/webapp.war ubuntu@3.82.186.105:/opt/apache-tomcat-9.0.54/webapps
19-
ssh ubuntu@3.82.186.105 /opt/apache-tomcat-9.0.54/bin/shutdown.sh
20-
ssh ubuntu@3.82.186.105 /opt/apache-tomcat-9.0.54/bin/startup.sh
19+
scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/jai/webapp/target/webapp.war ec2-user@3.6.41.252:/opt/apache-tomcat-9.0.54/webapps
20+
ssh ec2-user@3.6.41.252 /tomcat/bin/shutdown.sh
21+
ssh ec2-user@3.6.41.252 /tomcat/bin/startup.sh
2122
"""
2223
}
2324
}

0 commit comments

Comments
 (0)