Code item management method and device

By integrating pipeline operation processes and code project configuration processes into the configuration management system, the system switching problem caused by the independence of code repositories and CI/CD pipelines was solved, realizing full-process automated management, improving the development efficiency and quality of code projects, and promoting team collaboration.

CN121050756APending Publication Date: 2025-12-02QI AN XIN TECHNOLOGY GROUP INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510957906.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

In the existing code project management process, the code repository and CI/CD pipeline operating system run independently, which requires developers to switch back and forth between the two systems, increasing the cost of manual intervention, making it prone to errors, and affecting efficiency.

Method used

By integrating pipeline operation processes and code project configuration processes into the configuration management system, the system enables attribute management of code repositories, pipeline parameter settings, automated triggering of pipeline execution tasks, and result display, reducing system switching and achieving fully automated management of the entire process.

Benefits of technology

It improves the efficiency of code project management, reduces the risk of errors, automates the entire process from code management to deployment, improves code quality and team collaboration efficiency, and provides detailed execution logs and traceability support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121050756A_ABST
    Figure CN121050756A_ABST
Patent Text Reader

Abstract

The invention discloses a code item management method and device, and relates to the technical field of operation and maintenance management. The method comprises the steps of executing a configuration management operation on a code warehouse corresponding to a code item; the configuration management operation is used for managing attribute information of code items in the code repository; setting assembly line parameters of the assembly line operation process, wherein the assembly line parameters are trigger factors for triggering the assembly line operation process; an operation instruction is received, a corresponding assembly line execution task is constructed when an assembly line operation process is triggered based on the operation instruction, and the operation instruction comprises assembly line parameters; obtaining a corresponding code item based on the assembly line execution task, performing operation, and displaying an execution state and an execution result through a preset continuous integration tool; and according to the execution state and the execution result, triggering a code item configuration process to carry out warehousing storage on the adjusted code item. The method and the device are used for realizing a code project management function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of operation and maintenance management technology, and in particular to a method and apparatus for managing code projects. Background Technology

[0002] In the existing software development and operations field, code repository management and CI / CD (Continuous Integration / Continuous Deployment) pipeline operations are usually independent of each other. The code repository is mainly used for code storage, version control, and change logging, while the CI / CD pipeline operating system is responsible for compiling and packaging the code. In the CI / CD pipeline operating system, Jenkins is mainly used as the mainstream continuous integration tool to complete the above-mentioned tasks of compiling, packaging, testing, and deploying code projects.

[0003] While both systems can perform their functions independently, in practice, developers need to complete compilation, packaging, and deployment operations in the CI / CD pipeline operating system before they can perform subsequent management actions such as tagging and archiving in the corresponding code repository management system. Because these two systems operate independently and lack effective integration and interaction mechanisms, developers need to manually switch and confirm between the two systems repeatedly. This makes the existing workflow for managing code projects cumbersome and error-prone. For example, after completing code building in the pipeline, developers must manually return to the configuration management system for version marking and archiving. This process not only increases the cost of manual intervention but can also lead to process blockages and task duplication due to delays or errors, significantly impacting the efficiency of code project management. Summary of the Invention

[0004] This application provides a code project management method and apparatus. The main purpose is to implement a code project management method to solve the problems of manual intervention costs and process blockage and task duplication caused by operation identification in the existing code project management process, which require repeated switching between operation pipelines and configuration management systems, thereby solving the problem of severely affected efficiency in this process.

[0005] To address the aforementioned technical problems, this application provides the following technical solutions:

[0006] Firstly, this application provides a code project management method applied to a configuration management system. The configuration management system includes a pipeline operation process and a code project configuration process. The pipeline operation process is used to adjust code projects in the form of tasks based on continuous delivery or continuous deployment functionality. The code project configuration process is used to store and manage the adjusted code projects in a database. The method includes:

[0007] Perform configuration management operations on the code repository corresponding to the code project; the configuration management operations are used to manage the attribute information of the code project in the code repository.

[0008] Set the pipeline parameters for the pipeline operation process, whereby the pipeline parameters are triggering factors that trigger the pipeline operation process;

[0009] When receiving an operation instruction and triggering a pipeline operation process based on the operation instruction, a corresponding pipeline execution task is constructed, wherein the pipeline execution task includes at least one of code encoding operation, code packaging operation, code testing operation, and code deployment operation; the operation instruction contains the pipeline parameters.

[0010] Based on the pipeline, the corresponding code project is obtained and operated on, and the execution status and results are displayed through a preset continuous integration tool.

[0011] Based on the execution status and execution result, the code project configuration process is triggered to save the adjusted code project into the database.

[0012] Secondly, this application also provides a code project management device applied to a configuration management system. The configuration management system includes a pipeline operation process and a code project configuration process. The pipeline operation process is used to adjust code projects in the form of tasks based on continuous delivery or continuous deployment functionality. The code project configuration process is used to store and manage the adjusted code projects in a database. The device includes:

[0013] An execution unit is used to perform configuration management operations on the code repository corresponding to the code project; the configuration management operations are used to manage the attribute information of the code project in the code repository.

[0014] The setting unit is used to set the pipeline parameters of the pipeline operation process, wherein the pipeline parameters are the triggering factors that trigger the pipeline operation process;

[0015] A construction unit is configured to receive an operation instruction and, when the pipeline operation process is triggered based on the operation instruction, construct a corresponding pipeline execution task, wherein the pipeline execution task includes at least one of code encoding operation, code packaging operation, code testing operation, and code deployment operation; the operation instruction includes the pipeline parameters.

[0016] The operation unit is used to obtain the corresponding code project based on the pipeline execution task and perform operations, and to display the execution status and execution results through a preset continuous integration tool;

[0017] The storage unit is used to trigger the code project configuration process to save the adjusted code project into the database based on the execution status and execution result.

[0018] Thirdly, embodiments of this application provide a storage medium including a stored program, wherein, when the program is running, the device where the storage medium is located executes the code project management method of the terminal device described in the first aspect.

[0019] Fourthly, embodiments of this application provide a code project management device, the device including a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the code project management method of the terminal device described in the first aspect.

[0020] Fifthly, embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the management method for any of the code items described in the first aspect.

[0021] By employing the above-described technical solution, the technical solution provided in this application has at least the following advantages:

