In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to build a Coding project in Jenkins. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
Build a Coding project using Jenkins
Jenkins version
Install and configure Jenkins Coding Webhook Plugin
Configure Webhook in Coding
Jenkins is an open source continuous integration tool written in Java. It runs in a Servlet container (for example, Apache Tomcat). It supports software configuration management (SCM) tools (including AccuRev SCM, CVS, Subversion, Git, Perforce, Clearcase, and RTC) to execute Apache Ant and Apache Maven-based projects, as well as arbitrary Shell scripts and Windows batch commands.
To build a Coding project using Jenkins, you use Webhook to send requests to the Jenkins server. After Jenkins receives the Webhook request, it builds. To achieve the above functions, you need to use the plug-in of Jenkins, and the Jenkins Coding Webhook Plugin is modified by the Jenkins Gitlab Webhook plug-in. After installation, you can respond to Coding's Webhook request.
CI/CD: continuous integration, continuous delivery / continuous deployment
Continuous integration
CI (Continuous Integration): a software engineering process that helps developers merge code changes into shared branches or "trunks" more frequently. Once the developer's changes to the application are merged, the system validates the changes by automatically building the application and running different levels of automated tests (usually unit tests and integration tests). Ensure that these changes do not damage the application. This means that the test covers everything from classes and functions to the different modules that make up the entire application. If automated tests find conflicts between new and existing code, CI can fix these errors more easily and quickly.
That is, as soon as the developer submits the new code, Jenkins will immediately merge the new code with the old code for build testing. Determine whether the new code can be integrated with the original code.
Continuous deployment
CD (Continuous Deployment): the next step in continuous delivery, if the code is reviewed and then automatically deployed to production. Automatically deploy to the production environment on the basis of continuous delivery. For business reasons, you can choose not to deploy. If you want to deploy continuously, you must first implement continuous delivery.
Jenkins version
Marked in the Jenkins plug-in library, the version dependency on Jenkins is 1.625.3. In the practice of eating our own dog food, Jenkins version 2.67 is currently used. (stable version 2.60 / 2.73)
Install and configure Jenkins Coding Webhook Plugin
Installation
Log in to your Jenkins server. Select system Administration.
Click "manage plug-ins"
Select "optional plug-in", in the upper right "filter" box, enter "coding", you can see "Coding Webhook Plugin". When checked, click "install directly" below. If there are no search results, you can click "get now" in the lower right, and you can see it after getting it.
If you can't find it, you can download it here and install it manually.
The method of manual installation is described below:
Enter the plug-in list and select the "Advanced" tab above
Under the "Advanced" tab, click on the upload plug-in bar to select a file and select coding-wehook.hpi
Click the "upload" button and it will be automatically uploaded and installed.
2. Configure the project
Select New Project in Jenkins
Go to the project configuration page, select Git under source code management, and enter the project address and the form of authentication.
Select "trigger build when you receive a request from Coding" in the build trigger bar, and fill in the appropriate options.
If you need to build according to Merge Request, click the one on the right to say hello.
The prompt message is expanded.
According to the prompt, go back to source management, click "Advanced", enter + refs/heads/*:refs/remotes/origin/* + refs/merge/*/MERGE:refs/remotes/origin/merge/* in Refspec, or + refs/heads/*:refs/remotes/origin/* + refs/pull/*/MERGE:refs/remotes/origin/pull/* if it is a public project.
Finally, you can add the steps of the build.
Configure Webhook in Coding
Go back to Coding and select add Webhook in the settings of the project.
After you have successfully added it, you can.
At this point, we submit a Merge Request.
Back in Jenkins, you can see the information about the project build.
Jenkins mail configuration allows you to view the status of each JOB project build through control information
With the help of the Jenkins Email plug-in to complete the construction of the website, automatically send mail to the appropriate developers, developers, or testers.
Jenkins email requires the installation of Email mail plug-ins, Email-ext, Token-macro and Email-template.
Common parameters for Jenkins Email mail configuration:
Address of the SMTP server mail server
The format of Default Content Type content presentation. Generally choose HTML.
Default Recipients default recipient
Use SMTP Authentication uses SMTP authentication
User name of the User Name mail sending account
The process of automatic website deployment based on Jenkins is roughly divided into: requirements analysis-prototype analysis-development code-submit test-Jenkins intranet deployment-confirm launch-Jenkins backup data-Jenkins extranet deployment-release-Jenkins website testing, etc. If you find any anomalies in the code deployed in the extranet, you can roll back in time through Jenkins, as shown in the figure.
Frequently asked questions:
1. How to implement publishing and rollback with jenkins?
Answer: release: jenkins configure the code path (SVN or GIT), then pull the code and type tag. Compile as needed, and then push it to the publisher (scripts can be called in jenkins), and then distribute it down to the business server from the distributor.
Rollback: go to the publisher to find the corresponding version push according to the version number
Link:
(easy tutorials) Jenkins tutorials: https://www.yiibai.com/jenkins/Jenkins easy tutorials (installation configuration): https://www.jianshu.com/p/b524b151d35f(w3c school) Jenkins official documentation: https://www.w3cschool.cn/jenkins/ continuous Integration using Jenkins: https://www.liaoxuefeng.com/article/001463233913442cdb2d1bd1b1b42e3b0b29eb1ba736c5e000
Introduction to Jenkins: Jenkins usage tutorial: https://www.2cto.com/kf/201712/707935.html
Introduction to Jenkins-- Jenkins Management: https://yq.aliyun.com/ziliao/321229
Jenkins series: https://yq.aliyun.com/wenzhang/blog_2636?spm=a2c4e.11155472.0.0.2ab86b04oK6x8g
Jenkins deploy Maven project to Tomcat.txt: http://www.voidcn.com/code/p-qdirodfe-q.html
Jenkins series: https://testerhome.com/search?q=Jenkins
Jenkins installation and configuration (ubuntu16.04): https://www.jianshu.com/p/1a7f46896c40
Install and configure Jenkins: http://blog.51cto.com/fangwei009/2087624 under Linux
Practical Jenkins+SVN+tomcat continuous Integration release: http://blog.51cto.com/fangwei009/1977933
Building Jenkins+ant+Jmeter continuous Integration Automation under Centos7.3 system: http://blog.51cto.com/fangwei009/1954030
Jenkins+Ant+Jmeter builds an interface test platform for continuous integration (to be transferred): http://blog.51cto.com/fangwei009/1952504
Jenkins automates deployment and service restart-entry: http://blog.51cto.com/vekergu/1627955
JMeter Learning (37) Jmeter recording Mobile app script: http://blog.51cto.com/fangwei009/1911634
Ant+jmeter Interface Automation Test Environment Construction under Linux Environment (2): http://blog.51cto.com/fangwei009/1911218
Ant+jmeter+Jenkins Interface Automation Test practice (1); http://blog.51cto.com/fangwei009/1910388
Jmeter download and installation configuration: http://blog.51cto.com/fangwei009/1910385
Build ant environment under Windows: http://blog.51cto.com/fangwei009/1910384
Continuous Integration Interface Automation-jmeter+ant+jenkins (1): http://blog.51cto.com/fangwei009/1906033
Construction of Jenkins+Jmeter+Ant Automation Integrated Environment: http://blog.51cto.com/fangwei009/1906030
Install jenkins: http://blog.51cto.com/fangwei009/1882542 under windows
Jmeter distributed pressure test: http://blog.51cto.com/fangwei009/1886976
Create a database (Mysql) test using JMeter: http://blog.51cto.com/fangwei009/1877567
JMeter creates FTP test server for upload and download performance: http://blog.51cto.com/fangwei009/1866834
Use Jmeter for http interface testing: http://blog.51cto.com/fangwei009/1773724
JMeter installation tutorial: http://blog.51cto.com/fangwei009/1751611
Windows server deploys multiple different ports of tomcat: http://blog.51cto.com/fangwei009/1857337
Windows looks at port occupancy and shuts down the corresponding process: http://blog.51cto.com/fangwei009/1854142
Automation CI/CD practice of Jenkins and Docker: https://mp.weixin.qq.com/s/gZl9nQuPtMsekjNBcdfE8g
Jenkins is released by tag: http://blog.51cto.com/sgk2011/1927169
Jenkins practical installation java maven project: http://blog.51cto.com/sgk2011/1926750
Jenkins practical release A small php project: http://blog.51cto.com/sgk2011/1926295
The installation configuration of jenkins is at the top: http://blog.51cto.com/sgk2011/1926270
Jenkins+Maven+SVN+Nexus to build a continuous integration environment: http://blog.51cto.com/abcdocker/2137268
Jenkins Automation deployment online: http://blog.51cto.com/abcdocker/2136114
Jenkins (8 articles); https://www.cnblogs.com/sparkdev/tag/CI%2FCD/
053-Jenkins: https://mp.weixin.qq.com/s/1fN3fbq9jO9lGzEz2-igGw
Jenkins series: https://www.cnblogs.com/fawaikuangtu123/category/1386781.html
On how to build a Coding project in Jenkins to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.