We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2174e7c commit 6d980feCopy full SHA for 6d980fe
1 file changed
jenkins
@@ -0,0 +1,28 @@
1
+pipeline{
2
+ agent any
3
+ stages{
4
+ stage("Git Checkout"){
5
+ steps{
6
+ git credentialsId: 'github', url: 'https://github.com/aditya-malviya/myweb.git'
7
+ }
8
9
+ stage("Maven Build"){
10
11
+ sh "mvn clean package"
12
+ sh "mv target/*.war target/myweb.war"
13
14
15
+ stage("deploy-dev"){
16
17
+ sshagent(['tomcat-dev1']) {
18
+ sh """
19
+ scp -o StrictHostKeyChecking=no target/myweb.war
20
+ ubuntu@yourip:/opt/tomcat/webapps/
21
+ ssh ubuntu@yourip /opt/tomcat/bin/shutdown.sh
22
+ ssh ubuntu@yourip /opt/tomcat/bin/startup.sh
23
+ """
24
25
26
27
28
0 commit comments