jenkins: run jobs as root

 

reference: https://stackoverflow.com/questions/29926773/run-shell-command-in-jenkins-as-root-user

 

  1. sudo vi /etc/default/jenkins

  2. $JENKINS_USER="root"

  3. sudo chown -R root:root /var/lib/jenkins

    sudo chown -R root:root /var/cache/jenkins

    sudo chown -R root:root /var/log/jenkins

  4. service jenkins restart ps -ef | grep jenkins

Leave a Reply

Your email address will not be published. Required fields are marked *