|
Hello. I just installed copy artifact plugin on my hudson server but
somehow it did not work out as what I want it to be.
Here is what I want my hudson job do with all the setups:
1. Set up in Hudson for Copy Artifact input parameter %MyInputA% to
choose build # from Job A.
Same thing for %MyInputB% for Job B, %MyInputC% for Job C.
When user enter "0" for build number in Job B and C, do not upload
package from B and C.
2. Set up copy artifact build jobs respectively, using MyInputA,
MyInputB, and MyInputB as parameters.
3. In my batch job I put it as follows
echo option batch on >script.txt
echo option confirm off >>script.txt
echo open sftp_login_name:my_password@127.0.0.1 >>script.txt
echo put A.zip >> script.txt
if %MyInputB% NEQ 0 echo put B.zip >> script.txt
if %MyInputC% NEQ 0 echo put C.zip >> script.txt
echo exit >>script.txt
winscp.com /script=script.txt
Problem is that this batch file does not work when executed via
hudson.
It always said encounter < and ends unexpectedly.
If I test it under windows command and manually transfer %MyInputB%
and %MyInputC%, it works perfectly.
I am wondering if anyone who's familiar with this plugin or windows
batch command can help me point out where my problem is. Appreciate
your reading here.
|