An automated layout method based on CICD

Through the automated composition method based on CICD, the problem of dependence and complexity in the multi-package composition process is solved, the automation and reliability of the composition process are realized, the work efficiency and the controllability of the composition are improved, and it is suitable for cross-border applications. Team and cross-organizational layout needs.

CN115080057BActive Publication Date: 2024-08-30CHONGQING CHANGAN TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210742559.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2024-08-30
Estimated Expiration
2042-06-28

AI Technical Summary

Technical Problem

Existing technology cannot effectively solve the dependency, complexity and time issues of multi-package versioning, resulting in the versioning process being uncontrollable and unreliable, especially at major release nodes, where re-versioning is costly.

Method used

Adopt an automated versioning method based on CICD, establish a CICD pipeline by formulating versioning rules and version release processes, use static scanning and unit testing tools to ensure code quality, realize digital management of packages and automated versioning, reduce dependence and improve composition. version reliability.

Benefits of technology

It improves the work efficiency of plate assembly and the reliability of single packages, reduces the time and complexity of plate assembly, solves the problem of cross-team and cross-organization plate assembly, and ensures the controllability and reliability of the plate assembly process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080057B
    Figure CN115080057B
Patent Text Reader

Abstract

The present invention discloses an automated versioning method based on CICD, formulates versioning rules and version release processes, wherein the versioning rules include the directory structure of each business field in the product library system, the directory structure of the product and the version rules; formulates the implementation logic of package upload and download in the product library system, wherein the package upload carries the attributes of the package according to the requirements of the upload, and the package download is downloaded and deployed according to the authority or the pipeline; establishes a CICD pipeline for versioning, uses the CICD pipeline to control the quality after versioning, and simultaneously performs digital management of the package for the versioned large package through the product library system. The present invention not only improves work efficiency, but also improves the reliability of a single package, reduces the degree of dependence, complexity and versioning time between versions, and solves various problems of versioning across teams and organizations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent manufacturing technology, and in particular to an automated typesetting method based on CICD. Background Art

[0002] Intelligent technology is changing with each passing day, and vehicle systems are becoming more and more complex and huge. During the research and development process, embedded systems or products are often composed of multiple systems with complex system architectures and interdependence between systems. Complete versions are composed of multiple sub-versions. For example, in the field of smart cockpits, a complete package consists of multiple components such as SOC, MCU, APP, etc. Multiple components cooperate across fields or companies, and the degree of dependence between versions is high. The versioning is complex and the versioning time is long. The compilation and packaging process takes at least 2 hours. The flow of subsystem packages is often uncontrollable and unreliable, and transmission errors or small problems often occur, resulting in versioning failures. Especially when facing major release nodes, the cost of re-versioning is very high. The requirements for automated, efficient, and reliable versioning are very urgent. The current assembly line technology can only solve the process of making a single package, but does not solve the problem of multi-package versioning. At the same time, the dependencies between multi-package versions, the management of multi-package versions, and the pulling strategies all need to be solved. Summary of the invention

[0003] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is: how to provide an automated typesetting method based on CICD that can solve multi-package typesetting, reduce the dependency, complexity and typesetting time between typesetting, and improve typesetting reliability.

[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0005] An automated versioning method based on CICD includes the following steps:

[0006] (1) Formulate the typesetting rules and version release process. The typesetting rules include the directory structure of each business area in the product library system, the directory structure of the product, and the version rules;

[0007] (2) Formulate the implementation logic of package upload and download in the product library system. Package upload carries the package attributes according to the upload requirements, and package download is deployed according to permissions or pipelines.

[0008] (3) Establish a CICD pipeline for typesetting, use the CICD pipeline to control the quality of typesetting, and digitally manage the large packages of typesetting through the product library system.

[0009] As an optimization, in step (1), a product directory structure is established in the product library system to store sub-packages generated by all subsystems in the product library system, and at the same time, a typesetting rule is created in the directory.

[0010] As an optimization, in step (3), the CICD pipeline layout process includes:

[0011] (a) Upload the subsystem code to the source code manager;

[0012] (b) Use static scanning tools to perform static scanning on the newly added subsystem code, and use unit testing tools to perform dynamic testing on the subsystem code;

[0013] (c) When the results of scanning and unit testing meet the quality threshold requirements, compile and package, and package the individual packages according to the packaging method of each product;

[0014] (d) Upload to the designated path of the product library system as required according to the package rules;

[0015] (e) After all sub-packages have been uploaded, the product library system is checked for layout rules;

[0016] (f) When the typesetting rule check conditions are met, typesetting is carried out. If typesetting is successful, the typesetting package is tested and verified. After the test passes, it is released.

[0017] As an optimization, in step (f), after the versioning is successful, the versioned package is uploaded to the product library system, and the version number and version description of the versioned package are determined. When the product library system detects a package with the same version number as the versioned package, the product library system backs up the version of the package in itself to facilitate version tracing and rollback.

[0018] As an optimization, when the properties of the versioned package change, the version properties of the versioned package are changed back so that the status of the versioned package in the product library system is the latest status.

[0019] As an optimization, in step (f), after the versioning is successful, the MD5 value and Hash value of the versioned large package in the product library system are verified to ensure the integrity and consistency of the versioned large package.

[0020] As an optimization, in step (f), the product library system detects the test status of the assembled package. Only when the test of the assembled package meets the requirements of the quality gate, the assembled package is allowed to be released.

[0021] The present invention firstly needs to establish a concurrent pipeline using Jenkins, and at the same time needs to establish a product library system, in which a product folder structure of the business is established, and a qualified single package made according to the rules is transferred to the corresponding path, and the pipeline and the product library system are connected through SSH through two-way authentication, and Jenkins pulls the latest code through the source code manager, compiles, tests, and packages, and at the same time, when uploading a single package, pipeline attributes are attached, such as tagid, test results, MD5, Hash and other unique values ​​of the package pulled from the source code manager, and uploaded to the path specified by the product library, and at the same time, when uploading, the version of the package needs to be specified by parameters, and if the versions are the same, the product library system needs to back up or overwrite them in the background according to time classification to ensure the traceability of the process package; after all pipelines generate single packages concurrently, the Jenkins versioning pipeline automatically scans the integrity of the product library package, and when all packages meet the versioning requirements, the versioning is automatically performed.

[0022] Compared with the prior art, the present invention has the following beneficial effects: the present invention not only improves work efficiency, but also improves the reliability of a single package, reduces the dependency, complexity and time between typesetting, and solves various problems of cross-team and cross-organization typesetting. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is the principle diagram of typesetting in the present invention;

[0024] Figure 2 It is the typesetting flow chart in the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0026] like Figure 1 and Figure 2 As shown, an automated layout method based on CICD in this specific implementation includes the following steps:

[0027] (1) Formulate versioning rules and version release processes. Versioning rules include the directory structure of each business area in the product library system, the directory structure of the product, and version rules. For example, the list of packages required for versioning, package status, package description, etc. The rules can be declared in XML or YAML files.

[0028] (2) Formulate the implementation logic of package upload and download in the product library system. Package upload carries the package attributes according to the upload requirements, and package download is deployed according to permissions or pipelines.

[0029] (3) Establish a CICD pipeline for typesetting, use the CICD pipeline to control the quality of typesetting, and digitally manage the large packages of typesetting through the product library system.

[0030] In this specific implementation, in step (1), a product directory structure is established in the product library system to store sub-packages generated by all subsystems in the product library system, and at the same time, a layout rule is created in the directory.

[0031] In this specific implementation, in step (3), the CICD pipeline layout process includes:

[0032] (a) Upload the subsystem code to the source code manager;

[0033] (b) Use the sonarqube static scanning tool to perform static scanning on the newly added subsystem code, and use the unit testing tool to perform dynamic testing on the subsystem code;

[0034] (c) When the results of scanning and unit testing meet the quality threshold requirements, compile and package, and package the individual packages according to the packaging method of each product;

[0035] (d) Upload to the designated path of the product library system as required according to the package rules;

