Run Powershell script from file in Jenkins pipeline

你说的曾经没有我的故事 提交于 2019-12-09 13:33:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!