我有一个工作管道,如下图所示,但是它不能在阶段上工作。有什么办法可以把它变成图形模式,我的意思是像管道中的阶段性步骤?
def nodes = ['node1','node2', 'node3']
for (int i = 0; i < nodes.size(); i++) {
step1(nodes[i])
step2(nodes[i])
step3(nodes[i])
}
def step1(node) {
echo 'in function, calling job on node ' + node
}
def step2(node) {
echo 'in function, calling job on node ' + node
}
def step3(node) {
echo 'in function, calling job on node ' + node
}
这是一个非常基本的功能问题。
我不想重复现有资源中的信息,就像在SO上一样,我只想提供一些链接。
Jenkins教程介绍如何实现这一点。https:/www.jenkins.iodocbookpipeline#stage
"Stage "dsl命令的流水线步骤参考。https:/www.jenkins.iodocpipelinestepspipeline-stage-step
如果需要的话,请在阅读完这些材料后澄清你的问题。谢谢。