我在我的管道中使用stash \ unstash,并且想知道你可以在多个阶段中解冻吗?
例如:
stage('One') {
steps {
echo 'Stage one...'
stash includes: 'dist/**/*', name: 'builtSources'
dir('/some-dir/deploy') {
unstash 'builtSources'
}
}
}
stage('Two') {
steps {
echo 'Stage two...'
node('OtherNode') {
dir('/some-other-dir/deploy') {
unstash 'builtSources'
}
}
}
}
那么我可以在任何一个阶段中,在以下任何一个阶段中,多次检索一个藏匿物?
答案 0 :(得分:2)
是的,你绝对可以在多个阶段多次解冻文件,并充分利用它。