I'm trying to run the npm-script from the Jenkins pipeline via the SAP Project Piper's npmExecuteScripts
:
npmExecuteScripts:
runScripts: ["testScript"]
That works! Now, I want to pass some arguments to my script.
According to the Project Piper documentation, there is a property scriptOptions
, which cares about passing arguments to the called script:
Options are passed to all runScripts calls separated by a
--
../piper npmExecuteScripts --runScripts ci-e2e --scriptOptions
--tag1
will correspond tonpm run ci-e2e -- --tag1
Unfortunately, I can't figure out what is the proper syntax for that command.
I've tried several combinations of using scriptOptions
, e.g.:
scriptOptions: ["myArg"]
scriptOptions: ["myArg=myVal"]
and many others, but still no desired outcome!
How can I call an npm-script and pass arguments / parameters to the script using the Project Piper's npmExecuteScripts
?