简体   繁体   中英

How to pass file as parameter to jenkins from different machines

I want to pass File as parameter in Jenkins. I would like to trigger the Jenkins build from remote machine and upload the file from remote machine and I am expecting Jenkins to pick the file from same machine.

But, when I tried to upload a file remote machines, it is always look up to Jenknins WorkSpace instead of taking uploaded file from remote machine.

Is there any way to configure Jenkins, it has to take same file which I have uploaded from remote machine?

I want to upload my testng.xml file from remote machines to run the scripts.

Screenshot1

Screenshot2

Simply putting the file name of your file in the parameter won't lead to its usage during execution. It will just copy it in current directory of workspace and could be ignored during your build.

In the File location parameter, specify the relative path where you want to place this file so that it can used as intended.

Update your configuration as follows: 相对路径

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM