Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Jenkinsfile-based user-defined compiling and deploying method and system

A deployment system and custom technology, applied in software deployment, code compilation, program code conversion, etc., can solve problems such as shortening compilation time, too large images, and only manual intervention, so as to solve capture and display, and reduce image size. , the effect of improving deployment efficiency

Pending Publication Date: 2021-03-26
SHANGHAI WANXIANG BLOCK CHAIN CO LTD
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Typical compilation and deployment tools are git and jenkins, and a traditional scenario from source code to deployment is to submit the source code to the git warehouse before compiling, and then use jenkins to build all modules of the source code to generate related packages, and then use jenkins Deploying these packages to different environments, there are two problems in this scenario. One is the compatibility of different environments. The second is that it takes a long time to fully compile the source code, resulting in a very low efficiency of compilation and deployment.
The tools used in a containerized compilation and deployment are still git and jenkins. Due to the introduction of the mirror warehouse, compilation can be compiled without compiling in each environment, which greatly shortens the compilation time. Containerization solves the problem of compatibility caused by inconsistencies in the environment problem, so the efficiency of compilation and deployment has been improved to a certain extent, and a system has basic modules and application modules, and the basic module is the basis of the application module, which only needs to be compiled without generating a mirror image, but traditional jenkins cannot specify the required compilation modules, resulting in mirror images for both basic modules and business modules, and every time the code is modified, no matter whether the business modules are modified or not, it needs to be recompiled to generate a new mirror image, resulting in very low compilation efficiency. There is a problem with the image being too large
Secondly, using jenkins is a closed system in the compilation and deployment process. The compilation log and deployment log cannot be connected with other automation tools, and the follow-up automatic processing after compilation and deployment failure cannot be done. Only manual intervention

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Jenkinsfile-based user-defined compiling and deploying method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0053] According to a jenkinsfile-based custom compilation and deployment method provided by the present invention, such as figure 1 shown, including:

[0054] Step M1: Introduce the jenkinsfile dependency package into the project to complete the configuration of the basic modules and business modules;

[0055] Step M2: Based on the jenkinsfile dependency package, identify the modified source code in the project through the code identification module;

[0056] Step M3: The modified source code is compiled according to the preset coding strategy in the compilation strategy module, and the corresponding image is stored in the mirror warehouse;

[0057] Step M4: Select a deployment strategy based on requirements, and deploy the images in the image warehouse to various environments according to the selected deployment strategy, and complete the output of source code services.

[0058] Specifically, the step M2 includes: associating the preset module types in the jenkinsfile with...

Embodiment 2

[0092] Embodiment 2 is a modification of embodiment 1

[0093] The traditional jenkins tool can solve automatic compilation, but it cannot flexibly specify the compiled module, but using jenkinsfile can flexibly define the compilation module, only compile the basic module that does not need to generate a mirror image, and compile the business module into a mirror image. At the same time, It can solve the need to repeatedly compile the full amount of code when modifying the code, thereby greatly reducing the timeliness of image compilation. At the same time, Jenkinsfile can be connected to various cloud-native APIs in json format, and can capture various states during the compilation and deployment process, targeting compilation failures. In scenarios different from deployment failures, automatic recompilation and deployment rollback operations are performed, thus forming unattended compilation and deployment.

[0094] The custom compilation and deployment method based on jenki...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a jenkinsfile-based user-defined compiling and deploying method and system, and the method comprises the steps: M1, introducing a jenkinsfile dependence package into a project,and completing the configuration of a basic module and a service module; M2, based on the jenkinsfile dependency package, identifying a modified source code in the project through a code identification module; M3, compiling the modified source code according to a preset coding strategy in a compiling strategy module to obtain a corresponding mirror image, and storing the corresponding mirror imagein a mirror image warehouse; and M4, deploying the mirror image in the mirror image warehouse to various environments based on a preset deployment strategy, and completing output of the source code service. By adopting the compiling deployment process capture module, the log capture and display problems in the compiling process are solved, and an unattended compiling deployment whole process canbe realized.

Description

technical field [0001] The present invention relates to the field of block chain technology, in particular to a method and system for self-defining compilation and deployment based on jenkinsfile. Background technique [0002] Typical compilation and deployment tools are git and jenkins, and a traditional scenario from source code to deployment is to submit the source code to the git warehouse before compiling, and then use jenkins to build all modules of the source code to generate related packages, and then use jenkins Deploying these packages to different environments, there are two problems in this scenario. One is the compatibility of different environments. The second is that it takes a long time to fully compile the source code, resulting in a very low efficiency of compilation and deployment. The tools used in a containerized compilation and deployment are still git and jenkins. Due to the introduction of the mirror warehouse, compilation can be compiled without comp...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/41G06F8/61G06F8/71G06F8/75
CPCG06F8/41G06F8/63G06F8/71G06F8/75Y02D10/00
Inventor 陈文杰陈凯王劼覃瀚涛
Owner SHANGHAI WANXIANG BLOCK CHAIN CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products