wouldn't the best thing be to use a ssh key and then use the ssh-agent
build wrapper to provide the key to the build... then there would be no
need for any expect stuff at all?


On 10 October 2013 13:51, Ranjith P <[email protected]> wrote:

> HI,
>
> I have written a shell command to copy the build artifacts to a server in
> Post build action.
>
> Script:
> ---------
>
> *#!/usr/bin/expect -f*
> *#!usr/bin/expect*
> *set pass "password"*
> *spawn scp -r ${WORKSPACE}/my_project/target/*.jar  [email protected]:
> /usr/local/jars*
> *expect "*Password:*"*
> *send "${pass}\r";*
> *expect eof*
>
> Its not working as expected and showing exception as
>
> /usr/local/itag/apache-tomcat-7.0.14/temp/hudson5412037345746046257.sh:
> line 4: spawn: command not found
>
> Build step 'Execute shell' marked build as failure
> Finished: FAILURE
>
>
> If I run the same script through a terminal, it will work.
>
>
> Please help me to resolve this.
>
>
> Regard,
>
> Ranjith
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to