WO-2026090787-A1 - METHOD, APPARATUS, DEVICE, AND MEDIUM FOR DEVELOPING CODE BASED ON DEVOPS
Abstract
There is a method for developing code based on DevOps. The method comprises: receiving a commit from developers (110); creating a CI/CD pipeline for the commit and running the CI/CD pipeline (120); sending information of the failed CI/CD pipeline to a Large Language Model if the CI/CD pipeline is failed (130); generating a new branch, error reason and bug fixing suggestion by the Large Language Model to fix the failed CI/CD pipeline, and sending the new branch, error reason and bug fixing suggestion to the developers (140).
Inventors
- TANG, Li San
- HU, FEI HUANG
- JIA, Shao Tu
- CUI, YI
- RAO, Xin
- XU, HANG
Assignees
- SIEMENS AKTIENGESELLSCHAFT
- SIEMENS LTD., CHINA
Dates
- Publication Date
- 20260507
- Application Date
- 20241028
Claims (10)
- A method (100) for developing code based on DevOps, comprising: receiving (110) a commit from developers; creating (120) a CI/CD pipeline for the commit and running the CI/CD pipeline; sending (130) information of the failed CI/CD pipeline to a Large Language Model if the CI/CD pipeline is failed; generating (140) a new branch, error reason and bug fixing suggestion by the Large Language Model to fix the failed CI/CD pipeline, and sending the new branch, error reason and bug fixing suggestion to the developers.
- The method (100) according to claim 1, wherein the method (100) comprises: iterating all branches in all projects; detecting first failed CI/CD pipeline and first succeeded CI/CD pipeline after the first failed CI/CD pipeline for each branch; generating training data with differences between two commits corresponding to the first failed CI/CD pipeline and the first succeeded CI/CD pipeline; setting the detected first succeeded CI/CD pipeline as starting point to iterate CI/CD pipeline; training the Large Language Model with the training data.
- The method (100) according to claim 1, wherein the method (100) comprises: receiving a commit from developers; creating a CI/CD pipeline for the commit and running the CI/CD pipeline; judging if the CI/CD pipeline failed, if the CI/CD pipeline failed, setting the current failed CI/CD pipeline as a beginning commit pipeline, if the CI/CD pipeline succeed, judging if there is a marked beginning commit pipeline; if there is a marked beginning commit pipeline, setting the current succeed commit as the ending commit pipeline; generating training data with differences between two commits corresponding to the beginning CI/CD pipeline and the ending CI/CD pipeline; training the Large Language Model with the training data.
- The method (100) according to claim 2 or 3, wherein the method (100) comprises: categorizing the training data by commit message type; training the Large language model with the categorized training data.
- The method (100) according to claim 1, wherein the method (100) comprises: receiving an attempt time threshold set by developers; stopping fixing the failed CI/CD pipeline if the Large Language Model reached the attempt time threshold.
- The method (100) according to claim 5, wherein the method (100) comprises: generating an error analysis branch to summarize the error message and all fix attempts by the Large language model; send the error analysis branch and error analysis results to the developers.
- An apparatus (900) for developing code based on DevOps, comprising: a receiving module (910) , configured to receive a commit from developers; a creating module (920) , configured to create a CI/CD pipeline for the commit and running the CI/CD pipeline; a sending module (930) , configured to send information of the failed CI/CD pipeline to a Large Language Model if the CI/CD pipeline failed; a generating module (940) , configured to generate a new branch by the Large Language Model to fix the failed CI/CD pipeline, and sending the new branch to the developers.
- An electronic device, comprising a processor (1010) and a memory (1020) , wherein an application program executable by the processor (1010) is stored in the memory (1020) for causing the processor (1010) to execute a method for identifying building block according to any one of claims 1-6.
- A computer-readable medium comprising computer-readable instructions stored thereon, wherein the computer-readable instructions for executing a method for identifying building block according to any one of claims 1-6.
- A computer program product comprising a computer program, upon the computer program is executed by a processor for executing a method for identifying building block according to any one of claims 1-6.
Description
Method, apparatus, device, and medium for developing code based on DevOps FIELD The present disclosure relates to the technical field of industry digitalization, in particular to a method, apparatus, device, and medium for developing code based on DevOps. BACKGROUND DevOps is an efficient software engineering tool for delivering software products with a quick iterative mode. The CI/CD (Continuous Integration/Continuous Delivery) pipeline is used for representing the DevOps process of each commit by developers. Developers need to fix the failed CI/CD pipelines manually based on the error messages logged by DevOps platforms, CI/CD pipelines and print information. Manual debugging leads to low efficiency and prone to errors. SUMMARY Embodiments of the present disclosure propose a method, apparatus, device, and medium for developing code based on DevOps. In a first aspect, there is provided a method for developing code based on DevOps, comprising: receiving a commit from developers; creating a CI/CD pipeline for the commit and running the CI/CD pipeline; sending information of the failed CI/CD pipeline to a Large Language Model if the CI/CD pipeline is failed; generating a new branch, error reason and bug fixing suggestion by the Large Language Model to fix the failed CI/CD pipeline, and sending the new branch, error reason and bug fixing suggestion to the developers. Therefore, the present disclosure proposes a method for developing code based on DevOps, a Large language model is introduced to fix failed CI/CD pipeline. Therefore, manual operations are reduced and debugging efficiency is improved. In an example, wherein the method comprises: iterating all branches in all projects; detecting first failed CI/CD pipeline and first succeeded CI/CD pipeline after the first failed CI/CD pipeline for each branch; generating training data with differences between two commits corresponding to the first failed CI/CD pipeline and the first succeeded CI/CD pipeline; setting the detected first succeeded CI/CD pipeline as starting point to iterate CI/CD pipeline; training the Large Language Model with the training data. In an example, wherein the method comprises: receiving a commit from developers; creating a CI/CD pipeline for the commit and running the CI/CD pipeline; judging if the CI/CD pipeline failed, if the CI/CD pipeline failed, setting the current failed CI/CD pipeline as a beginning commit pipeline, if the CI/CD pipeline succeed, judging if there is a marked beginning commit pipeline; if there is a marked beginning commit pipeline, setting the current succeed commit as the ending commit pipeline; generating training data with differences between two commits corresponding to the beginning CI/CD pipeline and the ending CI/CD pipeline; training the Large Language Model with the training data. In an example, wherein the method comprises: categorizing the training data by commit message type; training the Large language model with the categorized training data. In an example, wherein the method comprises: receiving an attempt time threshold set by developers; stopping fixing the failed CI/CD pipeline if the Large Language Model reached the attempt time threshold. In an example, wherein the method comprises: generating an error analysis branch to summarize the error message and all fix attempts by the Large language model; send the error analysis branch and error analysis results to the developers. In a second aspect, there is provided an apparatus for developing code based on DevOps, comprising: a receiving module, configured to receive a commit from developers; a creating module, configured to create a CI/CD pipeline for the commit and running the CI/CD pipeline; a sending module, configured to send information of the failed CI/CD pipeline to a Large Language Model if the CI/CD pipeline failed; a generating module, configured to generate a new branch by the Large Language Model to fix the failed CI/CD pipeline, and sending the new branch to the developers. In a third aspect, there is provided an electronic device comprising a processor and a memory, wherein an application program executable by the processor is stored in the memory for causing the processor to execute a method for identifying building block as described in any of the above. In a fourth aspect, there is provided a computer-readable medium comprising computer-readable instructions stored thereon is provided, wherein the computer-readable instructions for executing a method for identifying building block as described in any of the above. In a fifth aspect, there is provided a computer program product comprising a computer program, when the computer program is executed by a processor for executing a method for identifying building block as described in any of the above. BRIEF DESCRIPTION OF THE DRAWINGS To make technical solutions of examples of the present disclosure clearer, accompanying drawings to be used in description of the examples will