Jenkins Setup in 20 minitues

Feb 2016, By WZh

This some Jenkins key points to note down:

1. Get the jenkin war file from https://jenkins-ci.org/2. Install the tomcat server, to run in linux.

3. Copy the jenkins.war file to the webapp folder of the tomcat, restart tomcat.

then you can access this URL to access jenkins:

http://192.168.***.***/jenkins/

4. At this step, you are still using anonymous user to access jenkins.

5. jenkin will using a default folder to save all jenkins related data files into it.

You can change to other folder as you want , eg. /opt/jenkins

6. Go to “Manage Jenkins”–>”Configure System” to do basic config for a jenkins, major points:

1. JDK Name and JAVA_HOME  , or you can let jenkins to install the JDK automatically

2. ANT  refer to your ANT or let jenkins to install one for you.

3. MAVEN refer to your ANT or let jenkins to install one for you.

4. jenkins URL:     http://192.168.160.48/jenkins/

5. CVS or Subversion; if you use Subversion, you just need to select one version here. later in each job, you input svn URL and user accounts

just save it.

7. Create job and run job according your schedule:

Note:

1. “default” when you first time using ANT/Maven will cause issue when they are auto installer. S better to refer to the specific version for them.

2. Build periodically will use cron format, do a bit study for it.

If you want every five minitues:      */5 * * * *

If you want every one hour:         H */1 * * *

8. Maven project in you eclipse will be easily run in jenkin.

9. ANT project sometimes need to test and make the build.xml working fine both at eclipse and also the jenkins environment, and you may need to add change abit your ant xml.

10. use “Manage Jenkins”–>”Configure Global Security” to enable the security , normally will use the :

1. “Jenkins’ own user database” unless you intergrate with enterprise AD/LDAP

2. “Matrix-based security” to let each user be controlled.

Advertisements