[0022] This application provides a method and apparatus for managing code projects, applied to a configuration management system. The configuration management system includes a pipeline operation process and a code project configuration process. The pipeline operation process is used to adjust code projects in the form of tasks based on continuous delivery or continuous deployment functions. The code project configuration process is used to store and manage the adjusted code projects in a database. In this application, configuration management operations are first performed on the code repository corresponding to the code project. These operations manage the attribute information of the code project within the repository. Then, pipeline parameters are set for the pipeline operation process, serving as triggering factors. Next, an operation instruction is received, and when the pipeline operation process is triggered based on this instruction, a corresponding pipeline execution task is constructed. This task includes at least one of code encoding, code packaging, code testing, and code deployment operations. The operation instruction contains the pipeline parameters. Finally, the corresponding code project is retrieved and operated on based on the pipeline execution task. The execution status and results are displayed using a preset continuous integration tool. Based on the execution status and results, the code project configuration process is triggered to save the adjusted code project to the repository, thereby achieving code project management. Compared to existing technologies, this application integrates the configuration management system with the pipeline, allowing developers to complete code repository management and pipeline operations within a unified system. This reduces system switching and manual intervention, lowering the risk of errors. This application automates the entire process from code management to deployment, including code repository operations, pipeline compilation, packaging, and release. Developers only need to set the pipeline parameters, and the system automatically triggers the corresponding tasks, significantly improving efficiency and avoiding the manual analysis and determination process between two systems, thus enhancing the development efficiency of code projects. Furthermore, the real-time execution status and result display in this application allows developers to promptly identify problems during the build and testing process, such as code errors or test failures. This helps developers quickly locate and fix problems, improving code quality. In addition, strict pipeline parameter settings and execution rules help ensure that the code meets project requirements and best practices. Moreover, the shared view and real-time feedback mechanism promotes collaboration among team members during the execution of the method in this application. Developers can easily view each other's code changes and build results, enabling timely communication and coordination. Furthermore, the automated repository saving operation and detailed execution logs in this application provide strong support for project traceability, allowing developers to easily track the history of code changes and detailed build process information, which is beneficial for subsequent diagnosis and code project backtracking.

[0023] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description

[0024] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, with the same or corresponding reference numerals denoteing the same or corresponding parts, wherein:

[0025] Figure 1 A flowchart illustrating a code project management method provided in an embodiment of this application is shown.

[0026] Figure 2 This illustration shows a block diagram of a code project management device provided in an embodiment of this application;

[0027] Figure 3 A block diagram of another code project management device provided in an embodiment of this application is shown. Detailed Implementation

[0028] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.

[0029] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.

[0030] This application provides a method for managing code projects, specifically as follows: Figure 1 As shown, the method includes:

[0031] 101. Perform configuration management operations on the code repository corresponding to the code project.

[0032] The configuration management operation is used to manage the attribute information of the code projects in the code repository.

[0033] In this embodiment, the method is applied to a configuration management system, which includes a pipeline operation process and a code project configuration process. The pipeline operation process is used to adjust code projects in the form of tasks based on continuous delivery or continuous deployment functions. The code project configuration process is used to store and manage the adjusted code projects in a database. It should be noted that, for the convenience of subsequent description, this configuration management system will be referred to as "this system" from now on.

[0034] In a configuration management system, developers first perform configuration management operations on the code repository corresponding to the code project. These operations include managing the attribute information of the code projects in the code repository, such as setting access permissions for the code, recording the code's change history, and maintaining the code's version information. This process ensures the orderliness and security of the code repository, laying the foundation for subsequent development work. For example, developers can set access levels for different team members to specific code modules, ensuring that sensitive code can only be modified by authorized personnel.

[0035] 102. Set the pipeline parameters for the pipeline operation process.

[0036] The pipeline parameters are triggering factors that trigger the pipeline operation process.

[0037] Next, developers configure pipeline parameters in the configuration management system. These parameters are key factors that trigger the pipeline process, including build trigger conditions (such as code submission to a specific branch), build environment configuration (such as specifying the compiler version and dependencies), and testing requirements (such as unit test coverage thresholds). For example, it can be configured to automatically trigger unit tests and code packaging tasks when code is pushed to the "develop" branch; while for the "master" branch, more stringent trigger conditions are configured, including triggering integration tests and deployment tasks only after passing code review and security scans.

[0038] 103. When receiving an operation instruction and triggering the pipeline operation process based on the operation instruction, construct the corresponding pipeline execution task.

[0039] The pipeline execution task includes at least one of code encoding, code packaging, code testing, and code deployment operations; the operation instructions include the pipeline parameters.

[0040] In this step, the system can also receive operation instructions from the management system. These instructions can be manually triggered by developers (e.g., clicking the build button via the user interface) or automatically detected by the system (e.g., code updates in the code repository). The system triggers a pipeline operation process (CI / CD) based on the pipeline parameters in the operation instructions, building the corresponding pipeline execution tasks. These tasks include at least one or more of the following: code compilation, code packaging, code testing, and code deployment. For example, when a developer submits code changes, the system automatically detects the code repository update and triggers a Jenkins build task based on pre-set pipeline parameters, executing code compilation, packaging, and unit testing.

[0041] 104. Based on the pipeline execution task, obtain the corresponding code project and perform operations, and display the execution status and execution results through a preset continuous integration tool.

[0042] In this embodiment, when modifications to the code project are detected, the corresponding code project can be retrieved and manipulated based on the build pipeline. During task execution, the execution status and results are displayed through a pre-defined continuous integration tool (such as Jenkins). Developers can view the task progress in real time in the configuration management system's user interface, such as whether compilation was successful and the pass rate of test cases. Jenkins generates detailed execution logs, recording the execution details of each step, which are crucial for debugging and optimizing the build process.

[0043] 105. Based on the execution status and execution result, trigger the code project configuration process to save the adjusted code project into the database.

[0044] Finally, in this step, the system triggers the code project configuration process based on the execution status and results of the pipeline tasks, saving the adjusted code project to the repository. If the task executes successfully, the system automatically saves the built code version to the specified release branch or repository in the configuration management system, updating the version and status information of the relevant projects. This process ensures that only verified and tested code versions can be released and deployed.

[0045] This application provides a code project management method applied to a configuration management system. The configuration management system includes a pipeline operation process and a code project configuration process. The pipeline operation process is used to adjust code projects in the form of tasks based on continuous delivery or continuous deployment functions. The code project configuration process is used to store and manage the adjusted code projects in a database. In this embodiment, configuration management operations are first performed on the code repository corresponding to the code project. These operations manage the attribute information of the code project within the repository. Then, pipeline parameters are set for the pipeline operation process, serving as triggering factors. Next, an operation instruction is received, and when the pipeline operation process is triggered based on this instruction, a corresponding pipeline execution task is constructed. This task includes at least one of code encoding, code packaging, code testing, and code deployment operations. The operation instruction contains the pipeline parameters. Finally, the corresponding code project is retrieved and operated on based on the pipeline execution task. The execution status and results are displayed using a preset continuous integration tool. Based on the execution status and results, the code project configuration process is triggered to save the adjusted code project to the repository, thereby achieving code project management. Compared to existing technologies, this embodiment integrates the configuration management system with the pipeline, allowing developers to complete code repository management and pipeline operations within a unified system. This reduces system switching and manual intervention, lowering the risk of errors. Meanwhile, this application embodiment achieves end-to-end automation from code management to deployment, including code repository operations, pipeline compilation, packaging, and release. Developers only need to set the pipeline parameters, and the system will automatically trigger the corresponding tasks, which can significantly improve efficiency and avoid the manual process of analyzing and determining between two systems, thereby improving the development efficiency of code projects. In addition, the real-time execution status and result display in this application embodiment allows developers to promptly identify problems in the build and testing process, such as code errors or test failures. This helps developers quickly locate and fix problems, improving code quality. Furthermore, strict pipeline parameter settings and execution rules also help ensure that the code meets project requirements and best practices. Moreover, during the execution of the method in this application embodiment, the shared view and real-time feedback mechanism promote collaboration among team members. Developers can easily view each other's code changes and build results, communicate and coordinate in a timely manner. In addition, the automated repository saving operation and detailed execution logs in this application embodiment provide strong support for project traceability, allowing developers to easily track the history of code changes and detailed information of the build process, which is beneficial for subsequent diagnosis and code project backtracking.

