Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jekins sh label: Arguments to "sh" must be explicitly named

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.

like image 448
Nils Avatar asked Oct 15 '25 03:10

Nils


1 Answers

I found it out myself, it must be:

sh script: "echo foo", label: "my step"
like image 60
Nils Avatar answered Oct 18 '25 22:10

Nils



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!