forked from reachlaks/java-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
40 lines (32 loc) · 988 Bytes
/
Jenkinsfile
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
27
28
29
30
31
32
33
34
35
36
37
38
39
pipeline {
agent any
tools {
maven 'M3'
}
stages {
stage ('checkout') {
steps {
checkout scm
}
}
stage ('Build') {
steps {
sh '${m2_home}/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/M3/bin/mvn -f java-sample-app/pom.xml clean install'
}
}
// stage ('Deploy') {
// steps {
// sh 'ssh -o StrictHostKeyChecking=no root@puporigin.zippyops.com uptime'
// sh 'ssh root@puporigin.zippyops.com -l -o "PubkeyAuthentication=no"'
// sh 'PermitRootLogin yes'
// sh 'scp /var/lib/jenkins/workspace/whattodo/java-sample-app/target/java-sample-app-1.0.0.war root@puporigin.zippyops.com:/opt/tomcat/webapps'
// sh 'puppet agent -t'
// }
// }
// stage ('change values') {
// steps {
// sh 'puppet agent -t'
// }
// }
}
}