CN106095408B - A kind of system and method for data monitoring and Code automatic build and deployment - Google Patents

A kind of system and method for data monitoring and Code automatic build and deployment Download PDF

Info

Publication number
CN106095408B
CN106095408B CN201610378096.4A CN201610378096A CN106095408B CN 106095408 B CN106095408 B CN 106095408B CN 201610378096 A CN201610378096 A CN 201610378096A CN 106095408 B CN106095408 B CN 106095408B
Authority
CN
China
Prior art keywords
code
module
data
jenkins
deployment
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.)
Active
Application number
CN201610378096.4A
Other languages
Chinese (zh)
Other versions
CN106095408A (en
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.)
Insigma Hengtian Software Ltd
Original Assignee
Insigma Hengtian Software 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 Insigma Hengtian Software Ltd filed Critical Insigma Hengtian Software Ltd
Priority to CN201610378096.4A priority Critical patent/CN106095408B/en
Publication of CN106095408A publication Critical patent/CN106095408A/en
Application granted granted Critical
Publication of CN106095408B publication Critical patent/CN106095408B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses the system and method for a kind of data monitoring and Code automatic build and deployment, the achievement data that can disperse continuous integrating subsystem is automatically extracted, and achievement data is effectively included in supervision by centralized displaying, and one-stop data monitoring is better achieved.The skeleton code of newly-built module can be automatically generated, the frame for effectively saving newly-built module builds the time, develops efficiency, while can guarantee the consistency of the skeleton code of software product, is easy to develop maintenance.Further, Automation arranging method can save the artificial deployment time of project, promote exploitation and testing efficiency, while Linux script template therein can help developer more easily to handle the deployment of installation kit and the copy and execution of configuration file or dependent file.

Description