[0036] (e) After all sub-packages have been uploaded, the product library system is checked for layout rules;

[0037] (f) When the typesetting rule check conditions are met, typesetting is carried out. If typesetting is successful, the typesetting package is tested and verified. After the test passes, it is released.

[0038] In this specific implementation, in step (f), after the versioning is successful, the versioned package is uploaded to the product library system, and the version number and version description of the versioned package are determined. When the product library system detects a package in itself with the same version number as the versioned package, the product library system backs up the version of the package in itself to facilitate version tracing and rollback.

[0039] In this specific implementation, when the attributes of the assembled package change, the version attributes of the assembled package are modified so that the status of the assembled package in the product library system is the latest status.

[0040] In this specific implementation, in step (f), after the assembly is successful, the MD5 value and the Hash value of the assembled package in the product library system are verified to ensure the integrity and consistency of the assembled package.

[0041] In this specific implementation, in step (f), the product library system detects the test status of the assembled package, and only when the test of the assembled package meets the requirements of the quality access control is the assembled package allowed to be released.

[0042] The product library system can manage multiple versions of packages. When a specific version needs to be pulled, the version specification of the package is added to the scanning rules. When the assembly line is running, the product library pulls different versions of the subsystem according to the version requirements and assembles them into packages to meet various special needs of the business line.

[0043] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.

Claims

1. An automated layout method based on CICD, characterized by: The following steps are involved: (1) Formulate the typesetting rules and version release process. The typesetting rules include the directory structure of each business area in the product library system, the directory structure of the product, and the version rules; (2) Formulate the implementation logic of package upload and download in the product library system. Package upload carries the package attributes according to the upload requirements, and package download is deployed according to permissions or pipelines. (3) Establish a CICD pipeline for typesetting, use the CICD pipeline to control the quality of typesetting, and digitally manage the large packages of typesetting through the product library system.

2. According to the CICD-based automated typesetting method of claim 1, it is characterized by: In step (1), a product directory structure is established in the product library system to store sub-packages generated by all subsystems in the product library system, and a typesetting rule is created in the directory.

3. The CICD-based automated typesetting method according to claim 1, characterized in that: In step (3), the CICD pipeline layout process includes: (a) Upload the subsystem code to the source code manager; (b) Use static scanning tools to perform static scanning on the newly added subsystem code, and use unit testing tools to perform dynamic testing on the subsystem code; (c) When the results of scanning and unit testing meet the quality threshold requirements, compile and package, and package the individual packages according to the packaging method of each product; (d) Upload to the designated path of the product library system as required according to the package rules; (e) After all sub-packages have been uploaded, the product library system is checked for layout rules; (f) When the typesetting rule check conditions are met, typesetting is carried out. If typesetting is successful, the typesetting package is tested and verified. After the test passes, it is released.

4. The CICD-based automated layout method according to claim 3, characterized in that: In step (f), after the versioning is successful, the versioned package is uploaded to the product library system, and the version number and version description of the versioned package are determined. When the product library system detects a package with the same version number as the versioned package, the product library system backs up the version of the package in itself to facilitate version tracing and rollback.

5. The CICD-based automated layout method according to claim 4, characterized in that: When the properties of the versioned package change, the version properties of the versioned package are modified so that the status of the versioned package in the product library system is the latest status.

6. The CICD-based automated layout method according to claim 3, characterized in that: In step (f), after the versioning is successful, the MD5 value and Hash value of the versioned package in the product library system are verified to ensure the integrity and consistency of the versioned package.

7. The CICD-based automated typesetting method according to claim 3, characterized in that: In step (f), the product library system detects the test status of the assembled package. Only when the test of the assembled package meets the requirements of the quality gate, the assembled package is allowed to be released.

Citation Information

Patent Citations

  • System software release integrated method, compiling server and system

    CN103294514A

  • Automatic CI / CD assembly line method based on Jenkins

    CN112130956A

  • Automatic publishing and deploying method and device, medium and computer equipment

    CN114610327A

  • Cross jobs failure dependency in CI / CD systems

    US20200387441A1