Hi,
I have a large build & deploy pipeline with some stages, running on different nodes. I´m using stash/unstash for transfering the files (sources) between the nodes
- but how do I share the artifacts of the local M2 repository so dependencies can be resolved properly?
node(..) {
..
stage("Build") {
// build it
sh("mvn clean install....")
}
..
stash ( name: 'workspace', useDefaultExcludes: false, excludes: "**/target/**/*.class, **/target/surefire-reports/**")
}
node(..) {
..
stage("Deploy") {
sh("deploy.sh.....")
}
..
}
node(..) {
unstash( name: 'workspace')
stage("Test") {
..
sh("mvn test -Pit..")
..
}
}
Is there a way (without declarative pipeline) to "reuse" the same node like before? Or do I have to stash/unstash the local repo or parts of it, too?
Any other ideas ?
Thanx for your responses,
Torsten