Jekins sh 标签:“sh”的参数必须明确命名

Nil*_*ils 4 jenkins jenkins-blueocean

我知道Jenkins Pipeline sh 显示名称/标签

但使用时

sh "echo foo", label: "my step"
Run Code Online (Sandbox Code Playgroud)

我会收到以下错误:

Arguments to "sh" must be explicitly named
Run Code Online (Sandbox Code Playgroud)

我确保安装了 Pipeline: Nodes and Processes v2.28 并且我正在使用声明性管道。

Nil*_*ils 6

我自己发现了,一定是:

sh script: "echo foo", label: "my step"
Run Code Online (Sandbox Code Playgroud)