[0046] As a further description and refinement of the above embodiments, in some embodiments, before step "102, setting pipeline parameters for the pipeline operation process" in the foregoing embodiments, the method further includes:

[0047] Create a project name and version information for the code project, and enter the repository source information for the code repository;

[0048] Configure the triggering conditions and execution environment for the pipeline operation process of each code project.

[0049] In this embodiment, during the process of creating a project name and version information for the code project and entering the repository source information of the code repository, the developer creates a unique project name for the new code project in the configuration management system, such as "OnlineStore_v2", and specifies its initial version information, such as "v1.0.0". Simultaneously, the repository source information is entered, including the repository URL, access credentials, and branching policy. For example, for a Git-based repository, the URL might be "https: / / github.com / OnlineStore / Backend.git", and the access credentials could be an SSH key or a PAT (Personal Access Token). The branching policy might specify that the "main" branch is used for the production environment, and the "develop" branch is used for daily development.

[0050] In this embodiment, the triggering conditions and execution environment for the pipeline operation process of each code project are configured. During execution, developers configure the triggering conditions and execution environment of the pipeline operation process in the configuration management system according to the specific needs of the project. Triggering conditions can be code submission to a specific branch (such as the "develop" or "feature" branch), or triggering after code review approval. Execution environment configuration includes specifying the programming language version, build tool version, and dependency library versions. For example, for a Java project, JDK 11 and Maven 3.8.1 can be specified, and relevant test environment variables can be configured.

[0051] The method described in this embodiment enables developers to establish a clear initial structure and rules for each code project, ensuring the smooth management and development process of the code project.

[0052] As a further description and refinement of the above embodiments, in some embodiments, step "103. When the pipeline operation process is triggered based on the operation instruction, construct the corresponding pipeline execution task" in the foregoing embodiments includes:

[0053] S11. When it is determined that the corresponding behavior involves the adjustment of the code project based on the operation instruction, the operation instruction is determined to trigger the pipeline operation process, and a task build request is sent to the preset continuous integration tool.

[0054] S12. The corresponding pipeline execution task is constructed based on the task construction request and pipeline parameters using a preset continuous integration tool;

[0055] Step 104 of the aforementioned embodiment, "obtaining the corresponding code project based on the pipeline execution task and performing operations, and displaying the execution status and results through a preset continuous integration tool," includes:

[0056] S21. Based on the pipeline execution task, adjust the parameters in the corresponding code project according to the pipeline parameters, and control the preset continuous integration tool to provide real-time feedback of the execution log during the execution of the pipeline execution task. The execution log is used to describe the execution status and the execution result in detail.

[0057] In this embodiment, the process of triggering the pipeline operation in step S11 is as follows:

[0058] First, determine the action corresponding to the operation instruction. Specifically, after receiving an operation instruction, the configuration management system first needs to determine whether the operation involves adjustments to the code project. For example, when a developer submits new code changes to the code repository, or manually initiates a build request in the configuration management system, the system will recognize these operations as adjustments to the code project.

[0059] Then, the pipeline is triggered based on the submitted code changes. In the configuration management system's user interface, developers can manually click the build button to initiate a build request. In the request, developers can select specific code branches, commit versions, and other information; the system uses this information as instructions for subsequent build tasks.

[0060] Subsequently, the pipeline operation process is triggered, and a task build request is sent to the preset continuous integration tool. In this embodiment, the preset continuous integration tool can specifically be the Jenkins tool. Specifically, once it is determined that the operation instruction involves adjustments to the code project, the configuration management system will trigger the pipeline operation process and send a task build request to the preset continuous integration tool Jenkins.

[0061] Finally, a build request is sent. This build request contains pipeline parameters, which are crucial for the execution of the build task. For example, the build request specifies the code branch to be built, the build environment (such as the compiler version and dependency library versions), and the build target (such as generating an executable file or packaging it into an installer). The system sends the build request to Jenkins via the Jenkins API. Upon receiving the request, Jenkins places it in the task queue, awaiting execution.

[0062] Furthermore, during step S12, when building the pipeline execution task, Jenkins constructs the corresponding pipeline execution task based on the task build request and pipeline parameters. Specifically, after receiving a task build request, Jenkins constructs the specific pipeline execution task according to the pipeline parameters in the request. Then, it parses the task build request. First, Jenkins parses the task build request and extracts the pipeline parameters. For example, it obtains the code branch information to be built from the request, determining the target branch for this build; it obtains the build environment parameters and sets the environment variables required for the build task, such as specifying the use of Java 11 environment and Maven 3.8.1 build tool. Finally, it creates the build task. Here, based on the parsed pipeline parameters, Jenkins creates the corresponding build task. The build task includes multiple stages, such as code checkout, compilation, testing, and packaging. During the code checkout phase, Jenkins checks out the code of the corresponding branch from the specified code repository; during the compilation phase, it compiles the code using the specified compiler according to the project's build configuration (such as the pom.xml file for Maven projects); during the testing phase, it runs unit tests and integration test cases to verify the functionality and quality of the code; and during the packaging phase, it packages the compiled code into a deployable software package, such as a JAR file or a WAR file.

[0063] The process of obtaining the code project, performing operations, and displaying the execution status and results in step S21 is as follows:

[0064] 1. Execute tasks based on a pipeline to obtain and manipulate corresponding code projects. Specifically, Jenkins can retrieve the relevant code projects based on the build task configuration and perform corresponding operations. This includes:

[0065] (1) Obtaining the code project. During the code checkout phase of the build task, Jenkins checks out the code of a specified branch or version from the code repository through a version control system (such as Git, SVN, etc.). For example, the Git command is used to pull the code of the "feature / new_ui" branch in the code repository to the workspace of the build server.