A kind of system and method for data monitoring and Code automatic build and deployment
Technical field
The present invention relates to the system and methods of a kind of data monitoring and Code automatic build and deployment, more particularly to lasting collection At the data monitoring of each subsystem of platform and the system and method for software development Code automatic build frame and automatic deployment.
Background technique
At present in field of software development, software development process includes the method and continuous integrating process that software development uses. Wherein agile methods are generallyd use by global large software company, and agile development method refers to the original in a series of software development Then with method, it carries out software development, feature using the requirement evolution of user as core, using iteration, incremental method It is to be enable to respond quickly demand, refines software function.The work of development project group is improved in agile development method Efficiency, reduces and occurs the risk that integrated mistake causes exploitation to be delayed in software development, and software development generally will use continuous integrating System (CI) helps exploration project group to control risk.
The subsystem that software development continuous integration system includes has code version control and storage subsystem GitLab, code Compiler subsystem jenkins, code quality management subsystem Sonar, software installation packet storage subsystem Nexus.These subsystems It is built as unified by open source software, communication is inflexible with data exchange between this allows for subsystems, especially relates to And the case where Dynamic data exchange of software reusage measurement standard is stored in subsystems, and this data are not concentrated extreme influence data Intuitive because development project group and supervision layer must be by manually checking and copy data to subsystems, general Data summarization and manually storage.Such case necessarily causes the waste of manpower.
The Software Architect for typically relying on and being skilled in technique that builds of initial software frame takes in software development process simultaneously It builds, then code is uploaded in code version control and storage subsystem GitLab again, is then built manually into Jenkins again Vertical Job, thus expends many manual works.It is possible thereby to show to lack at present automatic code generating frame then automatically with hold The method that sequel establishes working space at subsystems.
Further, in continuous integration system, automatic deployment functional configuration is complex, while if being related to complicated work Journey, such as it is related to software installation packet (War packet) plus the configuration file file that other are relied on along with script, picture etc., Automatic deployment just needs user to write complex script to achieve the goal, so as to cause waste of manpower.And continuous integration system one As can only dispose and compile successful installation of project packet recently, and the installation of all old versions of some software project can not be recorded Packet.
Therefore, problem to be solved has in software development integral cycle: automatically extracting continuous integrating subsystem Data are included in supervision, and automation generates software development code skeleton, advantageously realizes automatic deployment, store old version installation kit For managing or disposing.
Summary of the invention
In view of the above-mentioned deficiencies in the prior art, it is an object of the present invention to provide a kind of data monitoring and Code automatic build and portion The system and method for administration, it is therefore an objective to solve during software development continuous integrating data can not centralized displaying, software development code Frame cannot automatically generate, and automatic deployment function is difficult to the problem of configuring and can not disposing history software installation packet.
The purpose of the present invention is achieved through the following technical solutions: a kind of data monitoring and Code automatic build and portion The system of administration, the system include:
(1) module information management module: being managed the modules information of project, including newly-built module, Bian Jimo Block, removing module;And the attribute of projects module is managed, newly-built, editor, deletion, inquiry including module attribute.
(2) data automatically extract module: automatically extracting subsystems data in continuous integration system;The subsystem packet It includes: code version control and storage subsystem GitLab, code compilation subsystem Jenkins, code quality management subsystem Sonar.Extracting mode is that the access address that code submits quantity and code submits state is obtained from GitLab, from Jenkins In obtain code compilation health status, from Sonar obtain code quality evaluation RCI (regular degree of conformity) score.
(3) Code automatic build module: if there is creating modules A in module information management module, then this module is utilized Automatically generate the code and upload code of newly-built modules A.Code automatically generates specifically: the Development Framework of software is selected, it is raw At the analysable Archetype frame of code compilation tool Maven, code building movement is then executed with Maven order.Generation The upload of code specifically: upload to the code of generation in GitLab server with GitLab interface, and in code compilation subsystem Compiler task Job is created in system Jenkins, then Jenkins is called to compile constructing function, code matter is obtained after the completion of building Measure the code quality report address that modules A is created in management subsystem Sonar.
(4) automatically dispose module: automatically dispose interface is established in web front end, user writes deployment step by interface Suddenly.Deploying step includes that installation kit is deployed in the Tomcat container of target machine, copy configuration file and other dependence texts Part is into the target machine of deployment;Wherein, implementation method installation kit being deployed in the Tomcat container of target machine are as follows: The software installation packet stored in warehouse is locally downloading, and the remote deployment Manage function of Tomcat is then recycled to come software Installation kit is deployed in the Tomcat of target machine;Configuration file and other dependent files are copied into the target machine of deployment Implementation method are as follows: write the script template in Linux, the content in script template includes passing through SSH with username and password In login target machine B, copied files A to target machine B, file A therein is configuration file or other dependent files.Finally Script template is encapsulated into an XML configuration file by this module, and the content of this XML file configures text according to Job in Jenkins Part carries out tissue.After the completion of encapsulation, this module will call the interface of the change configuration file of Jenkins, will be in Jenkins Job configuration file is modified, and then executes the deployment function of Job again, finally realizes the automatic deployment of projects module.
Further, which further includes data memory module, which automatically extracts data the index of module extraction Data are stored in database profession.Achievement data can be used (key, value) and store to mode.
Further, which further includes that data are shown and Reports module, the module are responsible for data to automatically extract module The data of acquisition are shown in web front-end, while providing report generation and download function, facilitate administrative staff obtain report and Statistics.
Further, which further includes project information management module, this module is responsible for the management of project information, including item The newly-built of mesh attribute, is deleted, query function at editor.
Further, the Development Framework used in the Code automatic build module are as follows: presentation layer, which uses, is based on HTML/ The front end frame of CSS/JS.Interface layer uses Apache Shiro+SpringMVC framework, and uses Velocity as view Resolver.Service layer selects EhCache to carry out cache management, and scheduling is timed with Quatz.Persistent layer uses Spring Data and Mybatis carries out persistent storage.Relevant database and NoSQL type database are supported in data storage.
Further, in the automatically dispose module, if the format of file A is also Linux script file, foot This template, which is called, executes file A.
Further, which includes project authority management module, and before user logs in this system, user needs to system Administrator applies for project permission, to use the modules of this system.Therefore project authority management module is responsible for configuration management Editor's access authority of project, permission control mode are that access authority is demarcated with role, and PM role is project manager, and permission can To access and fully control item attribute and module attribute.DEV role is developer, and QA role is tester, DEV and QA Permission possess access but be unable to amended subject property rights.
A kind of method of data monitoring and Code automatic build and deployment, which comprises the following steps:
(1) project Maven Archetype frame is constructed.
(2) by module information management module create modules A, then with Code automatic build module to newly-built modules A into Line code automation generates work, including following sub-step:
(2.1) the Maven Archetype frame constructed according to step 1, passes through code compilation tool Maven compiler framework Obtain specific code.
(2.2) code is uploaded in GitLab by GitLab interface and is stored, then existed by Jenkins interface Compiler task Job is established in Jenkins, then Jenkins is called to compile constructing function, is obtained code quality after the completion of building The code quality report address of modules A is created in management subsystem Sonar.
(2.3) Code automatic build module by the GitLab storage address of newly-built modules A and the address Jenkins Job and Code quality report address in Sonar is stored in database profession.
(3) module is automatically extracted by data extract data.The module attribute that inquiry is stored in by step 2 in the database Information, obtains the GitLab code storage address of module, the corresponding address Job in Jenkins, the code quality report in Sonar Accuse address.Then according to address and subsystems data extract interface extracts respectively obtain code in GitLab submit quantity with Code submits the access address of state, the code compilation state of health data of the Job of the module in Jenkins, the generation in Sonar Code quality review RCI (regular degree of conformity) score.
(4) user carries out code development to projects module, the GitLab where code update newly developed to the module Storage address.
(5) Jenkins corresponding to projects module compiles the update that Job has found code automatically, starts compiled code, compiling Version information on installation kit band is uploaded in Nexus after the completion, history of forming software installation packet.
(6) the web front end automatically dispose interface provided by automatically dispose module writes deploying step, including following Sub-step:
(6.1) installation kit is deployed in the Tomcat container of target machine: the history software installation stored in step 5 It wraps locally downloading, then recycles the remote deployment Manage function of Tomcat that history software installation packet is deployed to target In the Tomcat of machine.
(6.2) copy configuration file and other dependent files are into the target machine of deployment: writing the script in Linux Template, the content in script template include: that username and password passes through SSH and logs in target machine B, copied files A to target machine In device B;File A therein is configuration file or other dependent files.
(6.3) script template is encapsulated into an XML configuration file, the content of this XML file is according in Jenkins Job configuration file carries out tissue.
(6.4) interface for calling the change configuration file of Jenkins, the Job configuration file in Jenkins is carried out more Change, then executes the deployment function of Job again, the final automatic deployment for realizing projects module.
Further, in the step 1, code skeleton composition are as follows: presentation layer uses the front end frame based on HTML/CSS/JS Frame.Interface layer uses Apache Shiro+SpringMVC framework, and uses Velocity as view resolver.Service layer choosing Cache management is carried out with EhCache, scheduling is timed with Quatz.Persistent layer uses Spring Data and Mybatis To carry out persistent storage.Relevant database and NoSQL type database are supported in data storage.
Further, this method further includes the steps that for step 2 the data obtained being stored in database profession, and storage mode uses (key, value) stores mode, and database uses MySQL, and storage elasticity is expansible.
The beneficial effects of the present invention are: the achievement data that can disperse continuous integrating subsystem automatically extracts, concentrate aobvious Show, achievement data is effectively included in supervision, one-stop data monitoring is better achieved.The frame of newly-built module can be automatically generated Frame code, the frame for effectively saving newly-built module build the time, develop efficiency, while can guarantee the frame generation of software product The consistency of code, is easy to develop maintenance.Further, Automation arranging method can be saved the artificial deployment time of project, promote Exploitation and testing efficiency, while Linux script template therein can help developer more easily to handle the portion of installation kit The copy and execution of administration and configuration file or dependent file.
Detailed description of the invention
Fig. 1 is a kind of system framework of data monitoring and Code automatic build based on continuous integrating and deployment of the present invention Figure.
Fig. 2 is data monitoring method schematic diagram of the present invention.
Fig. 3 is code automatic generation method schematic diagram of the present invention.
Fig. 4 is automatically dispose method schematic diagram of the present invention.
Specific embodiment
Invention is further described in detail in the following with reference to the drawings and specific embodiments.
Embodiment 1: a kind of system of data monitoring and Code automatic build and deployment, the composition of this system include:
(1) data automatically extract module, this module is one of main modular of the present invention, its function is to automatically extract to continue Subsystems data in integrated system.These subsystems include: code version control and storage subsystem GitLab, and code is compiled Translate subsystem Jenkins, code quality management subsystem Sonar.Extracting mode is that each son is accessed with each subsystem interface System, analyzes the data format of acquisition, and the access address that code submits quantity and code submits state is obtained from GitLab, from Code compilation health status is obtained in Jenkins, obtains code quality evaluation RCI (regular degree of conformity) score from Sonar.
(2) data memory module, the achievement data that this module is responsible for automatically extracting data module extraction are stored in MySQL In database.Wherein achievement data stores mode using (key, value), and storage characteristics are that elasticity is expansible.
(3) data are shown and Reports module, this module are responsible for data to automatically extract the data of module acquisition in web front-end It is shown, while report generation and download function being provided, administrative staff is facilitated to obtain report and statistics.
(4) project information management module, this module are responsible for the management of project information, newly-built, editor including item attribute, It deletes, query function.
(5) module information management module, this module can the modules information to project be managed, including newly model Block, editor module, removing module.Further, this module is also responsible for the newly-built of module attribute, editor, deletes, query function.
(6) Code automatic build module, this module are one of main modular of the present invention, are responsible for automatically generating newly-built module It is automatic come the code for being A then to can use this module if there is creating modules A in module information management module for skeleton code Work is generated, so-called Code automatic build is exactly the Development Framework for selecting software, and it is analysable to generate code compilation tool Maven Then Archetype frame executes code building movement with Maven order.The Development Framework that the present invention uses are as follows: presentation layer Use the front end frame based on HTML/CSS/JS.Interface layer uses Apache Shiro+SpringMVC framework, and uses Velocity is as view resolver.Service layer selects EhCache to carry out cache management, and scheduling is timed with Quatz. Persistent layer carries out persistent storage using Spring Data and Mybatis.Relevant database and NoSQL are supported in data storage Type database.Code automatic build module is also responsible for GitLab interface uploading to the code of generation in GitLab server, And compiler task Job is created in code compilation subsystem Jenkins, then Jenkins is called to compile constructing function, constructed The code quality report address that modules A is created in code quality management subsystem Sonar is obtained after the completion, and last code is given birth to automatically The code quality in the GitLab storage address and the address Jenkins Job and Sonar newly-built modules A is reported at module Address is sent to Project Manager in a manner of mail.
(7) automatically dispose module, this module are one of main modular of the present invention, this functions of modules is that automatically dispose is soft Part installation kit.The method of realization is to establish automatically dispose interface in web front end, and user can easily write portion by interface Affix one's name to step.Deploying step include installation kit is deployed in the Tomcat container of target machine, copy configuration file and other according to Rely file into the target machine of deployment;Wherein, implementation method installation kit being deployed in the Tomcat container of target machine Are as follows: the software installation packet (War packet) stored in the warehouse Nexus is locally downloading, then recycle the remote deployment of Tomcat Manage function is deployed to War packet in the Tomcat of target machine;Configuration file and other dependent files are copied to deployment Target machine in implementation method are as follows: write the expect script template in Linux, the content in script template include with Username and password is by the way that in SSH login target machine B, copied files A to target machine B, file A therein is configuration file Or other dependent files, if the format of file A is also Linux script file, also there is script template calling to execute text The function of part A.Expect script template is encapsulated into an XML configuration file by this last module, and the content of this XML file is pressed Tissue is carried out according to Job configuration file in Jenkins.After the completion of encapsulation, this module will call the change configuration file of Jenkins Job configuration file in Jenkins is modified by interface, then executes the deployment function of Job again, finally realizes project mould The automatic deployment of block.
(8) project authority management module, before user logs in this system, user needs to apply for project power to system manager Limit, to use the modules of this system.Therefore project authority management module is responsible for editor's access right of configuration management project Limit, permission control mode are that access authority is demarcated with role, and PM role is project manager, and permission is accessible and fully controls Item attribute and module attribute.DEV role is developer, and QA role is tester, the permission of DEV and QA possess access but It is unable to amended subject property rights.
Using the method for the data monitoring and Code automatic build and deployment of above system, comprising the following steps:
(1) project Maven Archetype frame is constructed.This frame is according to Maven Archetype framework standard format Write, the specific frame set of the code of selection becomes: presentation layer uses the front end frame based on HTML/CSS/JS.Interface layer uses Apache Shiro+SpringMVC framework, and use Velocity as view resolver.Service layer select EhCache come into Row cache management is timed scheduling with Quatz.Persistent layer is persistently deposited using Spring Data and Mybatis Storage.Relevant database and NoSQL type database are supported in data storage.
(2) by module information management module create modules A, then with Code automatic build module to newly-built modules A into Line code automation generates work, including following sub-step:
(2.1) module title, ID number are filled in, the obtained Maven Archetype frame of optional step 1 passes through code Compilation tool Maven compiler framework obtains specific code.
(2.2) code is uploaded in GitLab by GitLab interface and is stored, then existed by Jenkins interface Compiler task Job is established in Jenkins, then Jenkins is called to compile constructing function, is obtained code quality after the completion of building The code quality report address of modules A is created in management subsystem Sonar.
(2.3) Code automatic build module by the GitLab storage address of newly-built modules A and the address Jenkins Job with And the code quality report address in Sonar is stored in database profession, and notifies Project Manager in a manner of sending mail later.
(3) module is automatically extracted by data extract data.Enquiry module attribute information in the database, this attribute information It is to be stored in database by step 2.After inquiry, the GitLab code storage address of module is obtained, is corresponded in Jenkins The address Job, the code quality report address in Sonar.Then interface difference is extracted according to address and subsystems data It extracts and obtains the access address that code in GitLab submits quantity and code submission state, the generation of the Job of the module in Jenkins Code compiles state of health data, and the code quality in Sonar evaluates RCI (regular degree of conformity) score.
(4) step 2 the data obtained is stored in database profession by data memory module, wherein storage mode uses (key, value) stores mode, and database uses MySQL, and storage characteristics are that elasticity is expansible.
(5) by the data that data are shown and Reports module stores in web front end display step 3, while downloading is provided Report capability.
(6) user carries out code development to projects module.Exploitation reaches certain period of time, can be one day and is also possible to one Hour, user is the GitLab storage address where code update newly developed to the module later.
(7) Jenkins corresponding to projects module compiles the update that Job has found code automatically in step 6, starts to compile generation Installation kit (War packet), is taken version information after the completion of compiling and uploaded in Nexus by code, history of forming software installation packet, for step Rapid 8 automatically dispose uses.
(8) the web front end automatically dispose interface provided by automatically dispose module writes deploying step.Deploying step Comprising installation kit being deployed in the Tomcat container of target machine, the mesh of copy configuration file and other dependent files to deployment It marks in machine, wherein installation kit is deployed to the implementation method in the Tomcat container of target machine are as follows: being stored in step 7 History software installation packet (War packet) it is locally downloading, then recycle Tomcat remote deployment Manage function come War Packet is deployed in the Tomcat of target machine.Configuration file and other dependent files are copied to the realization in the target machine of deployment Method are as follows: write the expect script template in Linux, the content in script template includes that 1, username and password passes through SSH logs in target machine B.2, in copied files A to target machine B, file A therein is configuration file or other rely on text Part.If 3, file A is also a Linux script file, script template, which also has the function of calling, executes file A.Most Expect script template is encapsulated into an XML configuration file by this module afterwards, and the content of this XML file is according in Jenkins Job configuration file carries out tissue.After having encapsulated, this module will call the interface of the change configuration file of Jenkins, will Job configuration file in Jenkins is modified, and then executes the deployment function of Job again, finally realizes the automatic of projects module Deployment.
Embodiment 2: as shown in Figure 1, a kind of data monitoring and Code automatic build and deployment based on continuous integrating is System, comprising:
Data automatically extract module, this module is connected with continuous integration system three subsystems, its function is to mention automatically Take subsystems data in continuous integration system.In Fig. 1, data automatically extract module from figure right side shown in continuous integrating The three subsystems of system: data are automatically extracted in GitLab, Jenkins, Sonar.
Data are automatically extracted the achievement data that module is extracted and are stored in MySQL data by data memory module, this module In library.Wherein achievement data stores mode using (key, value), and storage characteristics are that elasticity is expansible.
Data are shown and Reports module, this module is responsible for data memory module institute's storing data to be shown in web front-end Show, while report generation and download function being provided, administrative staff is facilitated to obtain report and statistics.
Project information management module, this module are responsible for the management of project information, creating, editing, deleting including item attribute It removes, query function.
Module information management module, this module can the modules information to project be managed, including newly-built module, Editor module, removing module.Further, this module is also responsible for the newly-built of module specific object, editor, deletes, query function.
Code automatic build module, in Fig. 1 GitLab and Jenkins be associated, be responsible for automatically generating newly-built module Skeleton code.Then skeleton code is uploaded in GitLab, then by Jenkins interface, compiling is created in Jenkins Then task Job calls Jenkins to compile constructing function, obtains Sonar code quality report address.
Automatically dispose module, this functions of modules are automatically dispose software installation packets.This module is deposited with software installation packet Storage subsystem Nexus is connected with code compilation subsystem Jenkins.The history software installation that this module stores Nexus in figure Packet (War packet) is locally downloading, recycles the remote deployment Manage function of Tomcat then War packet is deployed to target machine In the Tomcat of device.Then this module also provides the expect script template in the Linux write and fills in user, Zhi Houzai Script template is encapsulated into XML file, for updating the configuration of the Job in the Jenkins in Fig. 1, then executes the touching of Job again Function is sent out, finally realizes automatically dispose function.
Project authority management module, before user logs in this system, user needs to apply for project permission to system manager, To use the modules of this system.
As shown in Figure 2, data monitoring method of the invention is as follows:
As the subsystems of continuous integration system are used in conjunction with data acquisition module of the invention with parsing module JSON data format subsystems are automatically extracted in a manner of timed task according to the data access interface of subsystems Data, enter data later and parse to obtain achievement data: code in GitLab submits quantity, and code submits the access of state Address, the code compilation health status in Jenkins, the code quality in Sonar evaluate RCI (regular degree of conformity) score.So Afterwards, (key, value) being pressed after data preparation and being stored in MySQL database system in couples, last web front end is obtained from database To data, user is presented the data to.
As shown in Figure 3, specific step is as follows for code automatic generation method of the invention:
(1) modules A is created in the module information management module of the system in front, is then compiled according in Fig. 3 left frame Schematic diagram builds Maven Archetype frame, the Technical Architecture level that this frame uses are as follows: presentation layer, which uses, is based on HTML/ The front end frame of CSS/JS.Interface layer uses Apache Shiro+SpringMVC framework, and uses Velocity as view Resolver.Service layer selects EhCache to carry out cache management, and scheduling is timed with Quatz.Persistent layer uses Spring Data and Mybatis carries out persistent storage.Relevant database and NoSQL type database are supported in data storage.
(2) after Maven Archetype frame is put up, Code automatic build module through the invention is given birth to automatically At code.Process is: compiling the Maven Archetype frame on the left of Fig. 3 with Maven first, obtains frame in server local Frame code.
(3) skeleton code is uploaded in GitLab by GitLab interface and is stored, then existed by Jenkins interface Compiler task Job is established in Jenkins, then Jenkins is called to compile constructing function, is obtained code quality after the completion of building The code quality report address of modules A is created in management subsystem Sonar.
(4) Code automatic build module by the GitLab storage address of newly-built modules A and the address Jenkins Job and Code quality report address in Sonar is stored in database profession, and retransmits mail notification projects module administrator.
As shown in figure 4, Automation arranging method specific implementation process of the invention includes:
(1) code development, user carry out code development to projects module, where code update newly developed to the module GitLab storage address.
(2) Jenkins corresponding to projects module compiles the update that Job has found code automatically, starts compiled code, compiling Version information on installation kit band is uploaded in Nexus after the completion, history of forming software installation packet.
(3) the web front end automatically dispose interface provided by automatically dispose module writes deploying step, including following Sub-step:
(3.1) warehouse Nexus in Fig. 4 stores the old version software installation packet of all multimodes, automatically dispose mould Block takes out these history installation package informatin, is shown to user, and user chooses after some software installation packet by automatically dispose Module is locally downloading, recycles the remote deployment Manage function of Tomcat then War packet is deployed to target machine In Tomcat container.
(3.2) the expect script template in Linux is write by web interface, script template includes the following contents: SSH Login, copied files, perform script.The SSH login is to log in target machine by SSH with username and password, described to copy Buddhist script written on pattra leaves part is copy configuration file and other dependent files into the target machine of deployment, if including in the file of copy Linux script file, the perform script content can call the function of executing this document.
(3.3) script template is encapsulated into an XML configuration file, the content of this XML file is according in Jenkins Job configuration file carries out tissue.
(3.4) interface for calling the change configuration file of Jenkins, the Job configuration file in Jenkins is carried out more Change, then executes the deployment function of Job again, the final automatic deployment for realizing projects module.

