Jenkins get started quickly

Source: Internet
Author: User

One, Jenkins download installation

1, to the official website Download Jenkins.war Package: http://jenkins-ci.org/

2. There are two methods of installation:

A) put the downloaded Jenkins.war package into the folder, such as C:\jenkins, and then open the Command Line window to go to the directory, execute the java-jar jenkens.war command When prompted: "Jenkins is fully up and running "When the start is successful, enter in the browser window: http://localhost:8080/can go to the first page of Jenkins.

b) If you have Tomcat, place the Jenkins.war package under Tomcat's WebApps folder, and when you start Tomcat it will automatically start Jenkins, and through Http://localhost:8080/jenkins You can access the first page of Jenkins.

3, I use the first method, after the installation of access: http://localhost:8080

Second, Jenkins configuration

1. Modify the root directory of Jenkins:

By default in C:\user\.jenkins, you can modify it by setting environment variables, for example:set Jenkins_home=d:\jenkins, and then restart Jenkins.

2. Back up and restore Jenkins:

Only need to back up all the files and folders under Jenkins_home, you need to stop Jenkins first.

3. Move, delete or modify jobs:

A) Move or delete jobs: Move or delete the%jenkins_hoem%\jobs directory.

b) Change the name of jobs: Modify the name of the folder that corresponds to the job under%jenkins_hoem%\jobs.

c) for infrequently used jobs, it is only necessary to store the corresponding job directory zip or tar in the%jenkins_hoem%\jobs to other places.

three .Jenkins Architecture (Master-slave)

1, master/slave equivalent to the concept of server and agent, Master provides a web interface for users to manage jobs and Slave,job can run on Master native or be assigned to slave. A master can associate multiple

Slave is used to serve different configurations of different jobs or the same job.

2. When performing a job on slave, slave needs to install a running environment.

3, slave can be a physical machine can also be a virtual machine

four . Management node (slave)

1, click System Management----new node, enter the name of the node, select "Dumb Slave", click "OK"

2, slave configuration:

A) of executors: Indicates that several threads can be executed in parallel on the slave, or you can click the question mark at the back to see the description, typically set to 1.

b) Remote working directory: Create a path to the Jenkins working directory on Slave, typically set to D:\JK

c) Tags: You can add one or more labels to slave, select slave by tag

d) Start method: Start Slave method, recommend the second launch slave agents via Java Web start

3. After setting up, click Save, appear in the interface:

4, see there are three ways to start slave, we use the second type, in the native cmd input:

Javaws HTTP://LOCALHOST:8080/COMPUTER/TESTA/SLAVE-AGENT.JNLP

To start the slave successful interface:

five . Configure Job

1. On the Jenkins home page click on "New" task, select "Build a free-style software project", enter the name and click "OK"

2, the Job Configuration page:

A) Restrict where this project can be run: When creating slave, the label is used here to specify which label the job executes on slave
b) Source management: It is recommended to use SVN or none

c) Increase the build step:

1. Execute Windows Batch COMMND: This is the Windows command line parameter (the default current path is the job's workspace, if many of the commands can be written as batch files in the job directory, the reference is good)

2. Execute Shell: Run scripts such as Shell, Python,perl,ruby, etc.

3. Invoke ant: Support Ant Build

4. Invoke top-level MAVEN targets: support MAVEN Build

d) Increase the post-build operation steps:

There are more than the options, you can choose according to their own needs, commonly used is to send mail, you can also install Jenkins plug-ins, after installing the plugin will have the appropriate options.

e) The configuration completes the job and can be saved and executed.

Six, plug-in management

1, click the System management and management plug-in, access to the plug-in management page, you can choose the required plug-in to install:

2, select "Advanced" here can upload a plugin suffix for the HPI file, and so he prompts the installation completed, and then restart Jenkins can complete the installation, plug-ins:

http://mirrors.jenkins-ci.org/plugins/

VII. Rights Management

Not to be continued ...

Reference:

Http://www.cnblogs.com/itech/archive/2011/11/23/2260009.html

Jenkins get started quickly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.