in my CI infrastrucure i have a jenkins master running as a container and 2 slaves (vms) . i try to run a build inside a docker container on a node so during the build process i was stashed my target folder to use it later on other node . in the job's log i can see that the folder stashed succefully. when the build was finished the container is automatically destroyed then in the next step i unstash that folder to acheive another stages in separate node but nothings happened.. seems like unstash didn't anything.
plz how can i transfer my target from the container to another node or even to the master???
this my pipeline code :
node('docker') {
stage('Checkout Code') {
checkout scm
}
stage('Build') {
withMaven( jdk: 'jdk_8', maven: 'maven 3') {
mvn 'clean install'
stash name: 'war', includes: 'x.war'
}
}
node('master') {
stage('test') {
withMaven( jdk: 'jdk_8', maven: 'maven 3') {
unstash : 'war'
sh 'mvn clean test'
}
}
}
}