Skip to content

Commit a32189d

Browse files
authored
Update Jenkinsfile.buildAndDeploy
1 parent 7c72923 commit a32189d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: Jenkinsfile.buildAndDeploy

+9-3
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ pipeline {
1919
}
2020
}
2121

22+
stage ('Start Web Server')
23+
{
24+
steps {
25+
sh 'bash /home/appsec/prod/apache-tomcat-8.5.39/bin/startup.sh'
26+
}
27+
}
28+
2229
stage ('Deploy-To-Tomcat') {
2330
steps {
24-
sshagent(['tomcat']) {
25-
sh 'scp -o StrictHostKeyChecking=no target/*.war [email protected]:/home/ubuntu/prod/apache-tomcat-8.5.39/webapps/webapp.war'
26-
}
31+
sh 'cp /var/lib/jenkins/workspace/webapp-build-deploy-pipeline/target/WebApp.war /home/appsec/prod/apache-tomcat-8.5.39/webapps/webapp.war'
32+
2733
}
2834
}
2935
}

0 commit comments

Comments
 (0)