0

Why does this work :

powershell returnStatus: true, script: ".\\runCCMGeneric.ps1"

but this doesn't

powershell returnStatus: true, script: ".\\runCCMGeneric.ps1 HMLTCCM HMLSJARI load SystemTest multiple HMLTCCM getPatches"

What syntax should I be using to call a PoSh script with multiple parameters from a Jenkins pipeline?

Thanks

1 Answer 1

1

within the pipeline, you have to use tripple quotes to make the arguments work.

powershell returnStatus: true, script: """
       .\\runCCMGeneric.ps1 HMLTCCM HMLSJARI load SystemTest multiple HMLTCCM getPatches
"""

if arguments are values from pipeline parameters, you will need to use $env:HMLTCCM etc.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Jawad, that's got me sorted

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.