问题
I am trying to run a Powershell script from a file in a Jenkins pipeline.
I have read this which shows how to run powershell scripts that are entered into the pipeline, but I can't get a script to run from a file.
I have tried:
powershell returnStatus: true, script: '-File build.ps1'
and various combinations but can't figure out how to do this.
回答1:
Figured it out soon after, the line should have read
powershell returnStatus: true, script: '.\\build.ps1'
来源:https://stackoverflow.com/questions/46726756/run-powershell-script-from-file-in-jenkins-pipeline