CN113485916A - Detection method, system, device and storage medium based on JIRA code construction - Google Patents

Detection method, system, device and storage medium based on JIRA code construction Download PDF

Info

Publication number
CN113485916A
CN113485916A CN202110684627.3A CN202110684627A CN113485916A CN 113485916 A CN113485916 A CN 113485916A CN 202110684627 A CN202110684627 A CN 202110684627A CN 113485916 A CN113485916 A CN 113485916A
Authority
CN
China
Prior art keywords
state
merging
branch
tool
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110684627.3A
Other languages
Chinese (zh)
Inventor
程政
吴昊
王纪飞
户玉敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Baisheng Software Co ltd
Original Assignee
Shanghai Baisheng Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Baisheng Software Co ltd filed Critical Shanghai Baisheng Software Co ltd
Priority to CN202110684627.3A priority Critical patent/CN113485916A/en
Publication of CN113485916A publication Critical patent/CN113485916A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Alarm Systems (AREA)

Abstract

The invention provides a detection method, a system, equipment and a storage medium based on JIRA code construction, wherein the detection method comprises the following steps: and (3) creating a task: creating a development branch, and stopping executing the task and early warning when the creation state of the development branch is creation failure; submitting codes: triggering a Jenkins tool, and stopping executing the task and early warning when the first merging state of the merging code and the development branch and/or the first construction state of the construction calling branch fail; and (3) submitting a task: and triggering the Jenkins tool, and stopping submitting the tasks and giving an early warning when the second merging state of the main line in the merging development branch and the Gitlab tool and the second construction state of the main line in the Jenkins tool fail. The method can monitor the construction state of the development branches, the combination state of codes and development branches, the creation state of calling branches in a Jenkins tool, the combination state of the development branches and a Gitlab main line, and the creation state of creating a main line in the Jenkins tool; therefore, the code construction process is monitored, and the code creation efficiency is improved.

Description

