I need to execute a script in Linux platform "runme.sh" (which can be executed as sudo user) using another ant script "build.xml". Now i have execute this build.xml from teamcity.
I have code for everything but got struck into while invoking "runme.sh" using sudo in build.xml from team city.
In build.xml i have code like
<exec dir="${installdir}" executable="/bin/sh">
<arg line="-c 'sudo ./runme.sh'"/>
<redirector inputstring="sudopassword"/>
</exec>
In team city I get error as " [exec] sudo: sorry, you must have a tty to run sudo".
Can someone please help me resolve this error?
thanks in advance