Join the DZone community and get the full member experience.
Join For Free
The DevOps zone is brought to you in partnership with Sonatype Nexus. The Nexus suite helps scale your DevOps delivery with continuous component intelligence integrated into development tools, including Eclipse, IntelliJ, Jenkins, Bamboo, SonarQube and more. Schedule a demo today.
This script will probably help you! If you need to run some "SUDO" commands from Jenkins, you will probably need to first:
1) Add jenkins user to SUDO, and
2) Avoid passwords.
The following code will do it like a miracle:
echo 'jenkins ALL= NOPASSWD: ALL' >> /etc/sudoers
echo 'Defaults:jenkins !requiretty' >> /etc/sudoers
The DevOps zone is brought to you in partnership with Sonatype Nexus. Use the Nexus Suite to automate your software supply chain and ensure you're using the highest quality open source components at every step of the development lifecycle. Get Nexus today.