How can pass Hudson/Jenkins parameters to windows batch command

点点圈 提交于 2019-12-03 23:41:35
Madhan

Execute your Batch file as like the below

Deploy.cmd -configuration=%DEPLOYCONFIGURATION% -source=%DeploySource%

In case your Jenkins server run in unix/ Linux machine use "export" command to set environment variable for windows use "set" command like the below

For Windows:

set DEPLOYCONFIGURATION=DEV
set DeploySource=c:\myFolder

For Unix:

export DEPLOYCONFIGURATION = DEV
export DeploySource=c:\myFolder 

Hope it might solve your issue.

Thanks, Madhan

Use %DEPLOYCONFIGURATION% instead of ${DEPLOYCONFIGURATION} in windows batch command

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