Detection method, system, device and storage medium based on JIRA code construction
Technical Field
The present invention relates to the field of code detection technologies, and in particular, to a detection method, system, device, and storage medium for code construction based on jitra.
Background
In general, a code needs to sequentially go through a plurality of steps such as code construction, branch merging, main line merging and the like from being input to being merged into a main line; the user manages and tracks tasks in the Jira system, and the storage and the construction of codes are respectively carried out in a git source code library and a Jenkins tool.
However, in the daily development process, it is often difficult for a developer to acquire the code at the first time, such as: in the process of constructing the code, whether the code is constructed successfully or not cannot be known; in the merging process of the code and the branch or the merging process of the branch and the main line, whether the merging is successful or not cannot be known; if the code has a problem, the code generally needs to be discovered only when a tester tests the code, and the code with the problem returns to a research and development staff for modification in the testing stage, so that not only is the labor consumed seriously, but also the problem is solved seriously and lags behind.
Disclosure of Invention
In view of the above shortcomings in the prior art, it is an object of the present invention to provide a detection method, system, device and storage medium for code building based on jitra, so as to improve the technical problems in the prior art, such as the inability to monitor code during the code submission process.
In order to achieve the above objects and other related objects, the present invention provides a detection method based on JIRA code construction, applied to monitoring an operation platform, including:
and (3) creating a task: creating a development branch through a Gitlab tool, and judging the creation state of the development branch: if the creation state is the creation failure, stopping executing the task and carrying out early warning;
submitting codes: combining the code and the development branch, triggering a Jenkins tool, constructing a calling branch in the Jenkins tool, and judging a first combining state for combining the code and the development branch and a first constructing state for constructing the calling branch: if the first merging state and/or the first construction state are/is failure, stopping executing the task and carrying out early warning;
and (3) submitting a task: merging the development branches and a main line in a Gitlab tool, and constructing the main line in a Jenkins tool; judging a second merging state for merging the development branch and the main line in the Gitlab tool and a second construction state of the main line in the Jenkins tool: and when the second merging state and/or the second construction state are/is failure, stopping submitting the task and carrying out early warning.
In an embodiment of the present invention, the step of creating the task includes:
in a Gitlab tool, acquiring an object capable of operating a Gitlab API;
acquiring a related source code engineering object according to the acquired object;
judging whether branches to be created and source branches exist in the Gitlab tool or not according to the acquired related source code engineering object;
if the branch to be created exists, the creation state of the development branch is successful in creation;
if the source branch does not exist, the creation state of the development branch is creation failure;
and if the source branch exists and the branch to be created does not exist, creating the development branch and judging the creation state of the development branch.
In an embodiment of the present invention, the step of submitting the code includes:
merging the code and the development branch, and judging the first merging state; if the first merging state is failure, stopping executing the task and carrying out early warning;
constructing the calling branch in a Jenkins tool, and judging the first construction state; and if the first construction state is failure, stopping executing the task and carrying out early warning.
In an embodiment of the present invention, the merging the code and the development branch, and determining the first merging status includes:
in a Gitlab tool, acquiring an object capable of operating a Gitlab API;
acquiring a related source code engineering object through the acquired object;
creating a request object according to the acquired related source code engineering object, and judging the creation state of the request object;
if the creation state of the request object is a creation failure, the first merging state is a failure;
and if the creation state of the request object is successful, merging the code and the development branch, and judging the first merging state.
In an embodiment of the present invention, the step of constructing the call branch in a Jenkins tool and determining the first construction state includes:
acquiring an object capable of operating a Jenkins API in a Jenkins tool;
and constructing the calling branch in a Jenkins tool through the acquired object, and judging the first construction state.
In an embodiment of the present invention, the step of submitting the task includes:
merging the development branches with a main line in the Gitlab, and judging the second merging state; if the second merging state is failure, stopping submitting the task, and performing early warning;
constructing a main line in a Jenkins tool, and judging the second construction state; and if the second construction state is failure, stopping submitting the task and carrying out early warning.
In an embodiment of the invention, at least one of sound prompt, light prompt and picture prompt is adopted for early warning.
The invention also discloses a detection system constructed based on the JIRA code, which is applied to a monitoring operation platform, and by adopting the detection method, the detection system comprises the following steps:
the development branch creation state judgment module is used for creating a development branch through a Gitlab tool after a task is created, and judging the creation state of the development branch;
if the creation state of the development branch is failure, the development branch creation state judgment module suspends the task;
the first merging state judgment module is used for triggering a Jenkins tool after the creation state of the development branch is successful and a code is submitted, merging the code and the development branch and judging a first merging state for merging the code and the development branch;
if the first merging state is failure, the first merging state judgment module suspends the task;
the first construction state judgment module is used for constructing a calling branch in a Jenkins tool when the first merging state is successful, and judging a first construction state for constructing the calling branch;
if the first construction state is failure, the first construction state judgment module suspends the task;
the second merging state judgment module is used for merging the development branch and the main line in the Gitlab tool when the first construction state is successful and the task is submitted, and judging a second merging state for merging the development branch and the main line in the Gitlab tool;
if the second merging state is failure, the second merging state judgment module stops submitting the task;
the second construction state judgment module is used for constructing a main line in the Jenkins tool and judging a second construction state of the main line constructed in the Jenkins tool when the second merging state is successful;
and if the second construction state is failure, the second construction state judgment module stops submitting the task.
The invention also discloses a detection device based on the JIRA code construction, which comprises a processor, wherein the processor is coupled with a memory, the memory stores program instructions, and the program instructions stored in the memory realize the detection method when being executed by the processor.
The present invention also discloses a computer-readable storage medium containing a program which, when run on a computer, causes the computer to execute the above-described detection method.
In summary, the detection method, system, device and storage medium for code construction based on the JIRA according to the present invention perform the determination of the construction state of the development branch during task creation; when submitting the code, judging the merging state of the code and the development branch and judging the creating state of the calling branch in a Jenkins tool; when the task is submitted, judging the merging state of the development branches and the Gitlab main line and judging the creation state of the main line in a Jenkins tool; the code building process can be effectively monitored, early warning is carried out at the first time, and the code building efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flow chart illustrating a detection method for a JIRA-based code building according to the present invention.
Fig. 2 illustrates a system flow diagram of a detection method for a JIRA-based code build of the present invention.
Fig. 3 is a schematic diagram showing the structure of the detection system constructed based on the JIRA code of the present invention.
Fig. 4 is a schematic diagram showing the structure of a detection apparatus constructed based on the JIRA code of the present invention.
Fig. 5 shows the actual display interface of the detection method based on the JIRA-based code building and the detection system based on the JIRA-based code building of the present invention.
Description of the element reference numerals
100. A detection system constructed based on the JIRA code;
110. a development branch creation state judgment module;
120. a first merging state judgment module;
130. a first building state judgment module;
140. a second merging state judgment module;
150. a second construction state judgment module;
200. a detection device constructed based on the JIRA code;
210. a processor;
220. a memory.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. It is also to be understood that the terminology used in the examples is for the purpose of describing particular embodiments only, and is not intended to limit the scope of the present invention. Test methods in which specific conditions are not specified in the following examples are generally carried out under conventional conditions or under conditions recommended by the respective manufacturers.
Please refer to fig. 1 to 5. It should be understood that the structures, ratios, sizes, and the like shown in the drawings are only used for matching the disclosure of the present disclosure, and are not used for limiting the conditions of the present disclosure, so that the present disclosure is not limited to the technical essence, and any modifications of the structures, changes of the ratios, or adjustments of the sizes, can still fall within the scope of the present disclosure without affecting the function and the achievable purpose of the present disclosure. In addition, the terms "upper", "lower", "left", "right", "middle" and "one" used in the present specification are for clarity of description, and are not intended to limit the scope of the present invention, and the relative relationship between the terms and the terms is not to be construed as a scope of the present invention.
When numerical ranges are given in the examples, it is understood that both endpoints of each of the numerical ranges and any value therebetween can be selected unless the invention otherwise indicated. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs and the description of the present invention, and any methods, apparatuses, and materials similar or equivalent to those described in the examples of the present invention may be used to practice the present invention.
The detection method of the code construction in the embodiment is performed based on a JIRA system, and is used for monitoring the operation platform, and a Gitlab tool and a Jenkins tool are called in the detection process.
Referring to fig. 1, a schematic flow chart of a detection method based on a JIRA code construction in this embodiment is shown, in this embodiment, a developer creates a task in a JIRA system, where a gillab tool is triggered to create a development branch, and whether the development branch is created successfully is determined: if the development branch is failed to be established, the task is suspended, and early warning is given out to prompt a research and development staff to manually establish the development branch on a Gitlab tool; if the development branch is successfully established and the research personnel uploads the codes, combining the codes and the development branch in a Gitlab tool, and judging whether the combination is successful: if the merging of the code and the development branch fails, suspending the task, and sending an early warning to prompt a research and development staff to check, preferably, if the code and the development branch conflict, the research and development staff amend the conflict in the development branch and then submit the code again until the merging of the code and the development branch succeeds; if the code and the development branch are combined successfully, triggering a Jenkins tool, creating a calling branch in the Jenkins tool, and judging whether the creation of the calling branch is successful: if the creation of the calling branch fails, pausing the task and giving out early warning to prompt research and development personnel to check and modify the construction information of the calling branch in the Jenkins tool until the construction of the calling branch is successful; if the creation of the calling branch is successful and the task is submitted, merging the development branch and the main line in the Gitlab tool, and judging whether the merging is successful: if the combination fails, stopping submitting the task and sending out early warning to prompt research and development personnel to check; preferably, if the development branch conflicts with the main line in the Gitlab, after the developer modifies the conflict of the main line in the Gitlab, merging the development branch and the main line in the Gitlab tool again until the development branch and the main line in the Gitlab tool are successfully merged; if the combination is successful, triggering a Jenkins tool, creating a main line in the Jenkins tool, and judging whether the creation is successful: if the main line is failed to be established, the task is stopped to be submitted, early warning is sent out to prompt research and development personnel to check and modify the construction information of the main line in the Jenkins tool until the main line is established successfully, if the main line is established successfully, the task is submitted to an acceptance stage, the research and development personnel accept the task, and after the acceptance stage is successful, the task is submitted to enter a testing stage for subsequent testing.
Referring to fig. 2, a detection method based on a JIRA code construction in this embodiment is shown, which is applied to monitoring an operation platform, and includes:
and (3) creating a task: creating a development branch through a Gitlab tool, and judging the creation state of the development branch: and if the creation state is the creation failure, stopping executing the task and carrying out early warning.
In this step, the creation of the development branch is realized by introducing a python-Gitlab third-party library and calling a Gitlab API, and the specific operation process comprises the following steps:
acquiring an object gl capable of operating a Gitlab API;
preferably, in the Gitlab tool, the private _ token is a character string representing the identity of the user, and the private _ token is in a one-to-one correspondence relationship with the user and is used as a private token of the user; the Gitlab tool provides an API for the research and development personnel to obtain the corresponding user information through the user name and the password, that is, the Gitlab API, so that the object gl can obtain the private _ token of the user by using the Gitlab API.
Calling gl.projects.get according to the obtained object gl to obtain a project of a related source code;
preferably, in the Gitlab tool, project is used to refer to a source code engineering object, and path _ with _ namespace is used to name a space of source code engineering, then object gl obtains the relevant source code engineering object project in the source code engineering space path _ with _ namespace by using gl.
Calling project.
Preferably, in the Gitlab tool, branch1 may be used to refer to the branch to be created, the project of the source code engineering object obtains branch1 of the branch to be created by project. If the execution of project.
If branches to be created exist in the Gitlab tool, the branches to be created can be directly used as development branches, so that:
if branches to be created exist in the Gitlab tool, the creation state of the development branches is successful;
if there is no branch to be created in the Gitlab tool, it needs to be determined whether a source branch corresponding to the development branch exists, and then further:
calling project.
Preferably, in the Gitlab tool, the name of the source branch can be referred to by branch 2; the source code engineering object project adopts project. branches. get to get the source branch2, and judges whether the obtaining is successful: if the execution of project.
If the source branch corresponding to the development branch does not exist, the development branch cannot be further constructed, so that:
if the source branch does not exist, the creation state of the development branch is the creation failure;
if the source branch exists, a development branch is created, and further the creation state of the development branch is judged, further:
calling project.
Preferably, in the Gitlab tool, the source code engineering object project adopts project. Create branch development failure if project. Create a development branch successfully if project is executed successfully, and at the moment, the code construction is not abnormal, and a developer inputs the code normally in the jira system.
Further:
submitting codes: merging the codes and the development branches, triggering a Jenkins tool, constructing a calling branch in the Jenkins tool, and judging a first merging state of the merged codes and the development branches and a first constructing state of the constructed calling branch: if the first merging state and/or the first construction state are/is failure, stopping executing the task and carrying out early warning;
specifically, the code and the development branch are merged, and a first merging state is judged; if the first merging state is failure, stopping executing the task and carrying out early warning;
constructing a calling branch in a Jenkins tool, and judging a first construction state; and if the first construction state is failure, stopping executing the task and carrying out early warning.
In this step, the code and the development branch are merged by introducing a python-Gitlab third-party library and calling a Gitlab API, and the specific operation process comprises the following steps:
acquiring an object gl capable of operating a Gitlab API;
preferably, in the Gitlab tool, the private _ token is a character string representing the identity of the user, and the private _ token is in a one-to-one correspondence relationship with the user and is used as a private token of the user; the Gitlab tool provides an API for the developer to obtain the private _ token specifically through the user name and password, i.e., the Gitlab API, so that the object gl can obtain the private _ token of the user through the Gitlab API.
Calling gl.projects.get according to the obtained object gl to obtain a project of a related source code;
preferably, in the Gitlab tool, project is used to refer to the source code engineering object, and path _ with _ namespace is used to name the space of the source code engineering, then object gl uses gl.
Calling project, mergerquests, create request object mr according to the acquired related source code engineering object project;
preferably, in the gillab tool, the source code engineering object project uses project. Project mergerquests create is successful; development branch creation fails if project mergerquests create fails;
when the request object is failed to be established, the merging can not be continued, if the request object mr is failed to be established, the first merging state is failure;
if the request object is successfully created, merging the code and the development branch, and judging the merging state of the code and the development branch, further:
calling mr. merge according to the request object mr, and merging codes and development branches;
preferably, in the Gitlab tool, the request object mr adopts mr. merge to merge the code and the development branch, and judges whether the merging is successful;
and if the merge execution fails, judging a first merging state according to the content fed back by the Gitlab tool:
if the content of the feedback is 406: branch can merged or other content, where the first merge state is a failure;
if the content of the feedback is 405: 405Method Not Allowed, where the first merge status is successful;
merge the code and the development branch successfully if the merge is successful, at which time the first merge state is successful;
when the first merging state is successful, continuing to judge the first building state, and then further:
through leading in python-Jenkins third party storehouse, call Jenkins API's mode, realize the construction of calling the branch in Jenkins, concrete operation process includes:
acquiring an object server capable of operating Jenkins API;
preferably, the names of the users are referred to by usernames in the Jenkins tool, and the passwords of the users are referred to by passswd; the Jenkins tool provides an API for research and development personnel to obtain information of a corresponding user specially through the name and the password of the user, namely the Jenkins API, and therefore the object server can obtain the username and the password of the user through the Jenkins API.
Calling server, built _ jobi according to the obtained object server, and executing construction of calling branches in Jenkins;
preferably, in a Jenkins tool, an object server adopts server, built _ job to construct a call branch, and whether merging is successful is judged;
if the execution of server and built _ job fails, calling the branch to build the branch to fail, wherein the first building state is failure;
if the server, the built _ job is executed successfully, the first building state is further judged according to the state of the built completion interface in the Jenkins tool:
specifically, a pipeline editor is built in the Jenkins tool and used for creating a pipeline script, and the build _ status is adopted in the Jenkins tool to indicate the state of constructing the completed interface; therefore, after the pipeline script starts to be executed, a Jenkins/built/finish construction interface provided by a Jenkins tool is called back, and the state of the construction completion interface is judged;
if the state of the constructed interface is incomplete, the first construction state is failure at the moment;
if the state of the constructed interface is the completion state, the first construction state is successful, and the research personnel normally develops the task.
Further:
and (3) submitting a task: merging and developing branches and a main line in a Gitlab tool, and constructing the main line in a Jenkins tool; judging a second merging state of the merging development branch and the main line in the Gitlab tool and a second construction state of the main line in the Jenkins tool: and when the second merging state and/or the second construction state fail, stopping submitting the task and carrying out early warning.
Specifically, the method comprises the following steps:
merging the development branches with the main line in the Gitlab, and judging a second merging state; if the second merging state is failure, stopping submitting the task and carrying out early warning;
constructing a main line in a Jenkins tool, and judging a second construction state; and if the second construction state is failure, stopping submitting the task and carrying out early warning.
The processes of judging the second merging state in the Gitlab tool and judging the second construction state in the Jenkins tool refer to the judgment processes of the first merging state and the first construction state, and are not described herein again.
In this embodiment, at least one of a sound prompt, a light prompt, and a picture prompt may be used for the early warning.
In a better embodiment, a lava lamp is adopted for early warning, and when any one of the establishment state of the development branch, namely the establishment failure, the first combination state, the first construction state, the second combination state and the second construction state is met, the red lamp of the lava lamp is controlled to be turned on; when the second merging state and the second building state are successful, controlling a green light of the lava lamp to light; furthermore, a timing device can be arranged and used for starting timing when the red light of the lava lamp is turned on and sending an alarm prompt to the third-party platform when the timing reaches a preset time threshold; preferably, the third party platform may be a staple.
The technical scheme does not limit the way of sending out the early warning, but the technical scheme is all included in the protection scope of the application.
Referring to fig. 3, the embodiment further provides a detection system 100 constructed based on the JIRA code, which is applied to monitoring an operation platform, and by using the detection method, the detection system 100 includes:
a development branch creation state judgment module 110, configured to create a development branch through a Gitlab tool after a task is created, and judge a creation state of the development branch;
if the creation state of the development branch is failed, the development branch creation state judgment module 110 suspends the task;
the first merging state judgment module 120 is configured to trigger a Jenkins tool, merge the code and the development branch, and judge a first merging state of the merged code and the development branch when the creation state of the development branch is successful and the code is submitted;
if the first merge state is failure, the first merge state determination module 120 suspends the task;
a first construction state judgment module 130, configured to construct a call branch in the Jenkins tool when the first merging state is successful, and judge a first construction state of the constructed call branch;
if the first build state is a failure, the first build state determination module 130 suspends the task;
the second merging state judgment module 140 is configured to merge the development branch and the main line in the Gitlab tool after the first construction state is successful and the task is submitted, and judge a second merging state of the merged development branch and the main line in the Gitlab tool;
if the second merge state is failure, the second merge state determination module 140 stops submitting the task;
the second construction state judgment module 150 is configured to construct a main line in the Jenkins tool when the second merging state is successful, and judge a second construction state of the main line constructed in the Jenkins tool;
if the second build state is a failure, the second build state determination module 150 stops submitting the task.
As shown in fig. 4, the present embodiment further proposes a detection apparatus 200 constructed based on the jitra code, the task management apparatus 200 includes a processor 210 and a memory 220, the processor 210 is coupled to the memory 220, the memory 220 stores program instructions, and the program instructions stored in the memory 220 implement the detection method when executed by the processor 210. Processor 510 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; or a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component; the Memory 220 may include a Random Access Memory (RAM), and may also include a Non-Volatile Memory (Non-Volatile Memory), such as at least one disk Memory. The Memory 220 may also be an internal Memory of Random Access Memory (RAM) type, and the processor 210 and the Memory 220 may be integrated into one or more independent circuits or hardware, such as: application Specific Integrated Circuit (ASIC). It should be noted that the computer program in the memory 220 can be implemented in the form of software functional units and stored in a computer readable storage medium when the computer program is sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention.
The present embodiment also provides a computer-readable storage medium, which stores computer instructions for causing a computer to execute the above task management method. The storage medium may be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system or a propagation medium. The storage medium may also include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a Random Access Memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk. Optical disks may include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-RW), and DVD.
In summary, the detection method, system, device and storage medium for code construction based on the JIRA according to the present invention perform the determination of the construction state of the development branch during task creation; when submitting the code, judging the merging state of the code and the development branch and judging the creating state of the calling branch in a Jenkins tool; when the task is submitted, judging the merging state of the development branches and the Gitlab main line and judging the creation state of the main line in a Jenkins tool; the code building process can be effectively monitored, early warning is carried out at the first time, and the code building efficiency is improved. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. A detection method based on JIRA code construction is applied to monitoring an operation platform and comprises the following steps:
and (3) creating a task: creating a development branch through a Gitlab tool, and judging the creation state of the development branch: if the creation state is the creation failure, stopping executing the task and carrying out early warning;
submitting codes: combining the code and the development branch, triggering a Jenkins tool, constructing a calling branch in the Jenkins tool, judging a first combining state for combining the code and the development branch and a first constructing state for constructing the calling branch: if the first merging state and/or the first construction state are/is failure, stopping executing the task and carrying out early warning;
and (3) submitting a task: merging the development branches and a main line in a Gitlab tool, and constructing the main line in a Jenkins tool; judging a second merging state for merging the development branch and the main line in the Gitlab tool and a second construction state of the main line: and when the second merging state and/or the second construction state are/is failure, stopping submitting the task and carrying out early warning.
2. The detection method according to claim 1, wherein the step of creating a task comprises:
in a Gitlab tool, acquiring an object capable of operating a Gitlab API;
acquiring a related source code engineering object according to the acquired object;
judging whether branches to be created and source branches exist in the Gitlab tool or not according to the acquired related source code engineering object;
if the branch to be created exists, the creation state of the development branch is successful in creation;
if the source branch does not exist, the creation state of the development branch is creation failure;
and if the source branch exists and the branch to be created does not exist, creating the development branch and judging the creation state of the development branch.
3. The detection method according to claim 1, wherein said step of submitting a code comprises:
merging the code and the development branch, and judging the first merging state; if the first merging state is failure, stopping executing the task and carrying out early warning;
constructing the calling branch in a Jenkins tool, and judging the first construction state; and if the first construction state is failure, stopping executing the task and carrying out early warning.
4. The detection method according to claim 3, wherein the step of merging the code with the development branch and determining the first merging status comprises:
in a Gitlab tool, acquiring an object capable of operating a Gitlab API;
acquiring a related source code engineering object through the acquired object;
creating a request object according to the acquired related source code engineering object, and judging the creation state of the request object;
if the creation state of the request object is a creation failure, the first merging state is a failure;
and if the creation state of the request object is successful, merging the code and the development branch, and judging the first merging state.
5. The detection method according to claim 3, wherein the step of constructing the call branch in a Jenkins tool and determining the first construction state comprises:
acquiring an object capable of operating a Jenkins API in a Jenkins tool;
and constructing the calling branch through the acquired object, and judging the first construction state.
6. The detection method according to claim 1, wherein the step of submitting a task comprises:
merging the development branches with a main line in the Gitlab, and judging the second merging state; if the second merging state is failure, stopping submitting the task, and performing early warning;
constructing a main line in a Jenkins tool, and judging the second construction state; and if the second construction state is failure, stopping submitting the task and carrying out early warning.
7. The detection method according to claim 1, wherein the warning is performed by at least one of sound prompt, light prompt and picture prompt.
8. A detection system based on JIRA code building, which is applied to monitoring an operation platform, and adopts the detection method as claimed in any one of claims 1-7, and then the detection system comprises:
the development branch creation state judgment module is used for creating a development branch through a Gitlab tool after a task is created, and judging the creation state of the development branch;
if the creation state of the development branch is failure, the development branch creation state judgment module suspends the task;
the first merging state judgment module is used for triggering a Jenkins tool after the creation state of the development branch is successful and a code is submitted, merging the code and the development branch and judging a first merging state for merging the code and the development branch;
if the first merging state is failure, the first merging state judgment module suspends the task;
the first construction state judgment module is used for constructing a calling branch in a Jenkins tool when the first merging state is successful, and judging a first construction state for constructing the calling branch;
if the first construction state is failure, the first construction state judgment module suspends the task;
the second merging state judgment module is used for merging the development branch and the main line in the Gitlab tool when the first construction state is successful and the task is submitted, and judging a second merging state for merging the development branch and the main line in the Gitlab tool;
if the second merging state is failure, the second merging state judgment module stops submitting the task;
the second construction state judgment module is used for constructing a main line in the Jenkins tool and judging a second construction state of the main line constructed in the Jenkins tool when the second merging state is successful;
and if the second construction state is failure, the second construction state judgment module stops submitting the task.
9. A detection apparatus based on JIRA-based code building, comprising a processor coupled to a memory, the memory storing program instructions that, when executed by the processor, implement the detection method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized by comprising a program which, when run on a computer, causes the computer to execute the detection method according to any one of claims 1 to 7.
CN202110684627.3A 2021-06-21 2021-06-21 Detection method, system, device and storage medium based on JIRA code construction Pending CN113485916A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110684627.3A CN113485916A (en) 2021-06-21 2021-06-21 Detection method, system, device and storage medium based on JIRA code construction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110684627.3A CN113485916A (en) 2021-06-21 2021-06-21 Detection method, system, device and storage medium based on JIRA code construction

