I'm running the latest version of Jenkins on CentOS. In my Jenkins job, I can run post build steps, and included this command,
sudo /bin/rm /usr/java/jboss/server/default/deploy/myclient-1.0.war
which dies with the error
sudo: sorry, you must have a tty to run sudo
Is there a way I can rewrite the above to run the command through a tty shell? In our /etc/sudoers file, we have the line
Defaults requiretty
but our sysadmin has forbade us from commenting it out.