[0066] (2) Performing operations on the code project. After acquiring the code project, Jenkins operates on the code according to each stage of the build task. In the compilation stage, the code is compiled to generate an executable file or intermediate artifact; in the testing stage, test cases are run to verify the code; in the packaging stage, the code is packaged into the final software package. At the same time, the parameters in the code project are adjusted according to the pipeline parameters. For example, if a specific configuration file version is specified in the pipeline parameters, Jenkins will include that configuration file in the software package during the packaging process; or, parameters such as log level and connection timeout in the code are adjusted according to the parameter settings.

[0067] 2. Control Jenkins to provide real-time feedback on execution logs. During the execution of tasks in the pipeline, the configuration management system needs to obtain the execution status and results of the tasks in real time and display the execution logs through Jenkins.

[0068] (1) Real-time acquisition of execution status and results. Jenkins generates detailed execution logs during task execution, recording the execution status of each stage, including the task's start time, end time, execution steps, error messages, etc. The configuration management system obtains this execution log information in real time through the Jenkins API interface. For example, every few seconds, it requests the latest status of the build task through the Jenkins API, including build progress, test result statistics, and other information.

[0069] (2) Displaying Execution Status and Results. The configuration management system displays the obtained execution status and results to developers in the user interface. This can be done in various ways, such as displaying the build progress as a progress bar, listing the execution results of test cases (pass / fail / skipped) in a table, or displaying detailed execution logs in text format. Developers can view this information to understand the progress of the build task in a timely manner and promptly identify and resolve problems. For example, when a test case fails, developers can view the specific error stack information in the execution log to quickly locate the line of code where the problem occurred.

[0070] As a further description and refinement of the above embodiments, in some embodiments, step "105. Based on the execution status and execution result, trigger the code project configuration process to save the adjusted code project into the database" in the foregoing embodiments includes:

[0071] Based on the execution results, the adjusted code projects are tagged and / or archived in the code repository, and the version and status information of the adjusted code projects are updated.

[0072] In this embodiment, the specific execution method when triggering the code project configuration process is as follows:

[0073] (1) Determine subsequent operations based on execution results. After Jenkins completes the pipeline execution task, it sends the execution results to the configuration management system, including information such as build success or failure, test pass rate, and packaging results. The configuration management system uses these execution results to determine whether to trigger the code project configuration process for storage.

[0074] (2) Triggering the code project configuration process. If the execution result meets the preset conditions, such as successful build and test pass rate reaching the set threshold, the configuration management system will trigger the code project configuration process. This process is usually predefined in the configuration management system and is used to process verified code versions.

[0075] (3) Tag and / or archive the adjusted code items.

[0076] During the tagging process, modified code items are tagged within the code repository. This typically involves adding tags to specific commits or branches for identification and management. For example, in a Git repository, the command `git tag -a v1.0.0 -m "Release version 1.0.0"` can be used to add a version tag to a commit. This tag identifies a stable release version, facilitating subsequent deployment and maintenance. For instance, suppose a web application, after being built and tested, meets release standards; the configuration management system instructs the repository management tool to tag the corresponding code commit with "v1.0.0". This tag indicates that the version is a verified stable version ready for release to users.

[0077] During the archiving process, this system may also archive adjusted code projects. This includes archiving specific versions or branches in the code repository, typically moving them to a dedicated archive storage location and recording the archiving time, version information, etc. For example, moving older versions of code to the archive repository helps maintain the cleanliness and efficiency of the main code repository. For instance, for an older, no longer maintained code branch "legacy_branch," the configuration management system will trigger the archiving process, copying the branch's code to the archive repository and recording the archiving time, archivist, and other information. In this way, older versions of code are still accessible without interfering with current development work.

[0078] Furthermore, this embodiment also involves the process of updating the version information and status information of the adjusted code project.

[0079] During the version update process, the version information of the adjusted code project can be updated in the configuration management system. This involves modifying the version number in the project configuration file or database to reflect the latest code status. For example, updating the project version from "1.0.0-beta" to "1.0.0-release". Alternatively, in the project configuration interface of the configuration management system, developers or the system automatically update the project version information from "test version" to "release version" and save it to the configuration management system's database. This way, all team members can clearly understand the latest version status of the current project.

[0080] During the update of status information, in addition to version information, it is also necessary to update the status information of the code project, such as build status, test status, and deployment status. This status information helps team members quickly understand the overall status of the code project. For example, a new status field "last_build_success" can be added to the configuration management system, and its value can be set to "true" to indicate that the last build was successful. For example, in the configuration management system, the project's status information display area will be updated with the relevant build, test, and deployment statuses. If the last deployment operation is successfully completed, the system will update the project status to "deployed" and record the deployment time and environment information. In this way, the operations team can quickly understand whether the project has been successfully deployed to the production environment.

[0081] As a further description and refinement of the above embodiments, in some embodiments, the method further includes:

[0082] Set monitoring rules for the pipeline operation process during execution, wherein the monitoring rules are used to determine whether there are any abnormalities in the currently running pipeline operation process;

[0083] When an abnormal state occurs in the pipeline operation process, an alarm is triggered according to preset rules and corresponding processing operations are performed.

[0084] Specifically, in this embodiment, the main steps are as follows:

[0085] First, set up monitoring rules. In the configuration management system, developers set up monitoring rules for the pipeline operation process based on the project's needs and characteristics. These rules are used to monitor the execution status of pipeline tasks in real time and promptly detect potential anomalies. Specifically, monitoring metrics need to be defined first. Common monitoring metrics include task execution time, number of task failures, and resource utilization (such as CPU and memory usage). For example, the execution time of a pipeline task may be limited to no more than 30 minutes, and the number of unit test failures may be limited to no more than 3. Thresholds and conditions also need to be set. Reasonable thresholds and judgment conditions should be set for each monitoring metric. For example, a warning may be issued when the task execution time exceeds 25 minutes, and a critical alarm may be triggered when it exceeds 30 minutes; a warning may be issued when the number of unit test failures reaches 2, and the task may be automatically terminated and an alarm may be triggered when it reaches 3. Furthermore, alarm methods can be configured. The alarm method when a monitoring rule is triggered can be determined, such as sending emails, instant messages (such as DingTalk, WeChat Enterprise Account), or SMS. At the same time, the recipients or groups of alarms can be specified to ensure that relevant development and operations personnel can receive alarm information in a timely manner.

[0086] Then, the pipeline operation process is monitored based on monitoring rules. During the execution of the pipeline operation process, the configuration management system monitors the status of tasks in real time through the following methods: polling and event listening. For the polling mechanism, the configuration management system obtains the execution status information of the pipeline tasks through the Jenkins API at set time intervals (e.g., every 30 seconds), including the current stage of the task, execution time, and resource usage. For example, the system periodically queries the Jenkins task status interface to obtain data such as the progress percentage and elapsed time of the build task. For the event listening mechanism, it can be based on Jenkins, that is, Jenkins sends event notifications to the configuration management system when the task status changes (e.g., task start, task completion, task failure, etc.). The configuration management system receives these events by registering listeners and processes them immediately. For example, when a failed test case occurs during the unit testing phase, Jenkins sends an event to the configuration management system in real time, notifying it of the specific failure information.