Publications (1)

Publication Number Publication Date
CN113485916A true CN113485916A (en) 2021-10-08

Family

ID=77934179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110684627.3A Pending CN113485916A (en) 2021-06-21 2021-06-21 Detection method, system, device and storage medium based on JIRA code construction

Country Status (1)

Country Link
CN (1) CN113485916A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573235A (en) * 2024-01-17 2024-02-20 山东浪潮数据库技术有限公司 Continuous integrated construction configuration management method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678773A (en) * 2017-09-28 2018-02-09 郑州云海信息技术有限公司 A kind of code development based on git and testing process management method
US20200004518A1 (en) * 2018-06-28 2020-01-02 Atlassian Pty Ltd Systems and methods for tracking source code deployments
CN111352651A (en) * 2020-03-31 2020-06-30 中国建设银行股份有限公司 Code branch management method and device
CN111897566A (en) * 2020-06-23 2020-11-06 福建升腾资讯有限公司 Software development continuous integration method, device, equipment and medium
CN112416451A (en) * 2020-10-15 2021-02-26 福建升腾资讯有限公司 Method, device and medium for automatically converting issue state based on JIRA system
CN112783622A (en) * 2021-01-13 2021-05-11 上海百胜软件股份有限公司 JIRA system-based task management method, system, device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678773A (en) * 2017-09-28 2018-02-09 郑州云海信息技术有限公司 A kind of code development based on git and testing process management method
US20200004518A1 (en) * 2018-06-28 2020-01-02 Atlassian Pty Ltd Systems and methods for tracking source code deployments
CN111352651A (en) * 2020-03-31 2020-06-30 中国建设银行股份有限公司 Code branch management method and device
CN111897566A (en) * 2020-06-23 2020-11-06 福建升腾资讯有限公司 Software development continuous integration method, device, equipment and medium
CN112416451A (en) * 2020-10-15 2021-02-26 福建升腾资讯有限公司 Method, device and medium for automatically converting issue state based on JIRA system
CN112783622A (en) * 2021-01-13 2021-05-11 上海百胜软件股份有限公司 JIRA system-based task management method, system, device and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
OCEAN__: "实战-jira集成gitlab,jenkins持续集成部署实现方案", pages 1 - 12, Retrieved from the Internet <URL:https://blog.csdn.net/oceanyang520/article/details/105374009/> *
WEIXIN_39922147: "python gitlab_Python Gitlab Api 使用方法", pages 1 - 5, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_39922147/article/details/111797766> *
乔克叔叔: "基于Jira的运维发布平台的设计与实现", pages 1 - 12, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/376594324> *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573235A (en) * 2024-01-17 2024-02-20 山东浪潮数据库技术有限公司 Continuous integrated construction configuration management method

