CN109683899A - A kind of software integrating method and device - Google Patents

A kind of software integrating method and device Download PDF

Info

Publication number
CN109683899A
CN109683899A CN201710971254.1A CN201710971254A CN109683899A CN 109683899 A CN109683899 A CN 109683899A CN 201710971254 A CN201710971254 A CN 201710971254A CN 109683899 A CN109683899 A CN 109683899A
Authority
CN
China
Prior art keywords
code
integrated
software product
module
product
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.)
Granted
Application number
CN201710971254.1A
Other languages
Chinese (zh)
Other versions
CN109683899B (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.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology 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 China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201710971254.1A priority Critical patent/CN109683899B/en
Publication of CN109683899A publication Critical patent/CN109683899A/en
Application granted granted Critical
Publication of CN109683899B publication Critical patent/CN109683899B/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/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The embodiment of the present invention provides a kind of software integrating method and device, the technical issues of for solving Integrated Simulation low efficiency in the prior art.This method is applied in the calculating equipment for being equipped with continuous integrating tool Jenkins, the parameter information of central server in the Jenkins configured with Open Source Code censorware Gerrit, this method comprises: determining there is code to be integrated in the central server according to the parameter information when Jenkins described in the calculating equipment calls;Obtain the code to be integrated;The code to be integrated is compiled, program bag is generated;The program bag of generation is deployed in production environment, software product is generated.

Description

A kind of software integrating method and device
Technical field
The present invention relates to computer field, in particular to a kind of software integrating method and device.
Background technique
Existing software project development is generally basede on continuous integrating tool Jenkins and version control system time machine (Subversion, SVN) is realized.Specific development process includes: developer using SVN progress co-development, after exploitation Code is committed to the same central server, and initiates code and proposes survey;The test that operation maintenance personnel receives developer's initiation refers to After showing, code in SVN is pulled by Jenkins platform task and is compiled, and the program bag that compiling obtains is deployed in test Environment;Tester carries out various functions test to program bag in test environment;After test passes through, it will be surveyed by operation maintenance personnel The program bag pinged is deployed to production environment, generates software product.
But in existing this Integrated Simulation scheme, the compiler task of Jenkins can only be difficult by manually triggering To accomplish that real-time triggers, lead to Integrated Simulation low efficiency.
Summary of the invention
The present invention provides a kind of software integrating method and device, for solving the skill of Integrated Simulation low efficiency in the prior art Art problem.
First aspect of the embodiment of the present invention provides a kind of software integrating method, applies and is being equipped with continuous integrating tool The calculating equipment of Jenkins, the parameter of the central server in the Jenkins configured with Open Source Code censorware Gerrit Information, which comprises
When the Jenkins described in the calculating equipment calls, determined in the central server according to the parameter information In the presence of code to be integrated;
Obtain the code to be integrated;
The code to be integrated is compiled, program bag is generated;
The program bag of generation is deployed in production environment, software product is generated.
In above scheme, Gerrit is used to replace the SVN in existing Integrated Simulation scheme as version control system, exploitation Personnel are submitted on Gerrit after integrated code, and Gerrit can start compiler task with automatic trigger Jenkins, are realized Gerrit and Jenkins links, and improves Integrated Simulation efficiency;Also, the distributed management mode based on Git, can make Developer can also complete the exploitation work of daily code in the case where the central server of local Gerrit and Gerrit disconnects Make, largely alleviates when central server breaks down and adversely affected to entire Integrated Simulation project.
Optionally, described that the program bag of generation is deployed in production environment, comprising: will be for realizing the journey of identical function Sequence packet is divided in a module, obtains M module altogether, M is positive integer;The M module is pushed to module publication library storage It deposits;According to user instructions, at least one module is obtained from module publication library;All modules that will acquire carry out whole It closes;Module, related middleware and configuration file after integration is packaged into Docker mirror image, generates initial software product;It will The initial software product allocation of generation is into production environment.By the method, Jenkins is after compiling program bag, by program Packet carries out classification storage in a modular way, can directly be indicated to select need from module publication library according to user when producing software product The module wanted is integrated, and personalized software product is provided for client, can reduce the workload of Integrated Simulation, saves exploitation Cost.
Optionally, after all program bags are carried out module division, modules are pushed to module publication library storage Before, the method also includes: test environment in be separately operable modules, determine that modules are without exception.Pass through we Formula can be improved the reliability of module.
Optionally, after generating initial software product, by the initial software product allocation of generation into production environment it Before, the method also includes: the initial software product is pushed into product publication library storage;The initial software by generation Product allocation is into production environment, comprising: according to user instructions, obtains at least one initial software from product publication library Product, and the initial software product allocation that will acquire is into production environment.By the method, initial software product is pushed to Product issues library storage, so that Jenkins can indicate directly to select from product publication library according to user when producing software product It selects the initial software product of needs and is deployed in production environment, promote product allocation efficiency;Secondly, technical staff can pass through Product publication library understands the development of current each product Clear & Transparently, promotes the control dynamics of software product, reduces O&M Communication cost between personnel and developer.
Optionally, after generating initial software product, the initial software product is pushed into product publication library storage Before, the method also includes: test environment in run the initial software product, determine that the initial software product is no different Often.Pass through the method, it may be possible to which the reliability for improving product publication library further increases the efficiency of Integrated Simulation.
Optionally, the initial software product of at least two versions, the product publication are stored in product publication library At least there are two different initial software products in library has equal modules.By the method, software set can further improve At efficiency.
Optionally, before being compiled to the code to be integrated, the method also includes: the Jenkins is called, It is at least one of following to determine that the code to be integrated meets: not used variable is not present;There is no unnecessary objects;It does not deposit In repeated loop nesting;There is no memory overflows.By the method, integrated code is treated before compiling and carries out abnormal inspection It surveys, can make up for it the indiscoverable hidden danger in testing process, promote code quality, improve program operational efficiency and program is long The stability of time operation.
Optionally, the method also includes: during the Integrated Simulation, call the Jenkins, carry out task Statistics.By the method, the actual conditions of code can be counted, it is more scientific accurately to reflect actual code matter Amount and Integrated Simulation efficiency promote efficiency of research and development convenient for the processes of research & development of management level more scientific ground management software product.
Second aspect of the embodiment of the present invention also provides a kind of Integrated Simulation device, and described device is for calling continuous integrating work Has Jenkins, the parameter information of the central server configured with Open Source Code censorware Gerrit, institute in the Jenkins It states device and comprises determining that unit, for determining there is code to be integrated in the central server according to the parameter information;It obtains Unit is taken, for obtaining the code to be integrated;Processing unit generates program for being compiled to the code to be integrated Packet;The program bag of generation is deployed in production environment, software product is generated.
Optionally, the processing unit is used for: will be divided in a module for realizing the program bag of identical function, altogether M module is obtained, M is positive integer;The M module is pushed to module publication library storage;According to user instructions, from the mould Block publication obtains at least one module in library;All modules that will acquire are integrated;Module, correlation after integration is intermediate Part and configuration file are packaged into Docker mirror image, generate initial software product;By the initial software product allocation of generation to life It produces in environment.
Optionally, the processing unit is also used to: after all program bags are carried out module division, modules being pushed away It is sent to before module publication library storage, is separately operable modules in test environment, determines that modules are without exception.
Optionally, the processing unit is used for: after generating initial software product, by the initial software product department of generation Before affixing one's name in production environment, the initial software product is pushed into product publication library storage;According to user instructions, from described The initial software product allocation that obtains at least one initial software product, and will acquire is to production environment in product publication library In.
Optionally, the processing unit is also used to: after generating initial software product, the initial software product being pushed away It send to before product publication library storage, runs the initial software product in test environment, determine the initial software product It is without exception.
Optionally, the initial software product of at least two versions, the product publication are stored in product publication library At least there are two different initial software products in library has equal modules.
Optionally, the processing unit is also used to: before being compiled to the code to be integrated, being determined described wait collect Meet at code at least one of following: not used variable is not present;There is no unnecessary objects;There is no repeated Loop nesting;There is no memory overflows.
Optionally, the processing unit is also used to: during the Integrated Simulation, carrying out task statistics.
The third aspect of the embodiment of the present invention also provides a kind of calculating equipment, comprising: at least one processor, and with it is described The memory of at least one processor communication connection, communication interface;Wherein, the memory be stored with can by it is described at least one The instruction that processor executes, the instruction that at least one described processor is stored by executing the memory, utilizes the communication Interface executes method described in first aspect of the embodiment of the present invention.
Fourth aspect of the embodiment of the present invention also provides a kind of computer readable storage medium, the computer-readable storage medium Matter is stored with computer instruction, when the computer instruction is run on computers, so that computer is executed as the present invention is real Apply method described in a first aspect.
The one or more technical solutions provided in the embodiment of the present invention, have at least the following technical effects or advantages:
1, the embodiment of the present invention uses Gerrit to replace SVN as version control system, and developer may make to exist It is not connected to also complete the development of daily code in the case where central server, be effectively relieved due to central server event Barrier negatively affects product development bring;
2, the mode that the embodiment of the present invention has used Gerrit and Jenkins platform to link, developer exist It is had submitted on Gerrit after integrated code, Integrated Simulation efficiency can be improved with automatic trigger Jenkins compiler task.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without any creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is the flow diagram of software integrating method in the embodiment of the present invention;
Fig. 2 is the structural schematic diagram of integrated software system in the embodiment of the present invention;
Fig. 3 is that module issues inventory's storage structure schematic diagram in the embodiment of the present invention;
Fig. 4 is that product issues inventory's storage structure schematic diagram in the embodiment of the present invention;
Fig. 5 is the structural schematic diagram of principal and subordinate's server of Jenkins in the embodiment of the present invention;
Fig. 6 be the embodiment of the present invention in software integrating method development phase main flow schematic diagram;
Fig. 7 be the embodiment of the present invention in software integrating method test phase main flow schematic diagram;
Fig. 8 be the embodiment of the present invention in software integrating method launch phase main flow schematic diagram;
Fig. 9 is the structural schematic diagram of Integrated Simulation device in the embodiment of the present invention;
Figure 10 is the structural schematic diagram that equipment is calculated in the embodiment of the present invention.
Specific embodiment
Jenkins is an open source software project, provides an open software platform, persistently duplicate for monitoring Work, such as automatic compiling, automatic packaging, automatic test, automatic publication, help user to realize that software continuous is integrated.
SVN is an open source version control system, using the management mode of centralization, is cooperateed with for multiple developers Carry out project development.
Current most of integrated software project publication realizes that specific method process is as follows by Jenkins and SVN: Developer carries out co-development using SVN;Developer submits code after developing, and initiates code and propose survey;O&M people Member pulls code in SVN by Jenkins platform task and is compiled, and the program bag obtained after compiling is deployed in test wrapper Border;Tester carries out various functions test to program bag in test environment;After test passes through, operation maintenance personnel passes through test Program bag is deployed to production environment, generates software product.Above each step needs developer, operation maintenance personnel, tester etc. It cooperates and carries out, exception occurs in any one step, then return back to back and checked, and investigation is until code development step by step Stage.
But in above-mentioned Integrated Simulation scheme, SVN and Jenkins platform intergration lack linkage, the compiling of Jenkins Task can only manually be triggered by research staff, be difficult to accomplish to trigger in real time, led to Integrated Simulation low efficiency.Also, due to SVN It is controlled using the code of centralization, i.e., the code that all developers submit can only be submitted to central server, so in once Central server breaks down, and developer can not just submit code, adversely affect to entire Integrated Simulation.
Git is the distributed version control system of an open source, can efficiently, quickly be handled from very little to very big Item version management.Git uses the framework of version repository localization, center of the developer in addition to code can be committed to Git Except server, it can also be submitted to local, each developer can copy one completely by clone on the local machine The warehouse Git just can synchronize the version repository of local version repository and central server when there is the code of integrated needs.
Gerrit is an Open Source Code censorware, uses Git as bottom version control system, and support is cooperateed with Multiple developers of exploitation check mutually mutual program code.
In order to solve above-mentioned technical problem of the existing technology, the embodiment of the present invention use Gerrit replace SVN as Version control system, and by the linkage of Gerrit platform and Jenkins platform, once developer has submitted on Gerrit to be needed The code to be integrated, will automatic trigger Jenkins execute compiler task, the real-time touching of Jenkins compiler task is realized with this Hair improves Integrated Simulation efficiency;Also, the distributed management mode based on Git, developer are being not connected to central server In the case of can also complete the development of daily code, can largely alleviate central server and break down to entire software Integrated project adversely affects.
Technical solution of the present invention is described in detail below by attached drawing and specific embodiment, it should be understood that the present invention Specific features in embodiment and embodiment are the detailed description to technical solution of the present invention, rather than to the technology of the present invention The restriction of scheme, in the absence of conflict, the technical characteristic in the embodiment of the present invention and embodiment can be combined with each other.
It is to be appreciated that in the description of the embodiment of the present invention, the vocabulary such as " first ", " second " are only used for distinguishing and retouch The purpose stated, is not understood to indicate or imply relative importance, can not be interpreted as indication or suggestion sequence.In the present invention In the description of embodiment " multiple ", refer to two or more.
Term "and/or" in the embodiment of the present invention, a kind of only incidence relation for describing affiliated partner, expression can be with There are three kinds of relationships, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three feelings of individualism B Condition.In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
The embodiment of the invention provides a kind of software integrating method, applies and be equipped with continuous integrating tool Jenkins's It calculates in equipment, the parameter information of the central server in the Jenkins configured with Open Source Code censorware Gerrit, tool Body implementation can be realized in Jenkins platform configuration " Gerrit Trigger " plug-in unit: be inserted at " Gerrit Trigger " The parameter information that the central server of Gerrit is configured in part, after the starting of " Gerrit Trigger " plug-in unit, Jenkins platform With central server keep connecting, central server, will be on automatic trigger Jenkins once occur needing integrated code The code compilation task of configuration, and then realize the linkage of code version control system Gerrit and Jenkins platform.
Referring to Fig.1, the software integrating method mainly comprises the steps that
Step 101: determining there is code to be integrated in the central server according to the parameter information;
Specifically, research staff can protect code after exploitation code in local Gerrit equipment referring to Fig. 2 It deposits to the local version library of Gerrit, and is uploaded to the central server of Gerrit simultaneously.Research staff can be according to this submission Whether need to be committed to Integrated Simulation selection and submit type, common submission is selected if being not necessarily to submit test, continues subsequent development Work;If desired it is committed to Integrated Simulation and then selects integrated submission.Wherein, integrated submit of selection can use topic in Git Characteristic realizes integrated submission by adding preassigned character string in code, that is, needs integrated submit just in generation to be integrated The central server for being committed to Gerrit after preassigned character string is added in code, is not added then in advance if it is common submission Specified character string is directly submitted.Jenkins is according to the central server parameter information of Gerrit to the center service of Gerrit The state of device is measured in real time, and is existed once detecting in the central server of Gerrit comprising preassigned character string Code determines that there is code to be integrated in the central server.
Step 102: obtaining the code to be integrated;
Step 103: the code to be integrated being compiled, program bag is generated;The program bag of generation is deployed to production In environment, software product is generated.
In the above scheme, Gerrit is used to replace the SVN in existing Integrated Simulation scheme as version control system, area Execute the mode of compiler task in existing artificial triggering Jenkins, this programme using topic in Git characteristic, by The mode that preassigned character string is added in code realizes that Gerrit automatic trigger Jenkins executes compiler task, Jin Ershi Existing Gerrit and Jenkins links, and improves Integrated Simulation efficiency;Also, the distributed management mode based on Gerrit, can be with So that developer can also complete opening for daily code in the case where the central server of local Gerrit and Gerrit disconnects Work is sent out, central server is largely alleviated and breaks down and adversely affected to entire Integrated Simulation project.
Optionally, before executing above-mentioned steps 103, the method also includes: detect in the code to be integrated whether There are exceptions.
Specifically, Jenkins, which treats integrated code according to default rule, is scanned detection, detect in code to be integrated With the presence or absence of not used variable, it is not necessary to object, repeated loop nesting and memory overflow etc..If there is with Any one upper exception then notifies related development personnel to carry out abnormal row by modes such as mail, short message, instant message applications It looks into;If detection passes through, triggers Jenkins and execute corresponding compiler task.
The method is different from the prior art middle Jenkins and is directly compiled after integrated code obtaining, but is compiling Integrated code is treated before translating to carry out abnormality detection, can make up for it the indiscoverable hidden danger in testing process, promotes code quality, Improve the stability of program operational efficiency and program long-play.
Optionally, before the program bag of generation is deployed to production environment, the method can also include: notice setting User treats integrated code and audits, and is again deployed to the program bag of generation after the confirmation message for receiving setting user feedback Production environment;If audit does not pass through, related development people can be notified by modes such as mail, short message, instant message applications Member carries out abnormal investigation.
For example, can indicate that research and development group group leader or technical specialist audit whether the code to be integrated meets predictive encoding Specification, because good coding criterion can make code is subsequent being capable of long term maintenance;It also can indicate that research and development group group leader or skill Art expert audits the code that whether there is malicious operation behavior in the code to be integrated, for example backdoor programs, malice delete generation Code etc., guarantees the safety of code with this.
By the method, code quality can be further promoted.
In existing Integrated Simulation scheme, Jenkins is after treating integrated code compilation and generating program bag, directly to journey Sequence packet is disposed, and software product is produced.In practical application, when providing same software product for different clients, need sometimes Personalized customization is carried out according to the demand of client, for example differentiation customization is carried out to the partial function of software product.But one As for, difference is smaller between the different clients version of same software product, if for each client all using complete Integrated Simulation process remove production software product, just have a large amount of duplicate work, development cost is high.
In consideration of it, the embodiment of the present invention proposes a kind of novel program bag storage mode: Jenkins is will generation be integrated Code is compiled as after program bag, will be divided in the same module for realizing the program bag of function of unity, and by the mould of acquisition Block is sent to module publication library storage.When needing to generate software product, Jenkins directly from module publication library transfer module into Row is integrated and is deployed to production environment, can be obtained software product.
Corresponding, the specific implementation that the program bag of generation is deployed to production environment described in above-mentioned steps 103 can To include: that will be divided in a module for realizing the program bag of identical function, M module is obtained altogether, M is positive integer;It will The M module is pushed to module publication library storage;According to user instructions, at least one mould is obtained from module publication library Block;All modules that will acquire are integrated;Module, related middleware and configuration file after integration is packaged into Docker mirror image generates initial software product;By the initial software product allocation of generation into production environment.
Wherein, any one module in module publication library can include multiple and different versions simultaneously.For example, figure 3 issue a kind of schematic diagram of possible storage organization in library for module in the embodiment of the present invention, and module publication shown in Fig. 3 library is extremely Less include modules A and module B, wherein modules A has tri- versions of V1.0, V1.1, V1.2, module B have V1.0, V2.1, V3.0, Tetra- versions of V3.1.
Wherein, different software product can issue the same module in library to module and be multiplexed.The multiplexing can be The identical version module of same module is multiplexed, is also possible to use the different editions module of same module, this hair respectively Bright embodiment is not particularly limited.
In the specific implementation process, caused by including multiple versions simultaneously in order to avoid a module in software product Incompatibility problem, the embodiment of the present invention can require each product software when using any module, can only use any module A version.
By the method, Jenkins carries out classification storage after compiling program bag, by program bag in a modular way, It directly can indicate that the module needed from module publication library selection is integrated according to user when producing software product, be provided for client Personalized software product can reduce the workload of Integrated Simulation, save development cost.
Optionally, after all program bags are carried out module division, modules are pushed to module publication library storage Before, modules can also be tested, i.e., is separately operable modules in test environment, whether judges modules There are exceptions, and module without exception is only pushed to module publication library storage.
Unacceptable module is tested if there is existing, then needs to notify related technical personnel that intervention is traced, determines exception class Type;If being that non-code is abnormal, retriggered test assignment after being solved by tester is then submitted if it is code exception It is repaired to developer and the process since development phase again.
In the specific implementation process, it can will test relevant configuration file to decouple with program itself, that is to say, that above-mentioned The program that compiling generates does not include the configuration file of any environmental correclation.After above-mentioned compiler task successfully completes, Jenkins meeting Modules are deployed to test environment by automatic trigger deployment task.If deployment failure needs operation maintenance personnel intervention to trace, Retriggered deployment task after non-code is then solved by operation maintenance personnel extremely, code are then committed at developer extremely and repair The redoubling process since development phase again;Jenkins module testing task is triggered if deployment success.
Wherein, the test environment of modules can be provided and be safeguarded by operation maintenance personnel.Module testing task automatic trigger It can realize that the plug-in unit provides Jenkins by " the Parameterized Trigger Plugin " plug-in unit of Jenkins platform Association Trigger Function between platform task, and allow by way of environmental variance the Transfer Parameters between task, can will be more A subtask is integrated into a large-scale workflow.
By the method, the reliability of module can be improved.Moreover, the method is different from the prior art in test program package When program bag and test associated profile are uniformly directly configured into the mode being packaged, but it is module is relevant to test Configuration file decoupling, without constructing multiple identical modular program packets for more parts of different deployed environments, it is thus possible to effectively subtract Few be repeated several times is packaged, and promotes efficiency of research and development.
With the research and development of identical product difference personalized customization version, there is the customized product progress to each sale The demand of management, but existing Jenkins can not be managed collectively the customized product of each sale;Meanwhile it is existing Technology usually only updates the single of software product or a small amount of several modules, updated software produces when updating software product Often there is the incompatible problem of new and old module in product.
Optionally, the embodiment of the present invention proposes a kind of novel initial software product storage mode: at the beginning of above-mentioned generation After beginning software product, by the initial software product allocation of generation into production environment before, the initial software product is pushed away It send to product publication library and stores.
Correspondingly, the specific implementation of initial software product allocation to the production environment by generation may include: According to user instructions, at least one initial software product, and the initial software that will acquire are obtained from product publication library Product allocation is into production environment.
Wherein, what is stored in product publication library is not only module, but middleware, the configuration text that module is relied on it The starting script etc. that all kinds of environment integrations such as part are packaged into Docker mirror image and are stored, while being also configured with Docker mirror image Content.When there is initial software product to need to update, entire product is updated by Jenkins in the form of Docker mirror image. Therefore, operation maintenance personnel is in deployment software product, when only need the configuration file for getting out corresponding production environment, passing through script will The starting of docker container can be completed complex environment and build, and no longer need to the complicated running environment of building.
Wherein, product publication library can store the initial software product of any number of versions, and different initial soft Part product can issue the same module stored in library to module and be multiplexed, which can be the identical version to same module This module is multiplexed, and is also possible to use the different editions module of same module respectively, the embodiment of the present invention does not do specific limit System.
For example, Fig. 4 is a kind of schematic diagram for possible storage organization that product issues library in the embodiment of the present invention, Fig. 4 shows Product publication library include at least product A and product B, wherein product A has two versions of V1.0, V2.0, product B have V1.0, Tri- versions of V2.1, V3.0.Same module can be multiplexed between identical product different editions, such as shown in Fig. 4 V3.0 the and V2.1 version of product B has modules A and module C, and version is identical;It can also be to same mould between different product Block is multiplexed, such as product A shown in Fig. 4 and product B have modules A.
By the method, initial software product is subjected to classification storage in a modular way, when producing software product Jenkins directly can be indicated to select the initial software product needed from product publication library and is deployed to production environment according to user In, for operation maintenance personnel, it is only necessary to get out the configuration file of corresponding production environment, be started Docker container by script Complex environment can be completed to build, no longer need to the complicated running environment of building, can effectively reduce the problem of environmental structure complexity, Promote product allocation efficiency;
Secondly, technical staff can issue the development that library understands current each product Clear & Transparently by product, with The latitude of product carries out unified storage and management to the product of different editions, can effectively promote the control dynamics of software product, The communication cost between operation maintenance personnel and developer is reduced simultaneously;
Moreover, it is different from and individual module program bag is individually disposed into update, since the method has used product publication Library is managed product, so can realize entire software product in the form of Docker mirror image in upgrading products software Deployment updates, and solves the prior art incompatible technical problem of new and old module when updating software product.
Optionally, after generating initial software product, the initial software product is pushed into product publication library storage Before, each initial software product can also be tested, i.e., is separately operable each initial software product in test environment, Judge that initial software product without exception with the presence or absence of exception, is only pushed to product publication inventory by each initial software product Storage.
Unacceptable initial software product is tested if there is existing, then needs notification technique personnel intervention to trace, determines different Normal type;If being that non-code is abnormal, retriggered test assignment after being solved by tester, if it is code exception, then It is committed at developer and repairs and the process since development phase again.
It should be noted that needing during testing initial software product to Jenkins server and journey The parameters index of sequence is monitored, such as CPU, memory, network flow etc..Because once occurring during integration testing A kind of parameter index of any of the above is abnormal, even if initial software product function normally can not pass through test.
Pass through the method, it may be possible to which the reliability for improving product publication library further increases the efficiency of Integrated Simulation.
Optionally, it during above-mentioned Integrated Simulation, can unite with the building task on Jenkins platform Meter, and generate statistical report form.
Wherein, task statistical content may include the number of task triggering, Mission Success number, mission failure number, mention The code content of friendship, the function point of covering, duration of task run etc., the embodiment of the present invention is not particularly limited.Statistical It can carry out in a periodic manner, such as daily, weekly, monthly, every year etc. to carry out task statistics for the period.
By the method, the actual conditions of code can be counted, it is more scientific accurately to reflect actual generation Code quality and Integrated Simulation efficiency;Statistical report form can be automatically generated simultaneously, is convenient for management level more scientific ground management software The processes of research & development of product promotes efficiency of research and development.
Traditional Jenkins software generally operates in the server end of linux system, but continuous with user demand Expand, need to windows operating system, the IOS and Android operation system of MAC OS operating system and mobile terminal into Row is supported.However, the function library of each type operating system bottom is different, all classes can not be completed by a linux system The compiling of type system pack is packaged work.
Optionally, referring to Fig. 5, the embodiment of the present invention utilizes the master slave mode of Jenkins platform, by each of Jenkins It is the dedicated compiler server of each operating system from server settings, after triggering compiler task, the primary server of Jenkins The compiler task of each operating system is forwarded to corresponding from server, packing is compiled by respective operating system, is beaten It is bundled into the module publication library for being uniformly pushed to Jenkins after function again.
By the method, Jenkins can realize Integrated Simulation under different operating system environment, improve user's body It tests.
It is to be appreciated that those skilled in the art can be to above-mentioned software integrating method provided in an embodiment of the present invention It is combined, modification and variation, generates various software Integrated Solution.In order to which technical solution of the present invention is more clearly understood, Next enumerate one of possible Integrated Simulation scheme, program specific implementation flow include main research and development, test and Issue three phases.
Referring to Fig. 6, the main method process of development phase includes: research staff using Gerrit progress co-development, generation Submit code to the central server of Gerrit after code exploitation;Whether the code that Jenkins detects this submission is needs Integrated code, if it has, then the code detection task of triggering Jenkins;If detection does not pass through, pass through mail messaging etc. It is abnormal that mode notifies that the developer for submitting the code checks, if detecting the compiler task for successfully triggering Jenkins;If Compiling is failed, then it is abnormal to notify that the developer for submitting the code checks by modes such as mail messagings, if compiling successfully, Further research and development group group leader or technical specialist is notified to carry out manual examination and verification to program bag code, if the audit fails for this, The developer's concrete reason that can be submitted by mail notification enters test phase if audit passes through.
Referring to Fig. 7, the main method process of test phase includes: the triggering after compiler task success of development phase The module deployment task of Jenkins, i.e., by all program bags according to its for realizing function carry out module division, and each mould Block is deployed in corresponding test environment;If deployment failure needs operation maintenance personnel intervention to trace, non-code is abnormal then by transporting Retriggered deployment task after dimension personnel solve, code is then committed at developer extremely repair and again from research and development rank Section starts process, the trigger module test assignment if deployment success;If test does not pass through, tester's intervention is needed to trace, Retriggered test assignment after non-code is then solved by tester extremely, code are then committed at developer extremely and repair Program bag is pushed to module by and if issued in library and deposited by the redoubling Integrated Simulation process since development phase again if test Storage.
Referring to Fig. 8, the main method process of launch phase includes: that technical director needs to select each module version according to product This, is integrated into an initial software product and triggers deployment task, i.e., by initial software product allocation to corresponding test environment In;If deployment failure needs operation maintenance personnel intervention to trace, retriggered is disposed after non-code is then solved by operation maintenance personnel extremely Task, code is then committed at developer extremely to be repaired and the process since development phase again, if deployment success Trigger integration testing task;If test does not pass through, tester's intervention is needed to trace, non-code is then solved by tester extremely Retriggered test assignment after certainly, code are then committed at developer extremely and repair and flow since development phase again Journey, if test pass through, by it is all it is module integrated be a product push to product publication library in store;Successfully it is pushed to product Publication library represents this product and issues successfully.
Based on the same inventive concept, the embodiment of the invention also provides a kind of Integrated Simulation devices, and described device is for adjusting With continuous integrating tool Jenkins, central server in the Jenkins configured with Open Source Code censorware Gerrit Parameter information, referring to Fig. 9, which includes:
Determination unit 21, for determining there is code to be integrated in the central server according to the parameter information;
Acquiring unit 22, for obtaining the code to be integrated;
Processing unit 23 generates program bag for being compiled to the code to be integrated;The program bag of generation is disposed Into production environment, software product is generated.
Optionally, the processing unit 23 is used for:
It will be divided in a module for realizing the program bag of identical function, obtain M module altogether, M is positive integer;
The M module is pushed to module publication library storage;
According to user instructions, at least one module is obtained from module publication library;
All modules that will acquire are integrated;
Module, related middleware and configuration file after integration is packaged into Docker mirror image, initial software is generated and produces Product;
By the initial software product allocation of generation into production environment.
Optionally, the processing unit 23 is also used to:
After all program bags are carried out module division, before modules are pushed to module publication library storage, Modules are separately operable in test environment, determine that modules are without exception.
Optionally, the processing unit 23 is used for:
After generating initial software product, by the initial software product allocation of generation into production environment before, by institute It states initial software product and pushes to product publication library storage;
According to user instructions, at least one initial software product is obtained from product publication library, and will acquire Initial software product allocation is into production environment.
Optionally, the processing unit 23 is also used to:
After generating initial software product, before the initial software product is pushed to product publication library storage, The initial software product is run in test environment, determines that the initial software product is without exception.
Optionally, the initial software product of at least two versions, the product publication are stored in product publication library At least there are two different initial software products in library has equal modules.
Optionally, the processing unit 23 is also used to: before being compiled to the code to be integrated, determine it is described to Integrated code meets at least one of following:
There is no not used variables;
There is no unnecessary objects;
There is no repeated loop nestings;
There is no memory overflows.
Optionally, the processing unit 23 is also used to: during the Integrated Simulation, carrying out task statistics.
The performed specific implementation operated of the above each unit is referred to corresponding method in the embodiment of the present invention one and walks Suddenly, the embodiment of the present invention repeats no more.
Based on the same inventive concept, the embodiment of the invention also provides a kind of calculating equipment, referring to Fig.1 0, the equipment packet It includes:
At least one processor 31, and
Memory 32, communication interface 33 with the communication connection of at least one described processor 31;
Wherein, the memory 32 is stored with the instruction that can be executed by least one described processor 31, and described at least one The instruction that a processor 31 is stored by executing the memory 32, is executed in the embodiment of the present invention using the communication interface 33 Software integrating method.
Based on the same inventive concept, the embodiment of the invention also provides a kind of computer readable storage medium, the calculating Machine readable storage medium storing program for executing is stored with computer instruction, when the computer instruction is run on computers, so that computer is held Software integrating method in the row embodiment of the present invention.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (11)

1. a kind of software integrating method, which is characterized in that it applies in the calculating equipment for being equipped with continuous integrating tool Jenkins, The parameter information of central server in the Jenkins configured with Open Source Code censorware Gerrit, which comprises
When the Jenkins described in the calculating equipment calls, determine in the central server exist according to the parameter information Code to be integrated;
Obtain the code to be integrated;
The code to be integrated is compiled, program bag is generated;
The program bag of generation is deployed in production environment, software product is generated.
2. the method as described in claim 1, which is characterized in that described that the program bag of generation is deployed in production environment, packet It includes:
It will be divided in a module for realizing the program bag of identical function, obtain M module altogether, M is positive integer;
The M module is pushed to module publication library storage;
According to user instructions, at least one module is obtained from module publication library;
All modules that will acquire are integrated;
Module, related middleware and configuration file after integration is packaged into Docker mirror image, generates initial software product;
By the initial software product allocation of generation into production environment.
3. method according to claim 2, which is characterized in that, will be each after all program bags are carried out module division Module is pushed to before module publication library storage, the method also includes:
Modules are separately operable in test environment, determine that modules are without exception.
4. method according to claim 2, which is characterized in that after generating initial software product, by the initial soft of generation Before part product allocation is into production environment, the method also includes:
The initial software product is pushed into product publication library storage;
The initial software product allocation by generation is into production environment, comprising:
According to user instructions, at least one initial software product is obtained from product publication library, and will acquire initial Software product is deployed in production environment.
5. method as claimed in claim 4, which is characterized in that after generating initial software product, by the initial software Product pushes to before product publication library storage, the method also includes:
The initial software product is run in test environment, determines that the initial software product is without exception.
6. method as claimed in claim 4, which is characterized in that the product publication is stored with the first of at least two versions in library Beginning software product, the product publication at least have equal modules in the presence of two different initial software products in library.
7. as the method according to claim 1 to 6, which is characterized in that be compiled it to the code to be integrated Before, the method also includes:
The Jenkins is called, it is at least one of following to determine that the code to be integrated meets:
There is no not used variables;
There is no unnecessary objects;
There is no repeated loop nestings;
There is no memory overflows.
8. as the method according to claim 1 to 6, which is characterized in that further include:
During the Integrated Simulation, the Jenkins is called, carries out task statistics.
9. a kind of Integrated Simulation device, which is characterized in that described device is described for calling continuous integrating tool Jenkins The parameter information of central server in Jenkins configured with Open Source Code censorware Gerrit, described device include:
Determination unit, for determining there is code to be integrated in the central server according to the parameter information;
Acquiring unit, for obtaining the code to be integrated;
Processing unit generates program bag for being compiled to the code to be integrated;The program bag of generation is deployed to production In environment, software product is generated.
10. a kind of calculating equipment characterized by comprising
At least one processor, and
The memory that is connect at least one described processor communication, communication interface;
Wherein, the memory is stored with the instruction that can be executed by least one described processor, at least one described processor By executing the instruction of the memory storage, side described in any one of 1-8 is required using the communication interface perform claim Method.
11. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer to refer to It enables, when the computer instruction is run on computers, so that computer is executed as of any of claims 1-8 Method.
CN201710971254.1A 2017-10-18 2017-10-18 Software integration method and device Active CN109683899B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710971254.1A CN109683899B (en) 2017-10-18 2017-10-18 Software integration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710971254.1A CN109683899B (en) 2017-10-18 2017-10-18 Software integration method and device

Publications (2)

Publication Number Publication Date
CN109683899A true CN109683899A (en) 2019-04-26
CN109683899B CN109683899B (en) 2022-04-08

Family

ID=66183315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710971254.1A Active CN109683899B (en) 2017-10-18 2017-10-18 Software integration method and device

Country Status (1)

Country Link
CN (1) CN109683899B (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489090A (en) * 2019-08-19 2019-11-22 中国工商银行股份有限公司 A kind of applied software development method and system based on application model
CN111240699A (en) * 2020-01-22 2020-06-05 上海商汤临港智能科技有限公司 Software product processing method and device and source code interpreter
CN111367531A (en) * 2020-03-26 2020-07-03 北京中指讯博数据信息技术有限公司 Code processing method and device
CN111381861A (en) * 2020-04-02 2020-07-07 中国建设银行股份有限公司 Software collaborative production processing method and device
CN111722880A (en) * 2020-05-11 2020-09-29 深圳市共进电子股份有限公司 Equipment production method, device, terminal equipment and medium
CN111857722A (en) * 2020-06-23 2020-10-30 远光软件股份有限公司 DevOps quality assurance system and method based on three-library mode
CN111897566A (en) * 2020-06-23 2020-11-06 福建升腾资讯有限公司 Software development continuous integration method, device, equipment and medium
CN112214220A (en) * 2020-09-02 2021-01-12 深圳市优必选科技股份有限公司 Method, device and equipment for integrated system
CN112256277A (en) * 2020-10-30 2021-01-22 芯讯通无线科技(上海)有限公司 Software compiling method, system, electronic device and storage medium
CN112486565A (en) * 2020-12-10 2021-03-12 上海芯翌智能科技有限公司 Containerization-based continuous integration method and equipment
CN112558981A (en) * 2020-12-23 2021-03-26 上海万向区块链股份公司 Custom compiling and deploying method and system based on jenkinsfile
CN112947937A (en) * 2021-03-18 2021-06-11 四川虹美智能科技有限公司 Jenkins server-based continuous integration method, device and system
CN113050981A (en) * 2021-03-23 2021-06-29 深圳杰微芯片科技有限公司 Code on-line automatic publishing method, server and storage medium
CN113050982A (en) * 2021-03-23 2021-06-29 深圳杰微芯片科技有限公司 Distributed code automatic publishing system and method
CN113254028A (en) * 2021-04-30 2021-08-13 北京仁科互动网络技术有限公司 Code processing method and device, electronic equipment and storage medium
CN113495748A (en) * 2020-03-18 2021-10-12 北京新能源汽车股份有限公司 Electric control software integrated control method and device for automobile and server
CN114268624A (en) * 2022-03-02 2022-04-01 上海豪承信息技术有限公司 Version file transmission method and device and server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102959540A (en) * 2010-05-31 2013-03-06 松下电器产业株式会社 Content classification system, content generation and classification device, content classification device, classification method and program
US20130074048A1 (en) * 2011-09-21 2013-03-21 Canon Kabushiki Kaisha System, information processing apparatus and control method thereof, image forming apparatus and control method thereof, and computer-readable medium
CN105282049A (en) * 2014-06-18 2016-01-27 中国移动通信集团公司 IP data packet processing method and device
CN105653287A (en) * 2015-12-31 2016-06-08 北京元心科技有限公司 Automatic program version issuing method and device
CN106407100A (en) * 2015-07-29 2017-02-15 中兴通讯股份有限公司 Method and apparatus for realizing continuous integration testing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102959540A (en) * 2010-05-31 2013-03-06 松下电器产业株式会社 Content classification system, content generation and classification device, content classification device, classification method and program
US20130074048A1 (en) * 2011-09-21 2013-03-21 Canon Kabushiki Kaisha System, information processing apparatus and control method thereof, image forming apparatus and control method thereof, and computer-readable medium
CN105282049A (en) * 2014-06-18 2016-01-27 中国移动通信集团公司 IP data packet processing method and device
CN106407100A (en) * 2015-07-29 2017-02-15 中兴通讯股份有限公司 Method and apparatus for realizing continuous integration testing
CN105653287A (en) * 2015-12-31 2016-06-08 北京元心科技有限公司 Automatic program version issuing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
桑林海: "基于VHDL的FPGA工程模块划分和关系研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489090A (en) * 2019-08-19 2019-11-22 中国工商银行股份有限公司 A kind of applied software development method and system based on application model
CN110489090B (en) * 2019-08-19 2023-08-15 中国工商银行股份有限公司 Application software development method and system based on application model
CN111240699A (en) * 2020-01-22 2020-06-05 上海商汤临港智能科技有限公司 Software product processing method and device and source code interpreter
CN113495748A (en) * 2020-03-18 2021-10-12 北京新能源汽车股份有限公司 Electric control software integrated control method and device for automobile and server
CN111367531A (en) * 2020-03-26 2020-07-03 北京中指讯博数据信息技术有限公司 Code processing method and device
CN111381861A (en) * 2020-04-02 2020-07-07 中国建设银行股份有限公司 Software collaborative production processing method and device
CN111722880A (en) * 2020-05-11 2020-09-29 深圳市共进电子股份有限公司 Equipment production method, device, terminal equipment and medium
CN111722880B (en) * 2020-05-11 2024-02-09 深圳市共进电子股份有限公司 Equipment production method and device, terminal equipment and medium
CN111857722A (en) * 2020-06-23 2020-10-30 远光软件股份有限公司 DevOps quality assurance system and method based on three-library mode
CN111897566A (en) * 2020-06-23 2020-11-06 福建升腾资讯有限公司 Software development continuous integration method, device, equipment and medium
CN112214220A (en) * 2020-09-02 2021-01-12 深圳市优必选科技股份有限公司 Method, device and equipment for integrated system
CN112214220B (en) * 2020-09-02 2023-10-10 深圳市优必选科技股份有限公司 Method, apparatus and device for integrated system
CN112256277A (en) * 2020-10-30 2021-01-22 芯讯通无线科技(上海)有限公司 Software compiling method, system, electronic device and storage medium
CN112486565A (en) * 2020-12-10 2021-03-12 上海芯翌智能科技有限公司 Containerization-based continuous integration method and equipment
CN112558981B (en) * 2020-12-23 2024-02-06 上海万向区块链股份公司 Custom compiling and deploying method and system based on jenkinsfile
CN112558981A (en) * 2020-12-23 2021-03-26 上海万向区块链股份公司 Custom compiling and deploying method and system based on jenkinsfile
CN112947937A (en) * 2021-03-18 2021-06-11 四川虹美智能科技有限公司 Jenkins server-based continuous integration method, device and system
CN113050982A (en) * 2021-03-23 2021-06-29 深圳杰微芯片科技有限公司 Distributed code automatic publishing system and method
CN113050981A (en) * 2021-03-23 2021-06-29 深圳杰微芯片科技有限公司 Code on-line automatic publishing method, server and storage medium
CN113254028A (en) * 2021-04-30 2021-08-13 北京仁科互动网络技术有限公司 Code processing method and device, electronic equipment and storage medium
CN114268624A (en) * 2022-03-02 2022-04-01 上海豪承信息技术有限公司 Version file transmission method and device and server
CN114268624B (en) * 2022-03-02 2022-06-03 上海豪承信息技术有限公司 Version file transmission method and device and server

Also Published As

Publication number Publication date
CN109683899B (en) 2022-04-08

Similar Documents

Publication Publication Date Title
CN109683899A (en) A kind of software integrating method and device
US10261776B2 (en) Automated deployment and servicing of distributed applications
US20200019493A1 (en) Automating testing and deployment of software code changes
US8533676B2 (en) Single development test environment
RU2628176C2 (en) Systems, methods and computer software products for assembly and loading process of software with use of compilation and deployment service
CN110321152A (en) A kind of Software Development Platform
US20180113799A1 (en) Model generation for model-based application testing
CN109634843A (en) A kind of distributed automatization method for testing software and platform towards AI chip platform
WO2019020514A1 (en) Edge devices and associated networks utilising microservices
CN108243012B (en) Charging application processing system, method and device in OCS (online charging System)
CN111324599B (en) Block chain experiment system and management method
CN111324522A (en) Automatic test system and method
CN112486518B (en) Consensus algorithm assembling method and device
CN110297659A (en) Algorithm model disposes loading method and device
EP2503449A2 (en) Single development test environment
CN107797914A (en) Code process method, apparatus and code delivery system
CN114257609A (en) Connection to an industrial information center
CN112799782A (en) Model generation system, method, electronic device, and storage medium
CN114167814A (en) Digital engineering for industrial development centers
CN116069334B (en) Cloud-protogenesis-based online development and code hosting method and system
CN110752964A (en) Network equipment testing method and device
EP2503450A2 (en) Version numbering in single development and test environment
CN114265595A (en) Cloud native application development and deployment system and method based on intelligent contracts
Pastrana-Pardo et al. Approach to the Best Practices in Software Development Based on DevOps and SCRUM Used in Very Small Entities
CN115543491A (en) Microservice processing method and device

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
GR01 Patent grant
GR01 Patent grant