Allow sudo commands in Jenkins

CentOS version. You should edit sudoers file:

First add jenkins as sudoer without password:

jenkins ALL= NOPASSWD:  ALL

Then disable requiretty:

Defaults    !requiretty