File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ pipeline {
33 stages {
44 stage(' Build on Master' ) {
55 agent { label ' built-in' }
6- tools { git ' Default ' ; maven ' MAVEN' }
6+ tools { maven ' MAVEN' }
77 steps {
8+ // Only build if source is already available; skip checkout on master
89 bat " mvn clean package"
910 stash includes : ' target/*.jar' , name : ' myAppJar'
1011 }
@@ -16,6 +17,7 @@ pipeline {
1617 agent { label ' server1' }
1718 tools { git ' LinuxGit' }
1819 steps {
20+ git url : ' https://github.com/pavan203/simple-java-maven-app.git' , branch : ' master'
1921 unstash ' myAppJar'
2022 sh " java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App"
2123 }
@@ -24,6 +26,7 @@ pipeline {
2426 agent { label ' server2' }
2527 tools { git ' LinuxGit' }
2628 steps {
29+ git url : ' https://github.com/pavan203/simple-java-maven-app.git' , branch : ' master'
2730 unstash ' myAppJar'
2831 sh " java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App"
2932 }
You can’t perform that action at this time.
0 commit comments