Claims (10)

1. the system of a kind of data monitoring and Code automatic build and deployment, which is characterized in that the system includes:
(1) module information management module: being managed the modules information of project, including creates module, editor module, deletes Except module;And the attribute of projects module is managed, newly-built, editor, deletion, inquiry including module attribute;
(2) data automatically extract module: automatically extracting subsystems data in continuous integration system;The subsystem includes: Code version control and storage subsystem GitLab, code compilation subsystem Jenkins, code quality management subsystem Sonar;Extracting mode is that the access address that code submits quantity and code submits state is obtained from GitLab, from Jenkins In obtain code compilation health status, obtain code quality from Sonar and evaluate regular degree of conformity RCI score;
(3) Code automatic build module: if there is creating modules A in module information management module, then automatic using this module Generate the code and upload code of newly-built modules A;Code automatically generates specifically: selects the Development Framework of software, generates generation Then the code analysable Archetype frame of compilation tool Maven executes code building movement with Maven order;Code It uploads specifically: upload to the code of generation in GitLab server with GitLab interface, and in code compilation subsystem Compiler task Job is created in Jenkins, then Jenkins is called to compile constructing function, is obtained code quality after the completion of building The code quality report address of modules A is created in management subsystem Sonar;
(4) automatically dispose module: automatically dispose interface is established in web front end, user writes deploying step by interface;Portion Administration's step includes that installation kit is deployed in the Tomcat container of target machine, copy configuration file and other dependent files to portion In the target machine of administration;Wherein, implementation method installation kit being deployed in the Tomcat container of target machine are as follows: in warehouse The software installation packet of storage is locally downloading, then the remote deployment Manage function of Tomcat is recycled to come software installation packet It is deployed in the Tomcat of target machine;Configuration file and other dependent files are copied to the realization side in the target machine of deployment Method are as follows: write the script template in Linux, the content in script template includes logging in mesh by SSH with username and password In mark machine B, copied files A to target machine B, file A therein is configuration file or other dependent files;This last module Script template is encapsulated into an XML configuration file, the content of this XML file is carried out according to Job configuration file in Jenkins Tissue;After the completion of encapsulation, this module will call the interface of the change configuration file of Jenkins, and the Job in Jenkins is configured File is modified, and then executes the deployment function of Job again, finally realizes the automatic deployment of projects module.
2. the system of a kind of data monitoring and Code automatic build and deployment according to claim 1, which is characterized in that should System further includes data memory module, which is stored in database profession the achievement data that data automatically extract module extraction; Achievement data can be used (key, value) and store to mode.
3. the system of a kind of data monitoring and Code automatic build and deployment according to claim 1, which is characterized in that should System further includes that data are shown and Reports module, which is responsible for data to automatically extract the data of module acquisition in web front-end It is shown, while report generation and download function being provided, administrative staff is facilitated to obtain report and statistics.
4. the system of a kind of data monitoring and Code automatic build and deployment according to claim 1, which is characterized in that should System further includes project information management module, this module is responsible for the management of project information, newly-built, editor including item attribute, It deletes, query function.
5. the system of a kind of data monitoring and Code automatic build and deployment according to claim 1, which is characterized in that institute State the Development Framework used in Code automatic build module are as follows: presentation layer uses the front end frame based on HTML/CSS/JS;Interface Layer uses Apache Shiro+SpringMVC framework, and uses Velocity as view resolver;Service layer selects EhCache carries out cache management, is timed scheduling with Quatz;Persistent layer is come using Spring Data and Mybatis Carry out persistent storage;Relevant database and NoSQL type database are supported in data storage.
6. the system of a kind of data monitoring and Code automatic build and deployment according to claim 1, which is characterized in that institute It states in automatically dispose module, if the format of file A is also Linux script file, script template, which calls, executes file A。
7. the system of a kind of data monitoring and Code automatic build and deployment according to claim 1, which is characterized in that should System includes project authority management module, and before user logs in this system, user needs to apply for project permission to system manager, To use the modules of this system;Therefore project authority management module is responsible for editor's access authority of configuration management project, Permission control mode is that access authority is demarcated with role, and PM role is project manager, and permission is accessible and fully controls item Mesh attribute and module attribute;DEV role is developer, and QA role is tester, and DEV and QA possess access but cannot change The permission of item attribute.
8. a kind of method of data monitoring and Code automatic build and deployment using system described in claim 1, feature exist In, comprising the following steps:
(1) project Maven Archetype frame is constructed;
(2) modules A is created by module information management module, then with Code automatic build module is carried out to newly-built modules A generation Code automation generates work, including following sub-step:
(2.1) the Maven Archetype frame constructed according to step (1), is obtained by code compilation tool Maven compiler framework To specific code;
(2.2) code is uploaded in GitLab by GitLab interface and is stored, then through Jenkins interface in Jenkins Compiler task Job is established, then Jenkins is called to compile constructing function, code quality is obtained after the completion of building and manages subsystem The code quality report address of modules A is created in system Sonar;
(2.3) Code automatic build module by the GitLab storage address of newly-built modules A and the address Jenkins Job and Code quality report address in Sonar is stored in database profession;
(3) module is automatically extracted by data extract data;The module attribute letter that inquiry is stored in by step (2) in the database Breath obtains the GitLab code storage address of module, the code quality report in Jenkins in the corresponding address Job and Sonar Accuse address;Then according to address and subsystems data extract interface extracts respectively obtain code in GitLab submit quantity with Code submit the access address of state, module in Jenkins Job code compilation state of health data and Sonar in Code quality evaluates regular degree of conformity RCI score;
(4) user carries out code development to projects module, and the GitLab where code update newly developed to the module is stored Address;
(5) Jenkins corresponding to projects module compiles the update that Job has found code automatically, starts compiled code, and compiling is completed Version information on installation kit band is uploaded in Nexus afterwards, history of forming software installation packet;
(6) the web front end automatically dispose interface provided by automatically dispose module writes deploying step, including following sub-step It is rapid:
(6.1) installation kit is deployed in the Tomcat container of target machine: the history software installation packet stored in step (5) It is locally downloading, then recycle the remote deployment Manage function of Tomcat that history software installation packet is deployed to target machine In the Tomcat of device;
(6.2) copy configuration file and other dependent files are into the target machine of deployment: writing the script mould in Linux Plate, the content in script template include: that username and password passes through SSH and logs in target machine B, copied files A to target machine B In;File A therein is configuration file or other dependent files;
(6.3) script template is encapsulated into an XML configuration file, the content of this XML file is matched according to Job in Jenkins It sets file and carries out tissue;
(6.4) interface for calling the change configuration file of Jenkins, the Job configuration file in Jenkins is modified, so Execute the deployment function of Job again afterwards, the final automatic deployment for realizing projects module.
9. according to the method described in claim 8, it is characterized in that, code skeleton forms are as follows: presentation layer in the step (1) Use the front end frame based on HTML/CSS/JS;Interface layer uses Apache Shiro+SpringMVC framework, and uses Velocity is as view resolver;Service layer selects EhCache to carry out cache management, and scheduling is timed with Quatz; Persistent layer carries out persistent storage using Spring Data and Mybatis;Relevant database and NoSQL are supported in data storage Type database.
10. according to the method described in claim 8, it is characterized in that, this method further includes being stored in step (2) the data obtained Step in database, storage mode store mode using (key, value), and database uses MySQL, and storage elasticity can expand Exhibition.
CN201610378096.4A 2016-05-31 2016-05-31 A kind of system and method for data monitoring and Code automatic build and deployment Active CN106095408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610378096.4A CN106095408B (en) 2016-05-31 2016-05-31 A kind of system and method for data monitoring and Code automatic build and deployment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610378096.4A CN106095408B (en) 2016-05-31 2016-05-31 A kind of system and method for data monitoring and Code automatic build and deployment

