diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..73139373 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,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 + """ + } + } + } + } + } diff --git a/webapp/src/main/webapp/index.jsp b/webapp/src/main/webapp/index.jsp index b93fc246..3d025f92 100644 --- a/webapp/src/main/webapp/index.jsp +++ b/webapp/src/main/webapp/index.jsp @@ -1,5 +1,4 @@