diff options
-rwxr-xr-x | jenkins-scripts/create_jenkins_user.sh | 6 |
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 |