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

What is Jenkins Pipeline?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article is about what Jenkins Pipeline is. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

1. What is Jenkins Pipeline?

Jenkins Pipeline, or Pipeline for short, is actually a generic name for a series of plug-ins that support the execution and integration of 'continuous delivery piplines' into Jenkins.

What is "continuous delivery pipline" actually describes the software control process of the project, from the version control of the software to the automatic deployment of a series of processes that are finally submitted to the end user. It is well known that every time the code is submitted (submitted to a code control tool such as SVN/GIT/Github) to the final release of the code to the end user, there are a series of complex processes. This process includes compilation (build), followed by multi-stage testing: unit test, api test, integration test, etc., and the deployment phase.

Pipeline he provides a series of extensible tools to describe the above process through Pipeline Domain Specific Language (DSL) syntax as' code'.

Typically, Jenkins Pipeline is written to a text file (we call it Jenkinsfile), which in turn can be inserted into the project's source control library. This is the basis of "Pipeline-as-Code". Then 'the continuous delivery pipeline' can be marked with version information and review like any other code. What are the benefits of creating a Jenkinsfile:

Pipelines is automatically created for any branch and Pull request.

Pipeline contains Code review/iteration.

Audit trail on Pipeline.

Single source of truth can be seen and edited by members of the project.

Whether you use web UI or a Jenkinsfile, the syntax is the same. It is recommended that it is best to use Jenkinsfile and put this into the code management library.

This is an example of Jenkinsfile.

Jenkinsfile (Declarative Pipeline)

Pipeline {agent anystages {stage ('Build') {steps {sh'make'}} stage (' Test') {steps {sh'make check'junit'reports/**/*.xml'}} stage ('Deploy') {steps {sh'make publish'}

Agent indicates that Jenkins needs to locate an executor and working directory for this part of Pipelien

Stage describes a state of Pipeline

Steps describes a step of this stage.

A shell command executed by sh

Junit is a step of pipline provided by Junit plugin that can be integrated into the test report. Thank you for reading! This is the end of this article on "what is Jenkins Pipeline?". I hope the above content can be of some help to you, so that 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.

Share To

Internet Technology

Wechat

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

12
Report