Jenkins 工作流程:如何获取或设置步骤 ID [英] Jenkins Workflow: How to get or set step id
问题描述
我们想引用 Jenkins 工作流的并行任务中的一个步骤.但似乎对于多个并行任务中的步骤,步骤 ID 的创建是不确定的.对于输入步骤,可以手动指定步骤 ID.是否可以为 shell 步骤指定步骤 id 或查询步骤 id?
We would like to reference a step inside a parallel task of a Jenkins workflow. But it seems that step IDs are created non deterministic for steps in multiple parallel tasks. For a input step it is possible to manually specify the step id. Is it either possible to specify a step id for a shell step or query the step id?
目的是我们希望在并行任务中创建一个指向 shell 脚本的链接.
The purpose is that we would like to create a link to a shell script inside a parallel task.
推荐答案
实际上,步骤 ID 通常无法提前预测.你想链接到它的日志吗,比如 这个?我对用例并不完全清楚.
Indeed step IDs are not in general predictable in advance. Do you want to link to its log, like this? I am not entirely clear about the use case.
最接近的现有 RFE 是 JENKINS-28119.
The closest existing RFE would be JENKINS-28119.
这篇关于Jenkins 工作流程:如何获取或设置步骤 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!