Publications (2)

Publication Number Publication Date
CN106095408A CN106095408A (en) 2016-11-09
CN106095408B true CN106095408B (en) 2019-05-14

Family

ID=57229738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610378096.4A Active CN106095408B (en) 2016-05-31 2016-05-31 A kind of system and method for data monitoring and Code automatic build and deployment

Country Status (1)

Country Link
CN (1) CN106095408B (en)

Families Citing this family (42)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108122090A (en) * 2016-11-30 2018-06-05 北京国双科技有限公司 A kind of Working information processing method and server
CN108234167B (en) * 2016-12-15 2021-03-16 中国电子科技集团公司电子科学研究院 Method and device for automatically generating north interface adaptation middleware of network manager
CN106843936B (en) * 2016-12-29 2019-12-10 北京航天测控技术有限公司 Method for automatically deploying Web application environment
US10095511B1 (en) 2017-02-23 2018-10-09 Amdocs Development Limited System, method, and computer program for converting a current Java project to a Maven project
CN106897226A (en) * 2017-02-28 2017-06-27 郑州云海信息技术有限公司 The method and device of a kind of continuous integrating test
CN106997297A (en) * 2017-03-31 2017-08-01 广东亿迅科技有限公司 A kind of software development management platform and method based on DevOps
CN108733380B (en) * 2017-04-21 2022-07-05 北京京东尚科信息技术有限公司 Application deployment method and device
CN107291448A (en) * 2017-05-19 2017-10-24 上海瀚乾信息技术服务有限公司 A kind of Software Develop Project Management system
CN107273117B (en) * 2017-05-25 2021-04-09 土巴兔集团股份有限公司 Programming-friendly agile code automatic generation system
CN107291450B (en) * 2017-05-25 2021-04-09 土巴兔集团股份有限公司 Programming-friendly agile code automatic generation method
CN109144843B (en) * 2017-06-27 2022-06-07 北京京东尚科信息技术有限公司 Method and device for deploying test environment
CN107273140B (en) * 2017-07-06 2018-09-21 武汉斗鱼网络科技有限公司 Scaffold manages method, apparatus and electronic equipment
CN107480050B (en) * 2017-07-17 2020-10-27 上海爱数信息技术股份有限公司 Test method for automatically testing update package
CN107515766A (en) * 2017-08-24 2017-12-26 北京锐安科技有限公司 Generation method, deployment installation method and the device of database deployment file
CN107391213A (en) * 2017-08-29 2017-11-24 郑州云海信息技术有限公司 A kind of method, apparatus of memory apparatus system upgrading and a kind of upgrade-system
CN107608710B (en) * 2017-08-31 2021-08-31 华为技术有限公司 Software project construction task configuration method and device based on Jenkins tool
CN108572912A (en) * 2017-09-22 2018-09-25 北京金山云网络技术有限公司 A kind of continuous integrating method, apparatus, electronic equipment and storage medium
CN108108169B (en) * 2017-12-27 2020-11-03 广东小天才科技有限公司 Multi-branch construction method and system based on Jenkins
CN108241493A (en) * 2018-01-09 2018-07-03 政采云有限公司 The automation continuous integrating of distributed software system and delivery method, device and system
CN108521428B (en) * 2018-04-20 2020-09-01 武汉极意网络科技有限公司 Realization method and system for preventing reptiles in public network based on jenkins
CN108829378B (en) * 2018-05-24 2022-06-21 北京顺丰同城科技有限公司 Application software development method and device and electronic equipment
CN108763042A (en) * 2018-05-24 2018-11-06 广东睿江云计算股份有限公司 A kind of Cloud Server performance data acquisition method and device based on python
CN109002307A (en) * 2018-06-27 2018-12-14 郑州云海信息技术有限公司 A kind of upgrading and automated testing method automatically
CN109614085B (en) * 2018-10-23 2019-11-29 深圳微迅信息科技有限公司 Function realizing method, device, computer equipment and storage medium
CN109582315A (en) * 2018-10-26 2019-04-05 北京百度网讯科技有限公司 Service privatization method, apparatus, computer equipment and storage medium
CN109240669A (en) * 2018-10-26 2019-01-18 苏州浪潮智能软件有限公司 A kind of integrated deployment software development model of automation
CN111506315A (en) * 2019-01-31 2020-08-07 广州数控网络科技有限公司 Code deployment method for flexible digital control and digital control platform
JP7473145B2 (en) * 2019-05-31 2024-04-23 コネクトフリー株式会社 Software development device and software development program
CN110377274B (en) * 2019-07-08 2023-05-05 紫光云技术有限公司 Single-Spa-based micro front end architecture system and development and deployment method
CN110321113B (en) * 2019-07-09 2022-08-02 苏宁消费金融有限公司 Integrated assembly line system taking project batches as standards and working method thereof
CN110413484B (en) * 2019-08-02 2023-01-31 西安微电子技术研究所 Cluster monitoring method supporting heterogeneous platform
CN110769026A (en) * 2019-09-09 2020-02-07 河南拓普计算机网络工程有限公司 Distributed internet information acquisition system and method
CN110795080A (en) * 2019-10-21 2020-02-14 山东舜知信息科技有限公司 Automatic code generation system based on database annotation and construction method
CN111190586A (en) * 2019-12-16 2020-05-22 腾讯科技(深圳)有限公司 Software development framework building and using method, computing device and storage medium
CN111158744B (en) * 2019-12-30 2024-02-23 中国银行股份有限公司 Cross-platform heterogeneous data integration method and device
CN111258561A (en) * 2020-01-10 2020-06-09 北京慧博科技有限公司 Method for starting and monitoring software automatic compiling and deploying
CN113778501B (en) * 2020-06-22 2024-05-17 北京沃东天骏信息技术有限公司 Code task processing method and device
CN112507378A (en) * 2020-12-08 2021-03-16 广东荣文科技集团有限公司 Data processing method, electronic equipment and related product
CN113760302B (en) * 2021-09-09 2023-04-07 四川虹美智能科技有限公司 Jenkins-based UI package deployment method and system
CN114756454A (en) * 2022-03-29 2022-07-15 润芯微科技(江苏)有限公司 Code management, continuous integration and delivery working method and system for embedded software development
CN115002598B (en) * 2022-05-26 2024-02-13 歌尔股份有限公司 Headset mode control method, headset device, head-mounted device and storage medium
CN116737174B (en) * 2023-08-15 2023-11-14 中国兵器装备集团兵器装备研究所 Automatic subsystem generating tool and method based on open source hong Meng system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876893A (en) * 2009-04-28 2010-11-03 上海亿客网络科技有限公司 Automatic generation method of WEB project code
CN103324470A (en) * 2012-03-21 2013-09-25 阿里巴巴集团控股有限公司 Web system generation method and device
CN103345406A (en) * 2013-06-21 2013-10-09 中国科学院深圳先进技术研究院 System and method for achieving cloud virtual mobile terminal of intelligent mobile terminal
CN104915774A (en) * 2015-06-05 2015-09-16 浪潮电子信息产业股份有限公司 SVN log analysis and project management software combination-based method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030149958A1 (en) * 2002-02-06 2003-08-07 Shumeet Baluja Automatic code generation for applications which run on common platforms
US10206770B2 (en) * 2013-07-05 2019-02-19 Oracle International Corporation Load plan generation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876893A (en) * 2009-04-28 2010-11-03 上海亿客网络科技有限公司 Automatic generation method of WEB project code
CN103324470A (en) * 2012-03-21 2013-09-25 阿里巴巴集团控股有限公司 Web system generation method and device
CN103345406A (en) * 2013-06-21 2013-10-09 中国科学院深圳先进技术研究院 System and method for achieving cloud virtual mobile terminal of intelligent mobile terminal
CN104915774A (en) * 2015-06-05 2015-09-16 浪潮电子信息产业股份有限公司 SVN log analysis and project management software combination-based method