Similar Documents

Publication Publication Date Title
US11061790B2 (en) Providing insight of continuous delivery pipeline using machine learning
JP4961123B2 (en) Automated test case validation loosely coupled with respect to automated test case execution
US10282275B2 (en) Method and system for managing code
US20150095619A1 (en) Request change tracker
US11119901B2 (en) Time-limited dynamic testing pipelines
US9003231B1 (en) System for instantiating service instances for testing in a known state
US20220253297A1 (en) Automated deployment of changes to applications on a cloud computing platform
CN113778771B (en) Terminal testing method, system and storage medium
CN113485916A (en) Detection method, system, device and storage medium based on JIRA code construction
CN111209181A (en) Regression testing method, system, device and computer storage medium
US7174359B1 (en) Apparatus and methods for sequentially scheduling a plurality of commands in a processing environment which executes commands concurrently
US20120284695A1 (en) Error simulation
KR101252358B1 (en) Apparatus and method for testing plc command
CN113485913B (en) Branch management method, system, equipment and storage medium
JP2008129825A (en) Computer-based method and system for managing working time
CN113094251A (en) Embedded system testing method and device, computer equipment and storage medium
CN112035368A (en) Automatic software testing method and device, electronic equipment and storage medium
CN112650679B (en) Test verification method, device and computer system
Ngo et al. Research on Test Flakiness: from Unit to System Testing
CN114154838B (en) Product compatibility decision platform, method and storage medium
US11381473B1 (en) Generating resources in a secured network
US11360882B2 (en) Method and apparatus for calculating a software stability index
CN114116468A (en) Application testing method and device, electronic equipment and storage medium
CN117370302A (en) Data class testing method, device, equipment and storage medium
JP6576873B2 (en) Job net verification apparatus and job net verification method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination