Jekins sh label: Arguments to "sh" must be explicitly named
Asked Answered
C

1

4

I'm aware of Jenkins Pipeline sh display name/label

But when using

sh "echo foo", label: "my step"

I'll get the following error:

Arguments to "sh" must be explicitly named

I made sure to have Pipeline: Nodes and Processes v2.28 installed and I'm using a declarative pipeline.

Cabbala answered 20/2, 2019 at 13:17 Comment(0)
C
6

I found it out myself, it must be:

sh script: "echo foo", label: "my step"
Cabbala answered 20/2, 2019 at 13:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.