Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Automatic Construction method of configuring Git+Maven with Jenkins under centos

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "the automatic construction method of configuring Git+Maven using Jenkins under centos". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the idea of Xiaobian slowly and deeply to study and learn "the automatic construction method of configuring Git+Maven using Jenkins under centos" together!

Using Jenkins to configure automated builds of Git+Maven under centos

>Jenkins is an open source continuous integration tool, Jenkins application to build continuous integration environment, can be automatically built, automatically compiled and deployed, very convenient.

> In the case of fewer servers, Jenkins 'advantages are not obvious, but with the development of the project, the number of servers increases, Jenkins' advantages will be highlighted, which can improve efficiency and reduce a lot of manual operations.

> Now many companies Java project development is using Git or SVN management code, Maven management of multiple modules and project dependencies, so today try to learn how to use Jenkins to build Github and Maven automatic build and deployment.

Deploying Jenkins

Official website http://jenkins-ci.org/. The current version is 1.629.

Jenkins installation is very simple, after downloading is a jenkins.war package, can be directly deployed in Tomcat or other containers. In addition, the official website also has related installation of.deb, etc., which is more cumbersome. You can choose which way to deploy.

Install related plugins

Copy the war file to Tomcat's webapps directory,

After startup, go to http://SERVER_PATH:8080/jenkins/and you can see that Jenkins is already running:

To configure Git repository, we need to use Git plug-ins. At the same time, we also need to install maven plug-ins. Other plug-ins can be installed selectively according to the situation.

global configuration

Create tasks, configure project information

common problems

git ERROR: Unable to find remote helper for 'https'

The reason is: /usr/local/git/libexec/git-core/path is not in PATH environment variable

Project does not start/invalid after executing shell command

The reason is: jenkins will kill all spawned processes by default after build

Solution:

For each item: add BUILD_ID=DONTKILLME to the execute shell input box to prevent jenkins from killing the tomcat process that started.

Permanent solution: disable jenkins from killing spawned processes when jenkins is started

Start with java -jar, -Dhudson.util.ProcessTree.disable=true -jar jenkins.war

Start Tomcat, Linux system modify catalina.sh, after the description of environment variables, add this sentence JAVA_OPTS="$JAVA_OPTS -Dhudson.util.ProcessTree.disable=true" before the script; restart Tomcat after modifying Tomcat configuration file

Thank you for reading, the above is the content of "using Jenkins to configure Git+Maven automated construction method under centos". After studying this article, I believe that everyone has a deeper understanding of the problem of using Jenkins to configure Git+Maven automated construction method under centos. The specific use situation still needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report