[0087] Finally, anomalies are identified and handled. Specifically, during anomaly identification, the acquired pipeline task status information can be analyzed and judged according to the set monitoring rules. If anomalies are found, such as task execution time exceeding a set threshold or the number of task failures reaching a specified number, the system immediately determines that there is an anomaly in the pipeline operation process. For example, in the code build phase, if the build task has been running for 35 minutes (exceeding the set 30-minute threshold), the configuration management system determines that the task has an anomaly according to the monitoring rules.

[0088] When an anomaly is detected, this system issues an alert and performs corresponding processing operations according to preset rules. Specifically, the system immediately notifies relevant personnel through preset alert methods. For example, it sends email and SMS alerts to the development team leader and the developers responsible for the module, informing them of the specific details of the task execution timeout, including task name, start time, and current execution time. In addition to the above alerts, the system can also perform other processing operations. For example, it can automatically pause subsequent deployment tasks to prevent potentially problematic code from being deployed to the production environment; roll back to the previous stable code version to ensure stable system operation; and collect detailed log information to provide a basis for subsequent troubleshooting. If the slow task execution is due to insufficient resources, the system can automatically trigger resource expansion operations according to preset rules, such as increasing the CPU and memory resources of the build server.

[0089] As a further description and refinement of the above embodiments, in some embodiments, the aforementioned embodiment step "S21, the control preset continuous integration tool provides real-time feedback of execution logs" includes:

[0090] S211. Obtain the execution status of the pipeline execution task in real time from the preset continuous integration tool through polling or event listening, and determine the execution result;

[0091] S212. Display the execution status and execution results in a graphical and / or list format through an interactive interface.

[0092] In step S211, during the real-time acquisition of execution status and results, this system can periodically send requests to a pre-defined continuous integration tool (such as Jenkins) to obtain the execution status and results of pipeline tasks. For example, the system sends a request every 30 seconds via the Jenkins API to query the current stage (e.g., compilation, testing, packaging), progress percentage, status (running, success, failure, etc.), and the latest portion of the output logs. For instance, in Jenkins, each build task has a REST API interface for obtaining task status and log information. The configuration management system can send an HTTP GET request to this interface, such as http: / / jenkins-server / api / json?tree=jobs[name,color],queue[items[name,blocked,executable[url]]], to obtain detailed task status information, including task name and status (e.g., red indicates failure, blue indicates success).

[0093] Then, based on the preset continuous integration tools, events are triggered at key nodes in the pipeline execution (such as task start, stage completion, task failure, task success, etc.), and notifications are sent to the configuration management system. The configuration management system subscribes to these events to obtain the execution status and results of the tasks in real time. For example, in Jenkins, the JenkinsNotifier plugin or a webhook configuration can be used to send an HTTP POST request to a specified interface of the configuration management system when the task status changes. After receiving the notification, the configuration management system parses the status information and log links in the request to obtain detailed execution results.

[0094] In step S211, during the process of determining the execution result, the configuration management system can determine the final execution result of the pipeline execution task based on the obtained execution status and log information. For example, if all stages are successfully completed and all test cases pass, it is determined as a success; if any stage fails or a test case fails, it is determined as a failure.

[0095] In step S212, the execution status and results are displayed through an interactive interface. For graphical displays, the configuration management system's interactive interface uses graphical elements (such as progress bars, status indicators, charts, etc.) to visually show the execution status and results of the pipeline tasks. For example, a progress bar is displayed at the top of the interface to indicate the overall completion progress of the task. During task execution, the progress bar gradually fills until the task is completed. For each stage (such as compilation, testing, and packaging), different colored status indicators (green for success, red for failure, and yellow for in progress) are used to display its execution status. If the testing stage has multiple test cases, a small bar chart is used to display the number of passed, failed, and skipped test cases.

[0096] For list-based displays, the execution status and results of each stage of the pipeline task can be shown in detail using tables or lists, including stage name, start time, end time, status, and log links. For example, a table can be displayed in the center of the interface, with columns including "Stage Name," "Start Time," "End Time," "Status," and "Log Link." During task execution, the table updates the information for each stage in real time. Clicking the "Log Link" allows viewing the detailed execution log for that stage, including error stack information and test result details. For failed stages, the table row background turns red, and the "Status" column displays detailed error codes or reasons (e.g., "Compilation Error: Syntax Error").

[0097] Using the method in this embodiment, developers can understand the execution status of pipeline tasks in real time, identify and resolve problems in a timely manner, and improve development efficiency and software quality.

[0098] As a further description and refinement of the above embodiments, in some embodiments, "when the pipeline operation process is triggered based on the operation instruction" in step 103 of the aforementioned embodiments includes:

[0099] When an interface call instruction for a pipeline operation process is determined based on the operation instruction, a preset continuous integration tool is invoked based on the interface call instruction, and a task build request is generated to trigger the pipeline operation process.

[0100] or,

[0101] When the operation target is determined to be a code project in the target associated region of the code repository based on the operation instruction, it is obtained whether the code project corresponding to the operation target in the target management region has been updated. When it is determined that the code project corresponding to the operation target has been updated, a task build request is sent to the preset continuous integration tool so that the preset continuous integration tool can build the corresponding pipeline to execute the task and trigger the pipeline operation process.

[0102] Based on the above content of this embodiment, it can be seen that there are actually two ways to trigger the pipeline operation process: one is based on direct triggering of instructions, and the other is based on automatic triggering after changes occur in the code projects in the code repository. The specific execution processes are as follows:

[0103] (I) Triggered by interface call command

[0104] First, it's necessary to identify the API call instructions within the operation directives. In this configuration management system, developers can send operation directives through the user interface or scripts. These directives may contain explicit API call instructions, such as invoking Jenkins' build interface via a REST API request or command-line command. For example, a developer might enter a command like `curl -X POST http: / / jenkins-server / job / project-name / build` in the configuration management system's command-line interface, or click the "Build" button in the user interface, which integrates a call to the Jenkins API.

[0105] Next, the API call command is parsed. Specifically, after receiving the operation instruction, the configuration management system parses the API call command and extracts necessary parameters, such as the Jenkins server address, task name, and authentication information. For example, this system parses the above curl command to obtain the Jenkins server address http: / / jenkins-server and the task name project-name.

[0106] Finally, a task build request is generated and sent. Specifically, based on the parsed API call instructions, the configuration management system can generate a task build request and send it to the default continuous integration tool Jenkins. For example, in this system, a request can be generated and sent to http: / / jenkins-server / job / project-name / build to trigger the project-name task in Jenkins.

[0107] (ii) Triggered by code repository update

[0108] First, the target of the operation needs to be identified as a code project within the code repository. Specifically, the configuration management system monitors specific areas or code projects within the repository; these areas or projects are defined as the target-related areas. For example, developers might have configured monitoring of the feature branch within the configuration management system.

[0109] For example, developers set rules in a configuration management system to specify the feature branches of the code repository to focus on.

[0110] Next, the code project is checked for updates. This process can be based on the configuration management system using hooks (such as hook functions) within the version control system (like Git) or a periodic polling mechanism to detect whether the code project in the target associated area has been updated. For example, using Git's post-receive hook, when code is pushed to the feature branch, the hook script sends a notification to the configuration management system.

[0111] Then, a build request is sent. Once the system detects an update to the code project, it automatically sends a build request to Jenkins, triggering the pipeline operation process. For example, upon receiving a notification of a feature branch update, the configuration management system calls the Jenkins API, triggering the corresponding build task and initiating the pipeline operation process.

[0112] As a further description and refinement of the above embodiments, in some embodiments, step "101. Perform configuration management operation on the code repository corresponding to the code project" in the foregoing embodiments includes: performing version management, permission setting and change record operation on the code repository.

[0113] The version management is used to set version information for code projects, the permission settings are used to control the permission level controlled for each code project, and the change record operation is used to record information on adjustments made to the code project.

[0114] (1) For version management operations, you can first initialize the version settings. When the code repository is created, the configuration management system will initialize the version information. Usually, the first committed version will be set as the initial version, such as v1.0.0.

[0115] Then, version updates are performed as needed. As the project develops, developers can include descriptions of version updates in their commit messages, such as fixing a vulnerability or adding a new feature. The configuration management system will then update the project's version information based on these commit messages.

[0116] Finally, a version release is required. When the project reaches a stable state, such as passing all test cases and completing all functionalities, the configuration management system will release a new version, such as v1.0.1. This version will be marked as a stable version and can be released to users.

[0117] (2) Regarding permission settings, the first step is to define permission levels. Different permission levels are defined in the configuration management system, such as read, write, and administrator. Read permissions allow users to view the contents of the code repository; write permissions allow users to submit code changes; and administrator permissions allow users to manage the permission settings of the code repository.

[0118] Next, assign permissions. This means assigning different permissions to team members. For example, a project manager might have administrator privileges, allowing them to manage permission settings for the entire code repository; developers typically have write permissions, enabling them to submit code changes; and testers might have read permissions, allowing them to view the code but not modify it.

[0119] Finally, access control. During access to the code repository, the configuration management system will implement access control based on permission settings. If a user attempts to perform an operation beyond their permissions, such as a user with read permissions attempting to commit code changes, the system will refuse the operation and indicate insufficient permissions.

[0120] (3) Regarding change log operations: Whenever code in the code repository changes, such as committing new code or modifying existing code, the configuration management system records detailed change information. This information includes the author of the change, the time of the change, and the content of the change. Additionally, the configuration management system can be configured with change notification mechanisms, such as sending emails or instant messages. When changes occur in the code repository, the system will send notifications to relevant personnel, informing them of the content of the changes and the author's information.

[0121] Change logs allow developers to trace the history of changes to the code repository and understand the code's evolution. For example, when a code failure occurs, the change log can be used to find the code changes that caused the failure and fix them.

[0122] Through the operations described above in this embodiment, the method of this implementation can effectively manage the configuration of the code repository based on the configuration management system, ensuring the security, maintainability, and traceability of the code. These operations are an indispensable part of the software development process and help improve software quality and development efficiency.

[0123] Furthermore, as a response to the above Figure 1 In addition to the implementation of the methods shown in the above embodiments, another embodiment of this application also provides a code project management device. This code project management device embodiment corresponds to the foregoing method embodiments. For ease of reading, this code project management device embodiment will not repeat the details of the foregoing method embodiments one by one, but it should be clear that the device in this embodiment can correspondingly implement all the contents of the foregoing method embodiments. Applied to a configuration management system, the configuration management system includes a pipeline operation process and a code project configuration process, wherein the pipeline operation process is used to adjust code projects in the form of tasks based on continuous delivery or continuous deployment functions; the code project configuration process is used to store and manage the adjusted code projects in a database, specifically as follows... Figure 2 As shown, the management device for this code project includes:

[0124] Execution unit 21 can be used to perform configuration management operations on the code repository corresponding to the code project; the configuration management operations can be used to manage the attribute information of the code project in the code repository;

[0125] Setting unit 22 can be used to set pipeline parameters for pipeline operation process, wherein the pipeline parameters are triggering factors that trigger the pipeline operation process;

[0126] The construction unit 23 can be used to receive operation instructions and, when the pipeline operation process is triggered based on the operation instructions, construct a corresponding pipeline execution task, wherein the pipeline execution task includes at least one of code encoding operation, code packaging operation, code testing operation, and code deployment operation; the operation instructions include the pipeline parameters set by the setting unit 22;

[0127] Operation unit 24 can be used to obtain the corresponding code project with attribute information set by execution unit 21 based on the pipeline execution task built by the construction unit 23 and perform operations, and display the execution status and execution results through a preset continuous integration tool;

[0128] The storage unit 25 can be used to trigger the code project configuration process to store the adjusted code project in the database based on the execution status and execution result displayed by the operation unit 24.

[0129] Furthermore, such as Figure 3 As shown, the device further includes:

[0130] The creation unit 26 can be used to create a project name and version information for the code project, and to enter the repository source information of the code repository, so that the execution unit 21 can manage and set the attribute information of the code project.

[0131] Configuration unit 27 can be used to configure the triggering conditions and execution environment of the pipeline operation process for each code project created by creation unit 26.

[0132] Furthermore, such as Figure 3 As shown, the construction unit 23 can also be specifically used to determine that the operation instruction triggers the pipeline operation process when it is determined based on the operation instruction that the corresponding behavior involves the adjustment of the code project, and send a task construction request to the preset continuous integration tool; and to construct the corresponding pipeline execution task through the preset continuous integration tool according to the task construction request and pipeline parameters.

[0133] The operation unit 24 can also be specifically used to adjust the parameters in the corresponding code project according to the pipeline parameters based on the pipeline execution task, and control the preset continuous integration tool to provide real-time feedback of the execution log during the pipeline execution task. The execution log can be used to describe the execution status and the execution result in detail.

[0134] Furthermore, such as Figure 3 As shown, the storage unit 25 can also be used to perform tagging and / or archiving operations on the adjusted code projects in the code repository based on the execution results, and update the version information and status information of the adjusted code projects.

[0135] Furthermore, such as Figure 3 As shown, the device further includes:

[0136] The monitoring unit 28 can be used to set monitoring rules for the pipeline operation process during execution. The monitoring rules can be used to determine whether there is an abnormality in the currently running pipeline operation process; and when there is an abnormality in the pipeline operation process, an alarm is issued according to the preset rules and corresponding processing operations are performed.

[0137] Furthermore, such as Figure 3As shown, the operation unit 24 can also be used to obtain the execution status of the pipeline execution task in real time from the preset continuous integration tool through polling or event listening, and determine the execution result; and to display the execution status and execution result in a graphical and / or list form through an interactive interface.

[0138] Furthermore, such as Figure 3 As shown, the construction unit 23 can also be specifically used to, when the operation instruction determines that there is an interface call instruction for a pipeline operation process, call a preset continuous integration tool based on the interface call instruction and generate a task build request to trigger the pipeline operation process; or, when the operation target is determined to be a code project in the target associated area of ​​the code repository based on the operation instruction, obtain whether the code project corresponding to the operation target in the target management area has been updated, and when it is determined that the code project corresponding to the operation target has been updated, send a task build request to the preset continuous integration tool so that the preset continuous integration tool can build the corresponding pipeline execution task and trigger the pipeline operation process.

[0139] Furthermore, such as Figure 3 As shown, the execution unit 21 can also be used to perform version management, permission settings, and change record operations on the code repository; wherein, the version management can be used to set version information for code projects, the permission settings can be used to control the permission level controlled for each code project, and the change record operation can be used to record information on adjustments made to code projects.

[0140] This application provides a method and apparatus for managing code projects, applied to a configuration management system. The configuration management system includes a pipeline operation process and a code project configuration process. The pipeline operation process is used to adjust code projects in the form of tasks based on continuous delivery or continuous deployment functions. The code project configuration process is used to store and manage the adjusted code projects in a database. In this embodiment, configuration management operations are first performed on the code repository corresponding to the code project. These operations manage the attribute information of the code project within the repository. Then, pipeline parameters are set for the pipeline operation process, serving as triggering factors. Next, an operation instruction is received, and when the pipeline operation process is triggered based on this instruction, a corresponding pipeline execution task is constructed. This task includes at least one of code encoding, code packaging, code testing, and code deployment operations. The operation instruction contains the pipeline parameters. Finally, the corresponding code project is retrieved and operated on based on the pipeline execution task. The execution status and results are displayed using a preset continuous integration tool. Based on the execution status and results, the code project configuration process is triggered to save the adjusted code project to the repository, thereby achieving code project management. Compared to existing technologies, this embodiment integrates the configuration management system with the pipeline, allowing developers to complete code repository management and pipeline operations within a unified system. This reduces system switching and manual intervention, lowering the risk of errors. Meanwhile, this application embodiment achieves end-to-end automation from code management to deployment, including code repository operations, pipeline compilation, packaging, and release. Developers only need to set the pipeline parameters, and the system will automatically trigger the corresponding tasks, which can significantly improve efficiency and avoid the manual process of analyzing and determining between two systems, thereby improving the development efficiency of code projects. In addition, the real-time execution status and result display in this application embodiment allows developers to promptly identify problems in the build and testing process, such as code errors or test failures. This helps developers quickly locate and fix problems, improving code quality. Furthermore, strict pipeline parameter settings and execution rules also help ensure that the code meets project requirements and best practices. Moreover, during the execution of the method in this application embodiment, the shared view and real-time feedback mechanism promote collaboration among team members. Developers can easily view each other's code changes and build results, communicate and coordinate in a timely manner. In addition, the automated repository saving operation and detailed execution logs in this application embodiment provide strong support for project traceability, allowing developers to easily track the history of code changes and detailed information of the build process, which is beneficial for subsequent diagnosis and code project backtracking.

[0141] This application provides a storage medium including a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the aforementioned code project management method. The storage medium may include non-persistent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0142] This application embodiment also provides a code project management device, the device including a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the code project management method described above.

[0143] This application provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: performing a configuration management operation on the code repository corresponding to the code project; the configuration management operation is used to manage the attribute information of the code project in the code repository; setting pipeline parameters for a pipeline operation process, the pipeline parameters being triggering factors for the pipeline operation process; receiving an operation instruction, and when the pipeline operation process is triggered based on the operation instruction, constructing a corresponding pipeline execution task, wherein the pipeline execution task includes at least one of code encoding operation, code packaging operation, code testing operation, and code deployment operation; the operation instruction includes the pipeline parameters; obtaining the corresponding code project based on the pipeline execution task and performing operations, and displaying the execution status and execution results through a preset continuous integration tool; and triggering the code project configuration process to save the adjusted code project to the repository based on the execution status and execution results.

[0144] Furthermore, before setting the pipeline parameters for the pipeline operation process, the method further includes:

[0145] Create a project name and version information for the code project, and enter the repository source information for the code repository;

[0146] Configure the triggering conditions and execution environment for the pipeline operation process of each code project.

[0147] Furthermore, when the pipeline operation process is triggered based on the operation instruction, constructing the corresponding pipeline execution task includes:

[0148] When it is determined based on the operation instruction that the corresponding behavior involves the adjustment of the code project, the operation instruction is determined to trigger the pipeline operation process, and a task build request is sent to the preset continuous integration tool (Jenkins);

[0149] The corresponding pipeline is constructed and the task is executed by using a preset continuous integration tool based on the task build request and pipeline parameters.

[0150] The process of obtaining and operating on the corresponding code project based on the pipeline execution task, and displaying the execution status and results through a preset continuous integration tool, includes:

[0151] Based on the pipeline execution task, the parameters in the corresponding code project are adjusted according to the pipeline parameters, and during the execution of the pipeline execution task, the preset continuous integration tool is controlled to provide real-time feedback of the execution log, wherein the execution log is used to describe in detail the execution status and the execution result.

[0152] Furthermore, the step of triggering the code project configuration process to save the adjusted code project to the database based on the execution status and execution result includes:

[0153] Based on the execution results, the adjusted code projects are tagged and / or archived in the code repository, and the version and status information of the adjusted code projects are updated.

[0154] Furthermore, the method also includes:

[0155] Set monitoring rules for the pipeline operation process during execution, wherein the monitoring rules are used to determine whether there are any abnormalities in the currently running pipeline operation process;

[0156] When an abnormal state occurs in the pipeline operation process, an alarm is triggered according to preset rules and corresponding processing operations are performed.

[0157] Furthermore, the control preset continuous integration tool provides real-time feedback of execution logs, including:

[0158] The execution status of the pipeline tasks is obtained in real time from the preset continuous integration tool through polling or event listening, and the execution result is determined.

[0159] The execution status and results are displayed graphically and / or in list form through an interactive interface.

[0160] Furthermore, when the pipeline operation process is triggered based on the operation instruction, it includes:

[0161] When an interface call instruction for a pipeline operation process is determined based on the operation instruction, a preset continuous integration tool is invoked based on the interface call instruction, and a task build request is generated to trigger the pipeline operation process.

[0162] or,

