CN109683905A - A kind of system method for automatically releasing - Google Patents
A kind of system method for automatically releasing Download PDFInfo
- Publication number
- CN109683905A CN109683905A CN201811585158.4A CN201811585158A CN109683905A CN 109683905 A CN109683905 A CN 109683905A CN 201811585158 A CN201811585158 A CN 201811585158A CN 109683905 A CN109683905 A CN 109683905A
- Authority
- CN
- China
- Prior art keywords
- code
- subdirectory
- module
- packet
- source code
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/447—Target code generation
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention relates to system updating technology field, especially a kind of system method for automatically releasing.The method of the present invention includes following steps: S10, the newest code for obtaining system;S20, creation system configuration file;S30, building system module packet;It is run on S40, server by script drive system module packet;The step S10, when constructing for the first time, from the acquisition newest source code of system in oss server into master catalogue;Then subdirectory is generated;Meanwhile the unusual fluctuation trigger of system is constructed, the code change in 5 sub- directory listings of the real-time detection system;Building system synchronizer trigger script.The present invention can upgrade for block code in system;Avoid it is unnecessary repeat publication and manually issue cumbersome, improve efficiency, reduce the release cycle and cost of system.
Description
Technical field
The present invention relates to system updating technology field, especially a kind of system method for automatically releasing.
Background technique
In systems development process, developer secondary more than a day by hand can integrate the code into trunk, and be compiled, survey
The operation such as examination and publication.Due to this frequently integrated, and starting not in time after integrating compiling and test;It can make code construction
Some defects that fail to predict and some changes beyond desired effect are generated afterwards;To make under the total quality of project
Drop, increases delivery cost and the period of system.
Summary of the invention
Present invention solves the technical problem that being to provide a kind of system method for automatically releasing, the modular code of system is realized
Upgrading.
The technical solution that the present invention solves above-mentioned technical problem is:
The method includes the following steps:
S10, the newest code for obtaining system;
S20, creation system configuration file;
S30, building system module packet;
It is run on S40, server by script drive system module packet;
The step S10 when constructing for the first time, obtains the newest source code of system to master catalogue in oss server
In;Then subdirectory is generated;Meanwhile the unusual fluctuation trigger of system is constructed, the generation in the subdirectory list of the real-time detection system
Code variation;Building system synchronizer trigger script.
The step S10 passes through source code warehouse uniform resource locator, access credentials and the branch of source code management server
These parameter informations of qualifier obtain the newest source code of system, then carry and return in subdirectory list;It is obtained by software matrix whole
The entire branched structure of a system.
The step S10, the code change are used for as master catalogue and the code data of subdirectory change creation bode ginseng
Number, the synchronous subdirectory code of any need are required to that the bode parameter is called to be recorded;
It is realized by code change trigger using catalog code item temporal consistency mechanism;It is each before more fresh code
A catalogue change generates the unique bode parameter value of timing, for guaranteeing that master catalogue is consistent with the timing of subdirectory code information
Property;Master catalogue code change trigger is communicatively coupled with subdirectory code, by system master catalog code synchronisation to each height
Catalogue.
The system synchronizer trigger script of the step S10 passes through the source code warehouse uniform resource locator of server and matches
Confidence breath carrys out code content in the subdirectory under monitoring system master catalogue;When developer submits to the warehouse of source code management system
The script execution of the mail notification of updated source code, synchronizer trigger script execution or parsing Source Code Control System, from
And trigger the movement for updating source code.
In the step S30, system module packet is constructed according to configuration file;Coordinate in configuration file is system item
Middle component introduces order, any one component must all explicitly define the coordinate of oneself;
When establishing a system item, systems inspection configuration file is to determine which relies on downloading;
Under default situations, system downloads all dependences from source code central repositories, then in subdirectory, building
The local jar packet warehouse of entitled target, while generating classes class, the configuration file of eureka.jar and subdirectory, script
File.
The dependence downloading, firstly, relying on resource from the local repository that local repository obtains system;If no
It finds, then from the storage library lookup downloading of the CS central of default;In building, when the library of statement is not present in local repository
In, it is also not present in system centre repository, then stops the process and error message is output in log.
The step S40 is specifically:
Obtain module process id, the module process before then being terminated according to module id, then by the mould before in server
Block Jar packet is deleted, and is finally replaced with newly-generated module jar packet;
By the new module J ar packet of trigger script startup, then it is in the port of the Jar packet operation of background monitoring operation
No generation, to judge that jar packet runs success or not;As not successfully, then re-executed above-mentioned movement;
Other module packets are executed according to two above step, up to all module packet startings of system finish.
Dissemination method is automatically integrating using system of the invention, can be upgraded for block code in system;It avoids
It is unnecessary to repeat publication and manually issue cumbersome, it improves efficiency, reduces the release cycle and cost of system.
Detailed description of the invention
The following further describes the present invention with reference to the drawings:
Fig. 1 is flow chart of the invention.
Specific embodiment
It as shown in Figure 1, is that present system is automatically integrating publication flow chart.This method comprises:
S10: the newest code of system is obtained, specific implementation process:
When constructing for the first time, from the acquisition newest source code of system in oss server into master catalogue;Then 5 are generated
Subdirectory;
Its step specifically: pass through the source code warehouse uniform resource locator of the server of source code management server, access
Voucher and these parameter informations of Branch Qualifier obtain the newest source code of system, then carry and return in subdirectory list.Pass through software
The entire branched structure of list acquisition whole system.
S11: the unusual fluctuation trigger of system is constructed
Utilize the code change in 5 sub- directory listings of the system unusual fluctuation trigger real-time detection system, the code
Change includes 5 sub- catalog code variations, any for the code data change creation bode parameter for master catalogue and subdirectory
Synchronous subdirectory code is needed to be required to that the bode parameter is called to be recorded;The code change trigger uses catalogue generation
Code item temporal consistency mechanism: before more fresh code, the unique bode parameter value of timing is generated for the change of each catalogue, is used for
Guarantee the temporal consistency of master catalogue and subdirectory code information;Master catalogue code change trigger and subdirectory code into
Row communication connection, by system master catalog code synchronisation to each subdirectory;
In order to be able to achieve master catalogue and subdirectory code update, bode0 parameter is created to master catalogue smartnvestment,
To 5 in S10 directory creating bode1, bode2, bode3, bode4, bode5 parameters, according to master catalogue and subdirectory bode
Value carrys out synchronizing code information.
S12: the synchronous trigger script of building system
Building system synchronous polling script, is supervised by the source code warehouse uniform resource locator and configuration information of server
Control code content in the subdirectory under system master catalog.One typical application scenarios of function that synchronizer trigger script is realized
It is, when developer submits updated source code, synchronizer trigger script execution or solution to the warehouse of source code management system
The script execution of the mail notification of Source Code Control System is analysed, to trigger the movement for updating source code, specific implementation procedure is such as
Under:
Trigger script is polled retrieval to the bode parameter value that s11 is mentioned in source code with certain sequential manner, when
It was found that and last bode parameter value it is inconsistent when carry out code update.
In trigger script;Such as: for module 1, when calling the trigger script the 1st time, i (index)
It is 0 for 0, bode value, into after poll, i is set to 0, bode first and is set to bode_i, the polling system module since i,
Middle i is module serial number, and index is the number updated.To system, other module source codes are polled retrieval to same mode,
Until all module source codes of system are last state.
S20: creation system configuration file smartinvestment_conf.xml illustrates as follows with implementation process:
Smartinvestment_conf.xml is system configuration file, is the core document of building, in the definition of system
In, any module eventually from source code generate one in the form of monofile existing for program bag, packet format can be jar, zip
And war, each such program bag is abstract to turn to component, and similar to the concept of Java packet, each such component passes through
The coordinate that these three parameters of gId, aId and version are constituted uniquely is specified, thus each newly-built system item will use it is upper
Stating parameter is current system project component specified coordinate, similarly using dependence needed for such coordinate technical routine.
Using configuration file script, it is all one that either CLASSPATH is specified in compiling or execution program
Essential work, project be related to Jar packet it is more in the case where, arrange Jar Bao Douhui and take a substantial amount of time and energy,
And these problems are just reduced to add corresponding dependence in smartnvestment_conf.xml after use, according to task
Different configuration files comp_classpath can be divided into according to the scene for relying on building CLASSPATH, dev_classpath and
The building configuration file smartnvestment_conf.xml of tunn_classpath three classes, system provides<tope>label
The coordinate which kind of scene pertains only to current system building using the most basic configuration file of can be defined on for dependence
(coordinate) and required dependence (dependency).
Rely on label detailed annotation:
Relying on can include basic gId, the elements such as aId, version, and the dependencies under root element project can
With comprising one or more dependency element, to state one or more dependence.
It is each to rely on the element that may include:
GId, aId and version: the basic coordinates of dependence, for any one is relied on, basic coordinates are most important
, configuration file can just find the dependence of needs according to coordinate.
Type: the type of dependence, the packaging defined corresponding to item coordinates.In most cases, which need not
Statement, default value is jar.Exclusions: the wherein dependence range that tope is indicated, the module that module label is packaged are used
It is relied on to exclude transitivity.It is most of to rely on statement only comprising basic coordinates.System needed when compiling main code using
A set of classpath will use another set of classpath when compiling and executing test, when actual motion project,
It will use a set of classpath again.Relying on range is exactly to rely on and these three classpath (compilings for controlling
Classpath, test classpath, operation classpath) relationship, have following several dependence models in system packing process
It encloses:
Compile: compiling relies on range.If do not specified, it will default and use the dependence range.Use this dependence pair
It is all effective in three kinds of compiling, test, operation classpath.
S30: building system module packet, the specific method is as follows:
System module packet is constructed according to configuration file smartinvestment_conf.xml in S20;Wherein configuration text
Coordinate is that component introduces order in system item in part, any one component must all explicitly define the coordinate of oneself, coordinate
Element includes gId, aId, version, packaging, classfier.
S31: system module packet repository
When you establish a system item, system can check your configuration file smartnvestment_conf.xml, with
Determine which relies on downloading.Firstly, the local repository for obtaining system from local repository is relied on resource, if do not looked for
It arrives, it then can be stored library lookup downloading from the CS central of default.In building, when the library that you state is not present in local
In repository, it is not not present in system centre repository yet, which will stop and error message is output in log.
S32: local module packet warehouse is added
Under default situations, system downloads all dependences from source code central repositories, then in subdirectory, building
The local jar packet warehouse of entitled target, while generating classes class, the configuration file of eureka.jar and subdirectory, script
File.
Such as under feign catalogue, the local jar packet warehouse of entitled target can be also generated, while constructing classes
The configuration file of class, feign.jar and subdirectory, script file.Similarly, it can all be constructed in other subdirectories corresponding
Jar APMB package and classes class.
S40: it is run on server by script drive system module packet
Then the system jar packet constructed according to S30 is driven the operation of jar packet by script on centos, specifically held
Row process is as follows:
Obtain module process id, the module process before then being terminated according to module id, then by the mould before in server
Block Jar packet is deleted, and is finally replaced with newly-generated module jar packet.
By the new module J ar packet of trigger script startup, then the port of the Jar packet operation of background monitoring operation is again
No generation, thus to judge that jar packet runs success or not, it is such as failed, then re-execute above-mentioned movement
Other module packets are executed according to two above step, up to all module packet startings of system finish.
Claims (7)
1. a kind of system method for automatically releasing, it is characterised in that: the method includes the following steps:
S10, the newest code for obtaining system;
S20, creation system configuration file;
S30, building system module packet;
It is run on S40, server by script drive system module packet;
The step S10, when constructing for the first time, from the acquisition newest source code of system in oss server into master catalogue;So
After generate subdirectory;Meanwhile the unusual fluctuation trigger of system is constructed, the code in the subdirectory list of the real-time detection system becomes
Change;Building system synchronizer trigger script.
2. according to the method described in claim 1, it is characterized by:
The step S10 is limited by the source code warehouse uniform resource locator, access credentials and branch of source code management server
It accords with these parameter informations and obtains the newest source code of system, then carry and return in subdirectory list;Entire system is obtained by software matrix
The entire branched structure of system.
3. according to the method described in claim 1, it is characterized by:
The step S10, the code change are used to create bode parameter for master catalogue and the change of the code data of subdirectory, appoint
The subdirectory code to be synchronized of what is the need for is required to that the bode parameter is called to be recorded;
It is realized by code change trigger using catalog code item temporal consistency mechanism;It is each mesh before more fresh code
Record change generates the unique bode parameter value of timing, for guaranteeing the temporal consistency of master catalogue and subdirectory code information;It is main
Catalog code change trigger is communicatively coupled with subdirectory code, by system master catalog code synchronisation to each subdirectory.
4. according to the method described in claim 1, it is characterized by:
The system synchronizer trigger script of the step S10 is by the source code warehouse uniform resource locator of server and with confidence
Breath carrys out code content in the subdirectory under monitoring system master catalogue;It is updated when developer submits to the warehouse of source code management system
The script execution of the mail notification of source code afterwards, synchronizer trigger script execution or parsing Source Code Control System, to touch
Hair updates the movement of source code.
5. according to the method described in claim 1, it is characterized by:
In the step S30, system module packet is constructed according to configuration file;Coordinate in configuration file is structure in system item
Part introduces order, any one component must all explicitly define the coordinate of oneself;
When establishing a system item, systems inspection configuration file is to determine which relies on downloading;
Under default situations, system downloads all dependences from source code central repositories, then in subdirectory, constructs entitled
The local jar packet warehouse of target, while classes class is generated, the configuration file of eureka.jar and subdirectory, script text
Part.
6. according to the method described in claim 5, it is characterized by:
The dependence downloading, firstly, relying on resource from the local repository that local repository obtains system;If do not looked for
It arrives, then from the storage library lookup downloading of the CS central of default;In building, when the library of statement is not present in local repository
In, it is also not present in system centre repository, then stops the process and error message is output in log.
7. according to the method described in claim 1, it is characterized by:
The step S40 is specifically:
Obtain module process id, the module process before then being terminated according to module id, then by the module J ar before in server
Packet is deleted, and is finally replaced with newly-generated module jar packet;
By the new module J ar packet of trigger script startup, then whether produced in the port of the Jar packet operation of background monitoring operation
It is raw, to judge that jar packet runs success or not;As not successfully, then re-executed above-mentioned movement;
Other module packets are executed according to two above step, up to all module packet startings of system finish.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811585158.4A CN109683905A (en) | 2018-12-24 | 2018-12-24 | A kind of system method for automatically releasing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811585158.4A CN109683905A (en) | 2018-12-24 | 2018-12-24 | A kind of system method for automatically releasing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109683905A true CN109683905A (en) | 2019-04-26 |
Family
ID=66189011
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811585158.4A Withdrawn CN109683905A (en) | 2018-12-24 | 2018-12-24 | A kind of system method for automatically releasing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109683905A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110888664A (en) * | 2019-11-22 | 2020-03-17 | 奇瑞汽车股份有限公司 | Calibration data writing method based on XML mode |
CN110912754A (en) * | 2019-12-12 | 2020-03-24 | 广州西麦科技股份有限公司 | Method and management system for batch operation and maintenance remote hosts |
CN112256351A (en) * | 2020-10-26 | 2021-01-22 | 卫宁健康科技集团股份有限公司 | Implementation method of Feign component, micro-service calling method and device |
CN113127335A (en) * | 2020-01-16 | 2021-07-16 | 北京京东振世信息技术有限公司 | System testing method and device |
CN113220968A (en) * | 2021-05-26 | 2021-08-06 | 西安热工研究院有限公司 | Clustered network crawler-based automatic power technology standard updating system and method |
WO2023093414A1 (en) * | 2021-11-29 | 2023-06-01 | Oppo广东移动通信有限公司 | Micro-application development method and apparatus, and device, storage medium and program product |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102035892A (en) * | 2010-12-23 | 2011-04-27 | 中科方德软件有限公司 | System and method for automatically releasing operating system version and automatically updating software package |
CN102520952A (en) * | 2011-12-14 | 2012-06-27 | 北京佳讯飞鸿电气股份有限公司 | Automatic construction and issuing method of software code version |
CN106293742A (en) * | 2016-08-11 | 2017-01-04 | 浪潮电子信息产业股份有限公司 | Automatic system integration method based on timing construction |
CN106775730A (en) * | 2016-12-21 | 2017-05-31 | 深圳Tcl数字技术有限公司 | Program dissemination method and system |
CN106874050A (en) * | 2017-02-20 | 2017-06-20 | 郑州云海信息技术有限公司 | A kind of system automatically updating method |
CN107729066A (en) * | 2017-11-08 | 2018-02-23 | 重庆扬讯软件技术股份有限公司 | One kind is based on SVN resources banks automation structure dissemination method and device |
US20180253296A1 (en) * | 2015-10-30 | 2018-09-06 | Hewlett Packard Enterprise Development Lp | Software kit release management |
-
2018
- 2018-12-24 CN CN201811585158.4A patent/CN109683905A/en not_active Withdrawn
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102035892A (en) * | 2010-12-23 | 2011-04-27 | 中科方德软件有限公司 | System and method for automatically releasing operating system version and automatically updating software package |
CN102520952A (en) * | 2011-12-14 | 2012-06-27 | 北京佳讯飞鸿电气股份有限公司 | Automatic construction and issuing method of software code version |
US20180253296A1 (en) * | 2015-10-30 | 2018-09-06 | Hewlett Packard Enterprise Development Lp | Software kit release management |
CN106293742A (en) * | 2016-08-11 | 2017-01-04 | 浪潮电子信息产业股份有限公司 | Automatic system integration method based on timing construction |
CN106775730A (en) * | 2016-12-21 | 2017-05-31 | 深圳Tcl数字技术有限公司 | Program dissemination method and system |
CN106874050A (en) * | 2017-02-20 | 2017-06-20 | 郑州云海信息技术有限公司 | A kind of system automatically updating method |
CN107729066A (en) * | 2017-11-08 | 2018-02-23 | 重庆扬讯软件技术股份有限公司 | One kind is based on SVN resources banks automation structure dissemination method and device |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110888664A (en) * | 2019-11-22 | 2020-03-17 | 奇瑞汽车股份有限公司 | Calibration data writing method based on XML mode |
CN110912754A (en) * | 2019-12-12 | 2020-03-24 | 广州西麦科技股份有限公司 | Method and management system for batch operation and maintenance remote hosts |
CN113127335A (en) * | 2020-01-16 | 2021-07-16 | 北京京东振世信息技术有限公司 | System testing method and device |
CN113127335B (en) * | 2020-01-16 | 2024-07-16 | 北京京东振世信息技术有限公司 | System testing method and device |
CN112256351A (en) * | 2020-10-26 | 2021-01-22 | 卫宁健康科技集团股份有限公司 | Implementation method of Feign component, micro-service calling method and device |
CN112256351B (en) * | 2020-10-26 | 2023-11-17 | 卫宁健康科技集团股份有限公司 | Method for realizing Feign component, method and device for calling micro-service |
CN113220968A (en) * | 2021-05-26 | 2021-08-06 | 西安热工研究院有限公司 | Clustered network crawler-based automatic power technology standard updating system and method |
CN113220968B (en) * | 2021-05-26 | 2023-03-14 | 西安热工研究院有限公司 | Clustered network crawler-based automatic power technology standard updating system and method |
WO2023093414A1 (en) * | 2021-11-29 | 2023-06-01 | Oppo广东移动通信有限公司 | Micro-application development method and apparatus, and device, storage medium and program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109683905A (en) | A kind of system method for automatically releasing | |
CN108388445B (en) | Continuous integration method based on 'platform + application' mode | |
CN112882700B (en) | IOS application program construction method and device, electronic equipment and storage medium | |
US8683430B2 (en) | Synchronizing development code and deployed executable versioning within distributed systems | |
US8037453B1 (en) | System and method for continuous software configuration, test and build management | |
CN104615466B (en) | A kind of cloud platform dispositions method and system | |
CN110768833A (en) | Application arrangement and deployment method and device based on kubernets | |
KR20190038750A (en) | Multi-task scheduling method, system, application server and computer-readable storage medium | |
CN111666099B (en) | Application service release system | |
CN109086051B (en) | Application component deployment method and device and computer storage medium | |
CN104899047B (en) | Web page frame dispositions method and system | |
US20200183683A1 (en) | Application architecture generation | |
CN111324522A (en) | Automatic test system and method | |
CN104679500B (en) | Method and device for realizing automatic generation of entity class | |
CN105468427A (en) | Implementation method and system of automatic compilation and release | |
EP3447635A1 (en) | Application architecture generation | |
Halle et al. | Next generation IMA configuration engineering-from architecture to application | |
CN111651352B (en) | Warehouse code merging method and device | |
CN114253562A (en) | Management and deployment method and system of server software package | |
CN110928780B (en) | Code quality control method, device, computer equipment and storage medium | |
CN103139281A (en) | Individuation printing system and control method thereof | |
US7437705B1 (en) | System and method for building an application on a computing device which includes an environment-controlling process | |
CN117527896A (en) | Method and system for interfacing multi-system data with third party electronic files | |
CN112379934B (en) | Deployment method and device of cloud computing platform and storage medium | |
Pastrana-Pardo et al. | Approach to the Best Practices in Software Development Based on DevOps and SCRUM Used in Very Small Entities |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190426 |