简体   繁体   中英

Parameterized build Jenkins

I have configured a job in Jenkins and checked "This build is parameterized" option. The parameter name I have given is "My_Param". The Jenkins is installed in the server machine. So I access the Jenkins dashboard through http://<servername>:8080/ In the Build part, I have to call a script by opening cygwin. So I write

#!C:\cygwin\bin\bash --login -i
./build/myscript.sh -full

After the build is completed, I want to move the files to another new directory prefix with Output, This directory name is the parameter I intend to pass. so I write

mkdir /cygdrive/c/users/admin/Ouput$My_Param

I run the build and pass param as first But, the directory is created as Output in the server machine and not as Outputfirst

Since you noted you use cygwin, I understand the server is on windows.

Try parameter windows style environment variable: %My_Param% or linux: ${My_Param}

I hope this helps.

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