[0163] When the operation target is determined to be a code project in the target associated region of the code repository based on the operation instruction, it is obtained whether the code project corresponding to the operation target in the target management region has been updated. When it is determined that the code project corresponding to the operation target has been updated, a task build request is sent to the preset continuous integration tool so that the preset continuous integration tool can build the corresponding pipeline to execute the task and trigger the pipeline operation process.

[0164] Furthermore, the configuration management operation performed on the code repository corresponding to the code project includes:

[0165] The code repository is managed in terms of version control, permission settings, and change logging. Version control is used to set version information for code projects, permission settings are used to control the permission level of each code project, and change logging is used to record information about adjustments made to the code projects.

[0166] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing program code with the following initialization steps: performing a configuration management operation on the code repository corresponding to the code project; the configuration management operation is used to manage the attribute information of the code project in the code repository; setting pipeline parameters for a pipeline operation process, the pipeline parameters being triggering factors for triggering the pipeline operation process; receiving an operation instruction, and constructing a corresponding pipeline execution task when the pipeline operation process is triggered based on the operation instruction, wherein the pipeline execution task includes at least one of code encoding operation, code packaging operation, code testing operation, and code deployment operation; the operation instruction includes the pipeline parameters; obtaining the corresponding code project based on the pipeline execution task and performing operations, and displaying the execution status and execution results through a preset continuous integration tool; and triggering the code project configuration process to save the adjusted code project into the repository based on the execution status and execution results.

[0167] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0168] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0169] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0170] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0171] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0172] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0173] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0174] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0175] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0176] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for managing code projects, characterized in that, This is applied to a configuration management system, which includes a pipeline operation process and a code project configuration process. The pipeline operation process is used to adjust code projects in the form of tasks based on continuous delivery or continuous deployment capabilities. The code project configuration process is used to store and manage the adjusted code projects in a database. The method includes: Perform configuration management operations on the code repository corresponding to the code project; the configuration management operations are used to manage the attribute information of the code project in the code repository. Set the pipeline parameters for the pipeline operation process, whereby the pipeline parameters are triggering factors that trigger the pipeline operation process; When receiving an operation instruction and triggering a pipeline operation process based on the operation instruction, a corresponding pipeline execution task is constructed, wherein the pipeline execution task includes at least one of code encoding operation, code packaging operation, code testing operation, and code deployment operation; the operation instruction contains the pipeline parameters. Based on the pipeline, the corresponding code project is obtained and operated on, and the execution status and results are displayed through a preset continuous integration tool. Based on the execution status and execution result, the code project configuration process is triggered to save the adjusted code project into the database.

2. The method according to claim 1, characterized in that, Before setting the pipeline parameters for the pipeline operation process, the method further includes: Create a project name and version information for the code project, and enter the repository source information for the code repository; Configure the triggering conditions and execution environment for the pipeline operation process of each code project.

3. The method according to claim 1, characterized in that, When the pipeline operation process is triggered based on the operation instruction, the corresponding pipeline execution task is constructed, including: When it is determined that the corresponding behavior involves the adjustment of the code project based on the operation instruction, the operation instruction is determined to trigger the pipeline operation process, and a task build request is sent to the preset continuous integration tool. The corresponding pipeline is constructed and the task is executed by using a preset continuous integration tool based on the task build request and pipeline parameters. The process of obtaining and operating on the corresponding code project based on the pipeline execution task, and displaying the execution status and results through a preset continuous integration tool, includes: Based on the pipeline execution task, the parameters in the corresponding code project are adjusted according to the pipeline parameters, and during the execution of the pipeline execution task, the preset continuous integration tool is controlled to provide real-time feedback of the execution log, wherein the execution log is used to describe in detail the execution status and the execution result.

4. The method according to claim 1, characterized in that, The step of triggering the code project configuration process to save the adjusted code project to the database based on the execution status and execution result includes: Based on the execution results, the adjusted code projects are tagged and / or archived in the code repository, and the version and status information of the adjusted code projects are updated.

5. The method according to claim 1, characterized in that, The method further includes: Set monitoring rules for the pipeline operation process during execution, wherein the monitoring rules are used to determine whether there are any abnormalities in the currently running pipeline operation process; When an abnormal state occurs in the pipeline operation process, an alarm is triggered according to preset rules and corresponding processing operations are performed.

6. The method according to claim 3, characterized in that, The control preset continuous integration tool provides real-time feedback of execution logs, including: The execution status of the pipeline tasks is obtained in real time from the preset continuous integration tool through polling or event listening, and the execution result is determined. The execution status and results are displayed graphically and / or in list form through an interactive interface.

7. The method according to claim 1, characterized in that, When the pipeline operation process is triggered based on the operation instruction, it includes: When an interface call instruction for a pipeline operation process is determined based on the operation instruction, a preset continuous integration tool is invoked based on the interface call instruction, and a task build request is generated to trigger the pipeline operation process. or, When the operation target is determined to be a code project in the target associated region of the code repository based on the operation instruction, it is obtained whether the code project corresponding to the operation target in the target management region has been updated. When it is determined that the code project corresponding to the operation target has been updated, a task build request is sent to the preset continuous integration tool so that the preset continuous integration tool can build the corresponding pipeline to execute the task and trigger the pipeline operation process.

8. The method according to claim 1, characterized in that, The configuration management operation performed on the code repository corresponding to the code project includes: The code repository is managed in terms of version control, permission settings, and change logging. Version control is used to set version information for code projects, permission settings are used to control the permission level of each code project, and change logging is used to record information about adjustments made to the code projects.

9. A management device for code projects, characterized in that, An application is made to a configuration management system, which includes a pipeline operation process and a code project configuration process. The pipeline operation process is used to adjust code projects in the form of tasks based on continuous delivery or continuous deployment capabilities. The code project configuration process is used to store and manage the adjusted code projects in a database. The device includes: An execution unit is used to perform configuration management operations on the code repository corresponding to the code project; the configuration management operations are used to manage the attribute information of the code project in the code repository. The setting unit is used to set the pipeline parameters of the pipeline operation process, wherein the pipeline parameters are the triggering factors that trigger the pipeline operation process; A construction unit is configured to receive an operation instruction and, when the pipeline operation process is triggered based on the operation instruction, construct a corresponding pipeline execution task, wherein the pipeline execution task includes at least one of code encoding operation, code packaging operation, code testing operation, and code deployment operation; the operation instruction includes the pipeline parameters. The operation unit is used to obtain the corresponding code project based on the pipeline execution task and perform operations, and to display the execution status and execution results through a preset continuous integration tool; The storage unit is used to trigger the code project configuration process to save the adjusted code project into the database based on the execution status and execution result.

10. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, the device on which the storage medium is located executes the code project management method according to any one of claims 1 to 8.

11. A code project management device, characterized in that, The apparatus includes a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the code item management method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the management method for the code project according to any one of claims 1 to 8.