Also Published As

Publication number Publication date
CN106095408A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN106095408B (en) A kind of system and method for data monitoring and Code automatic build and deployment
CN110851356B (en) Selenium-based Web application automatic test framework and construction method and system thereof
US20160170719A1 (en) Software database system and process of building and operating the same
CN107273117B (en) Programming-friendly agile code automatic generation system
CN104133772B (en) Automatic test data generation method
CN107291450B (en) Programming-friendly agile code automatic generation method
CN106445536B (en) Automatic business design management system
CN111061817A (en) Adaptive service construction system, method and computer readable medium
CN103425778A (en) Intelligent development platform for database application system
CN110928783A (en) RobotFramework-based automatic test datamation reconstruction platform
CN101799754A (en) Method and system for developing web application
CN107209773A (en) Automatically unified visualization interface is called
US20060047723A1 (en) Custom database system and method of building the same
CN103984769A (en) Use-case data management and storage method
CN104156199B (en) A kind of automatic continuous integrated approach of software and system
Vasyliuk et al. Construction Features of the Industrial Environment Control System.
US20100011018A1 (en) Custom database system and method of building the same
CN108287720A (en) software compilation method, device, equipment and storage medium
Gómez et al. Scalable modeling technologies in the wild: an experience report on wind turbines control applications development
Arbain et al. Non-functional requirement traceability process model for agile software development
CN115599361A (en) Software development method, device, equipment and medium
US20080022258A1 (en) Custom database system and method of building and operating the same
US8631393B2 (en) Custom database system and method of building and operating the same
CN113220592A (en) Processing method and device for automated testing resources, server and storage medium
Romano et al. Applying MDA development approach to a Hydrological Project

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant