
Workarond 1 – Try to use stash/unstash, but it is bad for large files.
[code]node(‘master’) {
dir(‘/path/on/master/1’) {
stash ‘master-stuff’
}
}
node(‘slave’) {
dir(‘/path/on/slave/1’) {
unstash ‘master-stuff’
}
dir(‘/path/on/slave/2’) {
stash ‘slave-stuff’
}
}
node(‘master’) {
dir(‘/path/on/master/2’) {
unstash ‘slave-stuff’
}
} [/code]
Read more about stash & unstash
https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#stash-stash-some-files-to-be-used-later-in-the-build
https://jenkins.io/doc/pipeline/examples/#unstash-different-dir
Workaround 2 – Try External Workspace Manager Plugin. It has pipelines steps and is good for large files.
Workaround 3 – Try to use intermediate storage. archive() and sh(“wget $url”) will be helpful.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals