summaryrefslogtreecommitdiffstats
path: root/jenkins-scripts
diff options
context:
space:
mode:
authorAndrew Grimberg <agrimberg@linuxfoundation.org>2017-10-02 13:37:59 -0700
committerAndrew Grimberg <agrimberg@linuxfoundation.org>2017-10-02 13:37:59 -0700
commitd1f6df6d27cf3ad8e4aadbff023a079048c5a9da (patch)
tree097d4e6a361b72f6b841051503990b0a8385386b /jenkins-scripts
parentabb3538ca053f71d0fd0d347fcc30e4380b48b81 (diff)
Grant Jenkins user sudo rights
Incoming changes for sigul will require that Jenkins have sudo rights anywhere in the environment. Change-Id: Ie83b510ae7ac9a4abe5e90402458ff8dc4d7a5da Issue-ID: CIMAN-94 Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Diffstat (limited to 'jenkins-scripts')
-rwxr-xr-xjenkins-scripts/create_jenkins_user.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/jenkins-scripts/create_jenkins_user.sh b/jenkins-scripts/create_jenkins_user.sh
index 10e47091c..3a8600274 100755
--- a/jenkins-scripts/create_jenkins_user.sh
+++ b/jenkins-scripts/create_jenkins_user.sh
@@ -39,6 +39,12 @@ then
usermod -a -G mock jenkins
fi
+# Grant the Jenkins user sudo rights
+cat <<EOFSUDO >/etc/sudoers.d/89-jenkins-user-defaults
+Defaults:jenkins !requiretty
+jenkins ALL = NOPASSWD: ALL
+EOFSUDO
+
mkdir /home/jenkins/.ssh
mkdir /w
cp -r /home/${OS}/.ssh/authorized_keys /home/jenkins/.ssh/authorized_keys