Jenkins installation and use -- Example
mr_ chenping 2021-08-06 18:03:17

Refer to the blog Jenkins master stay windows Installation on

Jenkins The main function of is to monitor the operation of repeated work , Like software project The construction of In detail :

* Continuous construction and testing of software

In essence, it provides an easy-to-use continuous integration system . Make developers more easy Integrate changes into project in . Make users more easy Get a new build. Take the initiative , Continuous construction improves the efficiency of software development .

 

Jenkins The main characteristics of :

*easy install . Just run Java -jar jenkins.war, Or deploy directly to a servlet container in . such as tomcat. No need to install . No database support is required .

*easy To configure ,jenkins Can be completely through friendly web GUI To configure the . And the configuration page supports error checking of configuration items and very good online help . There is no need to edit... Manually xml Configuration file for . But jenkins Manual changes are also supported xml The configuration file .

* Detection of project source code changes ,jenkins From the project's Subversion/CVS Generate a list of recently changed collections , And the change is very effective . Not add Subversion/CVS Repository The load of .

 

Jenkins Installation and basic use Download and install

 

Windows Installation instructions :

          Get into Jenkins Official website ( http://jenkins-ci.org/ ) Download the latest version number

          Click on the install 、 All the way to the next step of installation ( Suppose the right download is jenkins.war. There is no need to install . Direct use Java –jar jenkins.war stay cmd Just start it in

          Open the browser , Input http://localhost:8080, Get into jenkins Manage Pages

 

 

Cmd Form input :Java -jar jenkins.war

( Note that you need to install JDK, Then set the JAVA_HOME Environment variables and will %JAVA_HOME%\bin Add to PATH In the environment variables )

 




Open the browser , Input http://localhost:8080. Get into jenkins Manage Pages


Jenkins Installation and basic use — Jenkins Basics

Jenkins Mainly completed by tasks . The task is divided into the following modules, such as the following figure :

Source control support SVNGITCVS Wait for the code manager . example SVN If we need to build , Then you need to SVN Synchronize the latest code on ( To Jenkins); Ideally, for example, there is code in SVN When submitting , Our trigger can trigger ( For example, the form of a hook ); When this trigger is triggered, it is , We build ( Such as the compilation process ) It's about to start ; Suppose there is a problem with the compilation , We will send an error report , If there's no problem, we won't send the report . Otherwise, it will give developers / Testers cause some difficulties . That is, developers want to receive abnormal problems .

 


Here are the main contents of the web page

 

You will find that it has many ways of source code management : among  Subversion It's what we usually say SVN Source control

And a variety of build triggers Check the check box for details of what kind of trigger , Click the question mark behind , There will be relevant instructions . There are also examples .Build after other projects are built( After the construction of other projects , Let's go on with this task );Build periodically According to a certain time zone , Generally, we will use this trigger method , example 19:00-7:00 What kind of trigger .poll SCM How often do you build , For example, every 15 Build once in minutes , Such triggering is a waste of resources . In another way, we provide a hook to trigger . Generally, as soon as our code is submitted , The hook starts to trigger the build .


structure : That's what we're going to do . For example, compile 、 Operation is performed in this step


After compiling, we usually send an email to the developer , Let developers know what's wrong .


 

Here's how to create a new task Demo( Free style software project )


 


Only the construction steps have :Execute windows batch command function windows The batch


In the command box, enter, for example, the following command and save :

echo test Information

exit


Click build now . It will complete a compilation


Each compilation will have a historical compilation record , Blue indicates successful compilation ; Red indicates compilation failure . If the compilation fails, we can click in to view the error message


For example, click the record of build failure , go in . We can see the error record output from the console




Jenkins It's very powerful . We can look at system management System settings , Frequently used functions are configured here, such as email notification 、ANTANT The build command is Jenkins Just bring , No eclipse\plugins\org.apache.ant_1.8.3.v201301120609 Under folder . Of course, you can not use Jenkins default ANT Tools , You can make changes


 


 

Jenkins With a lot of plug-ins , You can click in to join 、 Delete 、 Disable or enable Jenkins Function extension . Basically all third-party tools , You can find it here







Please bring the original link to reprint ,thank
Similar articles