Author: disappearedgod article source: http://blog.csdn.net/disappearedgod/article/details/43226359 Time: 2015-1-28
These two days are looking at Jenkins for the purpose of using Jenkins to do the automatic compilation of GIT projects. There are some interesting blogs online:
The purpose of this blog is to supplement the gaps between blogs if you are doing a program integration problem according to Jenkins. Or, if you are using Git for SVM, but feel that every rebuild is a hassle, see this blog and refer to this article for a trial with a peer blogger.
1. Permissions issues
The user name that Jenkins hosts in Linux uses Jenkins instead of its own system name or root, so you need to add root privileges to the/etc/sudoers bar Jenkins user, you can join with the command line, or you can edit the file directly
sudo gedit/etc/suduers
Add the following lines of red text
# members of the admin group may gain root privileges
%admin all= (All) all
#change BGN
Root all= (All) all
Jenkins ALL=NOPASSWD:/var/lib/jenkins
Jenkins all= (All) Nopasswd:all
#change End
# Allow members of the group sudo to execute any command
%sudo all= (All:all) all
Jenkins all = nopasswd:/path/to/script
Help
Jenkins Advanced Series
Logs and ideas
January 26 Write the shell script, you can build the Deb package manually
January 27 Modify Shell script, build build with crontab timer (bash execution)
January 28 Configure Jenkins to synchronize 3 git libraries in different jobs and execute the script with Jenkins, but the Git library did not pull the build
January 29 Configuring Jenkins, trying to sync git libraries with Gerrit repo