Grant Jenkins sudo rights on build minions 32/3532/1
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Fri, 21 Oct 2016 20:03:59 +0000 (13:03 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Fri, 21 Oct 2016 20:03:59 +0000 (13:03 -0700)
While it would be nice to not need sudo rights for Jenkins on the build
minions, it is unfortunately needed in many cases.

Change-Id: Ia7b78008d9f828b222f1f530ec52db340152b29a
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
jenkins-scripts/basic_settings.sh

index 412dfff..37ca057 100755 (executable)
@@ -35,6 +35,11 @@ jenkins         soft    nofile          16000
 jenkins         hard    nofile          16000
 EOF
 
+cat <<EOJENKINS_SUDO >/etc/sudoers.d/89-jenkins-user-defaults
+Defaults:jenkins !requiretty
+jenkins     ALL = NOPASSWD: ALL
+EOJENKINS_SUDO
+
 cat <<EOSSH >> /etc/ssh/ssh_config
 Host *
   ServerAliveInterval 60