Sample Code for continuous integration between Jenkins and SVN, jenkinssvn

Source: Internet
Author: User

Sample Code for continuous integration between Jenkins and SVN, jenkinssvn

Overview

Jenkins is an open-source continuous integration tool written in Java. It is formerly known as Hudson and can be used to automatically compile, test, and publish projects, this greatly reduces the tedious and repetitive work between teams and accelerates the delivery progress of the entire project.

Download Jenkins & SVN & eclipse from the official website. The version number is not required. We recommend that you use the latest stable version.

  1. Log on to Jenkins: http: // localhost: 8080
  2. Log on to SVN: http: // localhost: 3343/csvn
  3. Log on to SVN with the default admin account. After logging on, click version library-> Create version library.

4. Open eclipse and open the created Java Project

5. Install the svn-eclipse plug-in:

Open the link folder in the eclipse installation directory, copy and decompress the SVN plug-in package to the link folder. Then create a svn. link file, the file content is svn plug-in installation path such as: path = D: \ 360Downloads \ Software \ eclipse-SDK-win32 \ link \ SVN

After the installation is successful, the svn resource library is displayed in eclipse.

6. After the svn plug-in is successfully installed, right-click the project and choose "team"> "share project"> "Enter the version library URL"> specify the trunk folder of the project module. Return to the Java project, click the project Jdemo, right-click -- ", submit code to svn

8. Create a job under Jenkins

Go to the Jenkins homepage and click New,

9. Copy curl.exe & libssh2.dll to the C: \ Windows \ System32 root directory.

10. Create a hook file. Go to the svn installation directory hooks folder, create a post-commit.bat file, create a post request with the request content curl-X post-v-u user: pwd URL (Project Build URL)

Note:-u user: pwd is the Jenkins Logon account and password.

11. After a hook is created and a job is created, the code is automatically built once the code is submitted.

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.