我正在尝试将现有的Jenkins构建作业移动到单个Jenkins 2管道,并想知道是否可以在构建中将文件从一个节点复制到另一个节点 . 我的想法是:
Node A (Windows)
Checkout scm
Execute ant build
Archive artifact (or whatever required action)
Node B (Unix)
Checkout scm
Copy build artifact from node A --> is this possible ?
Execute ant build
Then followed by tests...
我似乎工作正常,所以我可以在管道中间复制文件,或者如果我必须继续使用当前的构建体系结构(使用copy artifact plugin,但使用完全独立的构建作业) .
1 回答
是的,这可以使用stash / unstash步骤 .
有关这方面的教程也可以在Jenkins Blog中找到(专注于并行执行):