WO2019170018A1 - Application publishing method and apparatus - Google Patents

Application publishing method and apparatus Download PDF

Info

Publication number
WO2019170018A1
WO2019170018A1 PCT/CN2019/076248 CN2019076248W WO2019170018A1 WO 2019170018 A1 WO2019170018 A1 WO 2019170018A1 CN 2019076248 W CN2019076248 W CN 2019076248W WO 2019170018 A1 WO2019170018 A1 WO 2019170018A1
Authority
WO
WIPO (PCT)
Prior art keywords
branch
feature
code
release
instance
Prior art date
Application number
PCT/CN2019/076248
Other languages
French (fr)
Chinese (zh)
Inventor
潘亮
钱琨
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2019170018A1 publication Critical patent/WO2019170018A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/445Exploiting fine grain parallelism, i.e. parallelism at instruction level
    • G06F8/4452Software pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • One or more embodiments of the present disclosure relate to the field of terminal technologies, and in particular, to an application publishing method and apparatus.
  • a processing idea of a publishing pipeline is proposed.
  • the application publishing process can be divided into several publishing phases in series, so that the application is organized and deployed in an orderly manner by each publishing phase. Processing, testing, and other processing operations help to quickly and securely deploy applications to production environments.
  • one or more embodiments of the present specification provide an application publishing method and apparatus.
  • an application publishing method including:
  • the code version of the instance is displayed in the information display area corresponding to the corresponding release stage according to the instance of the application that is respectively run in each release stage.
  • an application publishing apparatus including:
  • a stage display unit that displays multiple release phases of the application
  • the version display unit displays the code version of the instance in the information display area corresponding to the corresponding release stage according to the instance of the application respectively running in each release stage.
  • FIG. 1 is a schematic structural diagram of an application publishing system according to an exemplary embodiment.
  • FIG. 2 is a flowchart of an application publishing method provided by an exemplary embodiment.
  • FIG. 3 is a flow chart of a creation example provided by an exemplary embodiment.
  • FIG. 4A is a schematic diagram of implementing feature branch management through a feature branch management interface according to an exemplary embodiment.
  • FIG. 4B is a schematic diagram of implementing feature branch management through a feature branch management interface according to an exemplary embodiment.
  • FIG. 4C is a schematic diagram of implementing feature branch management through a feature branch management interface according to an exemplary embodiment.
  • FIG. 5 is a schematic diagram showing information related to an example of running a release phase provided by an exemplary embodiment.
  • FIG. 6 is a schematic diagram of creating a new instance according to an exemplary embodiment.
  • FIG. 7 is a schematic diagram of related information respectively showing an example of running a plurality of publishing stages, according to an exemplary embodiment.
  • FIG. 8 is a schematic diagram of information related to an example of running a selected release phase provided by an exemplary embodiment.
  • FIG. 9 is a flowchart of an implementation of a rollback operation provided by an exemplary embodiment.
  • FIG. 10 is a flowchart of sharing a publishing branch between multiple publishing pipelines according to an exemplary embodiment.
  • FIG. 11 is a schematic diagram of sharing a publishing branch between multiple publishing pipelines according to an exemplary embodiment.
  • FIG. 12 is a schematic structural diagram of an apparatus according to an exemplary embodiment.
  • FIG. 13 is a block diagram of an application publishing apparatus according to an exemplary embodiment.
  • the steps of the corresponding method are not necessarily performed in the order shown and described in the specification in other embodiments. In some other embodiments, the method may include more or fewer steps than those described herein. In addition, the individual steps described in this specification may be decomposed into multiple steps for description in other embodiments; while the multiple steps described in this specification may be combined into a single step in other embodiments. description.
  • the application publishing solution of the present specification may be applied to an electronic device, such as a mobile phone, a PC, a tablet device, a notebook computer, a PDA (Personal Digital Assistants), and a wearable device (eg, Smart glasses, smart watches, etc., etc., one or more embodiments of the present specification are not limited thereto.
  • the electronic device can run an application publishing system to implement the application publishing scheme of the present specification.
  • the application of the application publishing system can be pre-installed on the electronic device, so that the application publishing system can be started and run on the electronic device; of course, when adopting technologies such as HTML5, it is not necessary to install the corresponding device on the electronic device.
  • the application can get and run the app publishing system.
  • FIG. 1 is a schematic structural diagram of an application publishing system provided by an exemplary embodiment.
  • the application publishing system may include the server 11, the network 12, and several electronic devices as shown in FIG. 1, for example, the electronic device may include the PC 13, the PC 14.
  • the server 11 can run the program on the server side of the application publishing system to implement related processing functions, and the PC 13 and the PC 14 can run the client side program of the application publishing system during the running process.
  • the application publishing system is implemented between the server 11 and the PC 13 and the PC 14.
  • the server 11 may be a physical server including a separate host, or the server 11 may be a virtual server hosted by the host cluster.
  • the electronic device may include other types of devices as follows: mobile phones, tablet devices, notebook computers, personal digital assistants (PDAs), and wearable devices (such as smart glasses, smart watches, etc.). And the like, one or more embodiments of the present specification are not limited thereto.
  • PDAs personal digital assistants
  • wearable devices such as smart glasses, smart watches, etc.
  • the network 12 that interacts between the PC 13, the PC 14 and the server 11
  • various types of wired or wireless networks may be included.
  • the network 12 may include a Public Switched Telephone Network (PSTN) and the Internet.
  • PSTN Public Switched Telephone Network
  • the client application of the application publishing system can be pre-installed on the electronic device so that the client can be launched and run on the electronic device; of course, when adopting an online "client” such as HTML5 technology.
  • the client can be obtained and run without having to install the appropriate application on the electronic device.
  • FIG. 2 is a flowchart of an application publishing method provided by an exemplary embodiment. As shown in FIG. 2, the method may include the following steps:
  • Step 202 showing multiple release phases of the application.
  • multiple release phases of the application belong to a certain release pipeline corresponding to the application.
  • the corresponding release pipeline of the application may be provided with a corresponding pipeline administrator, and the pipeline administrator is responsible for configuring the release phase included in the release pipeline.
  • the release phase of the release pipeline can be configured by users of other identities, and this specification does not limit this.
  • the visualization node icons corresponding to the respective release stages may be respectively displayed, and the visualization node icons are sequentially arranged according to the running sequence between the respective release stages, and the icons of the respective visualization nodes are sequentially performed by icons such as arrows.
  • the connection enables a visual representation of the release phase contained in the release pipeline, enabling users of each role (such as pipeline administrators, application developers, etc.) to clearly and clearly understand the health of the release pipeline.
  • the instances of the application do not necessarily run in all the release phases from beginning to end, in some cases from the release phase of an intermediate location, or in some cases alone.
  • the release phase runs; the pipeline administrator or other users can adjust according to the actual situation, this specification does not limit this.
  • step 204 the code version of the instance is displayed in the information display area corresponding to the corresponding release stage according to the instance of the application that is respectively run in each release stage.
  • a corresponding instance (or a running instance) is generated based on the current situation of the application at the loading time, so that the instance runs on the publishing pipeline, and the running result is It is used to reflect the application at the above loading moment.
  • the application is loaded to the release pipeline at another time, if the code content of the application or the like is different from the current situation of the loading moment, another instance needs to be generated, and the other instance is run on the release pipeline; Even if the code content of the application does not differ from the current situation of the loading moment described above, such as only for the re-run of the application, it may still be necessary to regenerate the instance and run the regenerated instance on the publishing pipeline.
  • different instances of the application have different code versions for accurately distinguishing between different instances. Since the instances of the application are sequentially run in the various release phases of the release pipeline, different release phases can run instances of different code versions; for example, when the release pipeline includes "first phase ⁇ second phase ⁇ third phase", at first After the phase completes the operation of instance 1, the instance 1 can continue to be run by the second phase, and the first phase can run the subsequently loaded instance 2. Therefore, by displaying the code version of the running instance in the information display area corresponding to the release phase, the user can clearly understand the instances running in each release phase, and clarify the operation of each instance.
  • the feature branches included in the publishing branch of the instance may be displayed in the information display area corresponding to the corresponding publishing stage.
  • these new features are represented by the feature branches contained in the release branch of the instance.
  • the information display area may be a single area, and the code version and the information of the feature branch are displayed in the single area.
  • the information presentation area may be a combination of a plurality of sub-areas, such as a first sub-area for presenting a code version and a second sub-area for displaying information of a characteristic branch.
  • an instance may include a trunk code of the application, and a release branch code corresponding to the release branch.
  • the trunk code corresponds to the main function of the application, and the release branch is composed of the feature branches of the application; correspondingly, the release branch code is obtained by combining the feature branch codes corresponding to the feature branches.
  • the application may include one or more new features, and the instance of the application may include a corresponding one or more feature branches, and the feature branch code of the feature branches may be provided by one or more developers. This is not a limitation.
  • the initial release branch code may be formed by the feature branch code of the first feature branch, and then the feature branch code of the other feature branches is merged into the release branch code.
  • the final release branch code is finally obtained.
  • an audit operation for the feature branch may be implemented to restrict the addition of a feature branch that has not passed the audit; of course, in some cases, the addition may fail to be approved.
  • the feature branch depends on the management strategy actually adopted, and this specification does not limit this.
  • the audit operation can be an automatic audit or a manual audit performed by the auditor. This manual does not limit this.
  • the audit operation may include at least one of a plurality of types such as code review and security audit, and this specification does not limit this.
  • the auditing operation may be implemented for the feature branch code of the feature branch, or may be implemented for other information such as the submitter of the feature branch, and this specification does not limit this.
  • the audit result of the feature branch may be obtained and recorded in the snapshot data corresponding to the feature branch; then, when the feature branch does not change, it may be recorded according to the corresponding snapshot data.
  • the result of the audit determines the audit status of the feature branch. For example, when the snapshot data is recorded as the audit pass, and the subsequent view is that the feature branch has passed the audit without re-reviewing, and the snapshot data is recorded as the audit fails, the subsequent considers that The feature branch failed the approval.
  • the feature branch changes for example, the editing operation for the corresponding feature branch code is detected, the original corresponding snapshot data may be deleted or the original corresponding snapshot data may be marked as untrusted, so that the audit must be re-implemented for the changed feature branch. .
  • the feature branch management interface of the publishing branch may be displayed, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used for displaying An optional feature branch; wherein the release branch code is merged by the feature branch code corresponding to the selected feature branch; according to the received feature branch selection instruction, the selected candidate feature branch may be transferred to the integration
  • the zone is shown as a selected feature branch within the integration zone.
  • the branch selection instruction quickly selects the feature branch that you want to add from the area to be released, so as to quickly add the feature branch. Accordingly, when any of the alternate feature branches are transferred to the integration zone, the corresponding feature branch code can be automatically merged to the release branch code without the user having to manually process it.
  • a feature branch management interface of the publishing branch may be displayed, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used And displaying the candidate feature branch; wherein the release branch code is obtained by combining the feature branch code corresponding to the selected feature branch; according to the received feature branch removal instruction, at least one selected feature of the integrated region may be selected The branch is transferred to the to-be-released area to be displayed as an alternate feature branch in the to-be-released area.
  • the user can quickly and accurately determine the available feature branches (ie, the candidate feature branches) and the selected feature branches (ie, the selected feature branches) based on the visualized content, and pass the characteristics.
  • the branch removal instruction quickly selects the feature branch that is desired to be removed from the integration area to achieve rapid removal of the feature branch. Accordingly, when any of the selected feature branches are transferred to the to-be-released zone, the corresponding feature branch code can be automatically stripped from the release branch code without the user having to manually process it.
  • At least one candidate feature branch may be added to the feature branch management interface according to the received feature branch adding instruction to implement fast management of the area to be released.
  • At least one candidate feature branch may be deleted from the feature branch management interface according to the received feature branch deletion instruction to implement fast management of the area to be released.
  • the corresponding release branch code when the selected feature branch in the integrated area changes, for example, an increase or decrease of the selected feature branch occurs, the corresponding release branch code changes, and may be selected according to the change.
  • the feature branch generates a new instance whose code version is different from the historical code version of the historical instance.
  • "release branch code has changed” can be understood as the "change" operation of the release branch code, and whether there is a substantial difference between the release branch codes before and after the change, it is necessary to regenerate the new instance and its New code versions to ensure that all changes are traceable.
  • release branch code has changed can be understood as a substantial difference between the release branch code before and after the change; for example, after the user removes a feature branch from the integration area, it is added again to The integration area, as long as the feature branch itself has not changed, it can be considered that the release branch code does not have a substantial difference before and after the change.
  • At least one of the following adjustment operations may be implemented according to the received release branch adjustment instruction: combining the feature branch code corresponding to the at least one feature branch to the release branch code, and corresponding to the at least one feature branch
  • the feature branch code is stripped from the release branch code.
  • the issuing branch adjustment instruction may be combined with the feature branch management interface described above, and then the issuing branch adjustment instruction may be equivalent to the foregoing characteristic branch selection instruction, the characteristic branch removal instruction, etc., and may be used for the integration area,
  • the feature branch of the release area is managed to add or remove feature branches included in the release branch to implement fast management of the release branch.
  • the user may issue a release branch adjustment instruction through non-visualization or other forms to implement quick management of the release branch.
  • obtaining an adjusted release branch code obtained based on the release branch adjustment instruction generating a corresponding new instance according to the adjusted release branch code, where the code version of the new instance is different from the history code of the historical instance version.
  • the historical instance refers to the instance generated before the new instance, and the historical code version is the code version corresponding to the historical instance.
  • the release record information of the corresponding instance of each code version may be separately saved; after the first instance of the first code version is released to the online environment, if the first code version is received according to the received version a rollback instruction of the code version, which may search for the release record information corresponding to the second instance of the second code version; and then, according to the found release record information, determine that the second instance and the first instance are included
  • the difference between the feature branches, and the release branch code in the first instance is adjusted according to the difference to automatically roll back to the second instance.
  • the corresponding release record information can be obtained by specifying the code version, and the instance can be quickly and conveniently based on the release record information. Automatic rollback, avoiding manual intervention and preventing the release of error codes into the online environment.
  • At least one associated release pipeline corresponding to the issue pipeline may be determined, and a release branch of the instance is provided to the associated release pipeline to form and run a corresponding instance on the associated release pipeline
  • sharing of the publishing branches is implemented between multiple publishing pipelines without repeating the merge operation of the corresponding feature branches.
  • the publishing branch of the publishing pipeline After the publishing branch of the publishing pipeline is merged, it can be shared to the associated publishing pipeline.
  • the publishing branch can be shared to the associated publishing pipeline after the instance runs normally on the publishing pipeline and confirms that there is no problem with the publishing branch. .
  • FIG. 3 is a flowchart of a creation example provided by an exemplary embodiment; as shown in FIG. 3, the process of creating an instance may include the following steps:
  • step 302 branch integration is initiated.
  • the process of creating an instance can be understood as a branch integration operation, and the corresponding feature branch can be integrated within the release branch according to the new features that need to be added in the application X.
  • the branch integration operation can be used as a release phase of the release pipeline.
  • the publishing pipeline as an embodiment may include multiple publishing stages such as branch integration, construction, daily, formal, etc., corresponding to the visualized icon 40, the icon 41, the icon 42 and the icon 43 respectively.
  • the branch integration is in the first release stage in the embodiment shown in FIG. 4A according to the arrangement order between the icons 40-43; of course, the branch integration may also be located anywhere in the release pipeline, and is not limited to the first one. Release stage.
  • the branch integration operation may be an independent operation other than the release pipeline, and is different from the construction, daily, formal, and other release phases, but does not affect the implementation of the technical solution of the present specification; for ease of understanding, in this specification,
  • the branch integration operation is a release pipeline.
  • step 304 it is determined whether a release branch already exists; when it exists, the process proceeds to step 308, otherwise, the process proceeds to step 306.
  • step 306 a release branch is created.
  • the release branch after the release branch is created, it does not initially contain a feature branch, which is equivalent to only a "container" that adds a feature branch later; and for an existing release branch, one or more feature branches may already be included.
  • the release branch corresponds to the feature branch management interface 400, which includes an integration area 401 and a to-be-released area 402, and the integration area 401 and the to-be-released area 402 are used to separately manage the characteristics provided by the developer.
  • Step 308 merge the main code of the application X with the release branch.
  • the main code is merged with the release branch, and the main code is actually merged with the release branch code corresponding to the release branch, and the release branch code is merged by the feature branch code corresponding to the feature branch included in the release branch. get.
  • the release branch does not include the feature branch.
  • the merge branch code can be merged to form the release branch code.
  • the feature branch may be included. The feature branch code merges to get the release branch code.
  • a feature branch can be added to the release branch, involving steps 310A-318 described below.
  • Step 310A when it is necessary to add a feature branch, go to step 312A, otherwise go to step 320.
  • the new features that are desired to be released may be determined according to actual needs, and the feature branches corresponding to the new features are transferred from the to-be-released area 402 to the integrated area 401.
  • the feature branches 1 to 2 can be removed from the to-be-released area by, for example, dragging the icons 51 to 52 from the to-be-released area 402 to the integrated area 401.
  • 402 is transferred to the integration area 401 to form a state as shown in FIG. 4C.
  • step 312A the feature branch is merged into the release branch.
  • the characteristic branch code 1 of the characteristic branch 1 is merged into the issue branch; since the release branch does not previously contain the feature branch, thus the The release branch code consists of the feature branch code 1.
  • the characteristic branch code 2 of the characteristic branch 2 is merged to the issue branch; since the issue branch code is composed of the feature branch code 1, the feature branch needs to be branched Code 1 is merged with feature branch code 2 to get the updated release branch code.
  • the user only needs to focus on the features that need to be released, and transfer the corresponding feature branches from the to-be-released zone to the integrated zone, and the corresponding feature branch code can be automatically merged into the publishing branch without manual operation by the user. .
  • step 314 it is determined whether a code conflict has occurred; if a code conflict occurs, the process proceeds to step 316, otherwise, the process proceeds to step 318.
  • step 316 the user is prompted to resolve the code conflict.
  • the feature branch code when the feature branch code is merged into the release branch, existing code conflicts can be monitored and prompted by the user to resolve the code conflict as quickly as possible.
  • the feature branch code that causes the code conflict can be automatically stripped from the release branch code; for example, if the release branch already contains the feature branch 1, if a code conflict occurs when the feature branch 2 is merged into the release branch, the user can be At the same time, the feature branch code 2 corresponding to the feature branch 2 is automatically stripped from the release branch code, and the release branch code is restored to the uncombined feature branch code 2, without manual operation by the user.
  • step 318 the merge is completed.
  • the user may adjust the corresponding feature branch code and re-merge to the release branch; if there is still a code conflict, the user may continue to be prompted until there is no code conflict. , the corresponding feature branch and release branch can be smoothly merged. Of course, the user can also terminate the merging of related feature branches.
  • the user may further add more candidate feature branches by triggering the add option in the to-be-released area 402; and the user may transfer more feature branches from the to-be-released zone to the integrated zone, and then is transferred.
  • the feature branch to the integrated area can be merged with the advertised branch, and the process is the same as the above-mentioned feature branches 1 and 2, and details are not described herein again.
  • audit operations for the feature branch such as code review, security audit, etc.
  • code review, security audit, etc. may be triggered, and this specification does not limit this.
  • the corresponding audit result can be recorded in the snapshot corresponding to the feature branch.
  • the snapshot and the audit result it contains are valid for the feature branch; for example, assume The rule is defined as the feature branch added to the integration area 401 must pass the audit. If the audit result corresponding to the feature branch 1 is recorded in the snapshot 1 corresponding to the feature branch 1, and the audit result is approved, then the code of the feature branch 1 is used. No change can be added directly to the integration area 401 based on the audit result in the snapshot, without repeating the audit operation for the feature branch 1.
  • the feature branch can be removed from the release branch, involving steps 310B-312B described below.
  • Step 310B when it is necessary to remove the feature branch, go to step 312B, otherwise go to step 320.
  • step 312B the feature branch is stripped from the publishing branch.
  • the user may remove the previously added feature branch. For example, as shown in FIG. 4C, the user can drag the icons 51 to 52 from the integration area 401 to the to-be-released area 402, so that the characteristic branches 1 to 2 are removed from the distribution branch, and the corresponding characteristic branch codes 1 to 2 can also be used. It is automatically stripped from the release branch code to return to the situation as shown in FIG. 4B.
  • Step 320 When it is not necessary to add or remove a feature branch, create an instance according to the feature branch already included in the publishing branch, and generate a code version.
  • the user can trigger the completion of the branch integration operation, so that the application publishing system can generate an instance of the application X, the instance including the trunk code and the release branch code, wherein the branch is released
  • the code is obtained by combining the feature branch codes corresponding to all the feature branches finally included in the integration area 401.
  • the instance can be used to issue the corresponding new characteristics 1 to 2.
  • the application publishing system can generate new instances each time the user triggers the branch integration operation; in order to distinguish different instances and perform accurate traceability or related processing for each instance, a corresponding code version can be generated for each instance.
  • the code version of the example corresponding to FIG. 4C may be V-1.1.1.
  • FIG. 5 is a schematic diagram showing information related to an example of running a release phase provided by an exemplary embodiment; as shown in FIG. 5, when the above code version is an instance of V-1.1.1, the instance is running in the release phase.
  • the information presentation area corresponding to the "construction" of the release phase may include two parts: the first part is located in the icon 41, and is used to display the code version "V-1.1.1" of the running instance, and the second part includes FIG.
  • the feature branch display area 410 is shown to show that the feature branches included in the running instance are the feature branches 1 to 2, and are specifically presented as the icons 51 to 52 displayed in the feature branch display area 410. Therefore, based on the content shown in FIG. 5, the user can quickly and accurately determine that the release phase "builds" an instance of the running code version V-1.1.1, and the instance includes the feature branches 1-2.
  • FIG. 6 is a schematic diagram of creating a new instance according to an exemplary embodiment.
  • the user can merge the corresponding feature branch 3 to the release branch by dragging the icon 53 from the to-be-released area 402 to the integration area 401, which is the same as the above.
  • Steps 310A-318 are similar; further, when the user triggers the completion of the branch integration operation, the application publishing system may generate a new instance, and the release branch included in the instance is merged by the feature branches 1 to 3 finally included in the integration area 401 (ie, released)
  • the branch code is obtained by combining the feature branch codes 1 to 3).
  • the application publishing system can generate a corresponding code version for the new instance, for example, the code version of the new instance can be V-1.1.2.
  • FIG. 7 is a schematic diagram of related information respectively showing an example of running a plurality of publishing stages, according to an exemplary embodiment.
  • the release phase “build” completes the running of the instance with the code version V-1.1.1
  • the instance of the code version V-1.1.1 is transferred to the "release” phase of the subsequent release phase.
  • the above version of the code version V-1.1.2 is transferred to the "build” run of the release phase.
  • the information display area corresponding to the "build” in the release stage can display related information of the instance of the code version V-1.1.2, and the information corresponding to the "daily” in the release stage.
  • the display area shows information about instances of this code version V-1.1.1.
  • the information display area corresponding to the "construction" of the release stage includes an icon 41 and a characteristic branch display area 410 for displaying the code version "V-1.1.2” and the icons 51 to 53 corresponding to the characteristic branches 1 to 3, respectively;
  • the information display area corresponding to "Daily” includes an icon 42 and a characteristic branch display area 420 for respectively displaying the code versions "V-1.1.1” and the icons 51 to 52 corresponding to the characteristic branches 1 to 2.
  • the information display area corresponding to the publishing phase may be continuously displayed for the user to view; for example, in the embodiment shown in FIG. 5, the continuous display publishing phase is “built.
  • the corresponding icon 41 and the characteristic branch display area 410 and in the embodiment shown in FIG. 7, continue to display the icon 41 corresponding to the "construction" of the release phase and the feature branch display area 410, and the icon 42 corresponding to the "daily" release stage.
  • feature branch display area 420 In another embodiment, the user may select a release stage of interest and display only the information display area corresponding to the selected release stage. For example, FIG.
  • FIG. 8 is a schematic diagram showing related information of an instance running in a selected release phase provided by an exemplary embodiment; as shown in FIG. 8, it is assumed that the release phase "build” running code version is V-1.1.3.
  • the instance, the release phase "everyday” running code version is an instance of V-1.1.2, and the release phase "official” running code version is an instance of V-1.1.1.
  • the corresponding icon 43 can adopt a thick border as shown in FIG.
  • the feature branch display area 430 can be shown, and the corresponding icons 51-52 are displayed in the new branch display area 430 according to the feature branches 1 to 2 included in the example of the code version V-1.1.1.
  • FIG. 9 is a flowchart of an implementation of a rollback operation provided by an exemplary embodiment. As shown in FIG. 9, the implementation process of the rollback operation may include the following steps:
  • step 902 the release record is saved.
  • the application publishing system may generate corresponding release record information for each instance and record it in the release record described above.
  • step 904 the target version of the rollback is selected.
  • an instance of the code version V-1.1.3 is released to the online environment through the release pipeline, and it is found that a running exception occurs and needs to be rolled back to the instance where the exception has not occurred before.
  • the user can select an instance of the target version that is desired to be rolled back by querying the above-mentioned release record.
  • the target version may be V-1.1.1; for example, the user may trigger the code version to correspond to the instance of V-1.1.1.
  • the record information is published such that the release pipeline implements a rollback operation for the instance of the code version V-1.1.1.
  • step 906 the deployment package is rolled back to the target version.
  • the rollback operation may include two parts: a first part, rolling back a deployment package on the server, and rolling back the deployment package to the target version; and a second part, code update. In some cases it may only be necessary to implement deployment package rollback, while in other cases it may be necessary to implement code updates.
  • step 908 when it is necessary to update the code, the process proceeds to step 910, otherwise the rollback ends.
  • step 910 an instance corresponding to the target version is determined.
  • Step 912 implementing a code update.
  • the code of the instance of the code version V-1.1.1 may be directly obtained to implement the code update.
  • the instance corresponding to the target version when it is determined that the instance corresponding to the target version is an instance of the code version V-1.1.1, it may be based on an instance of the code version V-1.1.3 and an instance of the code version V-1.1.1. Differences, implement the corresponding code update. For example, assuming that the instance of code version V-1.1.1 contains feature branches 1 to 2, and the instance of code version V-1.1.3 contains feature branches 1 to 4, the code update process is equivalent to the code version V-1.1.3. In the example of the stripping characteristic branches 3 to 4, the characteristic branch codes 3 to 4 corresponding to the characteristic branches 3 to 4 are stripped from the issuing branch code of the example of the code version V-1.1.3, thereby being updated to the code version V-1.1. An example of .1.
  • FIG. 10 is a flowchart of sharing a publishing branch between multiple publishing pipelines according to an exemplary embodiment. As shown in FIG. 10, the process of sharing a publishing branch between multiple publishing pipelines may include the following steps:
  • step 1002 a release branch is created.
  • step 1004 the trunk code is merged with the release branch.
  • steps 1002-1004 are the same as steps 306-308 in the embodiment shown in FIG. 3, and details are not described herein again.
  • Step 1006 Import the release branch of the instance of the associated release pipeline.
  • the feature branches included in the release branch of the instance have been merged, and the feature branches have passed the audit, and there is no code conflict
  • another release pipeline it can share branches by sharing, so that it is not necessary to repeatedly perform auditing of feature branches, checking for code conflicts, and merging feature branch codes, etc., to improve publishing efficiency.
  • FIG. 11 is a schematic diagram of sharing a publishing branch between multiple publishing pipelines according to an exemplary embodiment.
  • a release pipeline corresponding to the application X includes a branch integration, construction, daily, formal, and the like release phases, which respectively correspond to the icons 1100 to 1103 shown in FIG.
  • an integration area 1111 and a to-be-released area 1112 are included.
  • the user can add a feature branch provided by the developer to the to-be-released area 1112 by triggering the add option in the to-be-released area 1112, and transfer the required feature branch to the integration area 1111, respectively, to complete the branch of the feature. Merger.
  • the release pipeline shown in FIG. 4C has created an instance of the code version V-1.1.1.
  • the release pipeline shown in FIG. 11 also wants to adopt the feature branches 1 to 2
  • the release branch of the instance whose code version is V-1.1.1 can be directly imported into the integration area by triggering the import option in the integration area 1111.
  • the corresponding release branch code is merged with the main code of the release pipeline shown in FIG. 11, without the need to merge the feature branch code 1, the feature branch code 2, and the code conflict.
  • step 1008 an instance is created and a code version is generated.
  • the issue pipeline shown in FIG. 4C in one case, after the release pipeline generation example shown in FIG. 4C, the release pipeline can be released at any time.
  • the branches are shared to the release pipeline shown in FIG. 11, so that the two release pipelines can be processed at least partially in parallel to improve the release efficiency; in another case, the branch share can be released after the release pipeline shown in FIG. 4C is completed. Go to the release pipeline shown in Figure 11.
  • FIG. 12 is a schematic structural diagram of an apparatus provided by an exemplary embodiment.
  • the device includes a processor 1202, an internal bus 1204, a network interface 1206, a memory 1208, and a non-volatile memory 1210, and of course may also include hardware required for other services.
  • the processor 1202 reads the corresponding computer program from the non-volatile memory 1210 into the memory 1208 and then operates to form an application publishing device at a logical level.
  • one or more embodiments of the present specification do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution body of the following processing flow is not limited to each.
  • a logical unit which can also be a hardware or logic device.
  • the application publishing apparatus may include:
  • the stage display unit 1301 displays multiple release stages of the application
  • the version display unit 1302 displays the code version of the instance in the information display area corresponding to the corresponding release stage according to the instance of the application that is respectively executed in each release stage.
  • it also includes:
  • the feature display unit 1303 displays the feature branches included in the release branch of the instance in the information display area corresponding to the corresponding release stage.
  • the example includes a trunk code of the application, a release branch code corresponding to the release branch, and the release branch code is obtained by combining the feature branch codes corresponding to the feature branch.
  • it also includes:
  • the interface display unit 1304 is configured to display a feature branch management interface of the publishing branch, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used for displaying An alternative feature branch; wherein the release branch code is obtained by combining the feature branch codes corresponding to the selected feature branches;
  • the feature branch selecting unit 130 transfers the selected candidate feature branch to the integrated area to be displayed as the selected feature branch in the integrated area.
  • it also includes:
  • the interface display unit 1304 is configured to display a feature branch management interface of the publishing branch, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used for displaying An alternative feature branch; wherein the release branch code is obtained by combining the feature branch codes corresponding to the selected feature branches;
  • the feature branch removal unit 1306, according to the received feature branch removal instruction, transfers at least one selected feature branch of the integration zone to the to-be-released zone to be displayed as an candidate feature branch in the to-be-released zone.
  • the feature branch adding unit 1307 adds at least one candidate feature branch to the feature branch management interface according to the received feature branch adding instruction
  • the feature branch deleting unit 1308 deletes at least one candidate feature branch from the feature branch management interface according to the received feature branch deletion instruction.
  • it also includes:
  • the first generating unit 1309 generates a new instance according to the changed selected characteristic branch when the selected characteristic branch in the integrated area changes, and the code version of the new instance is different from the historical code version of the historical instance.
  • it also includes:
  • the issue branch adjustment unit 1310 performs at least one of the following adjustment operations according to the received release branch adjustment instruction: combining the feature branch code corresponding to the at least one feature branch to the release branch code, and the feature corresponding to the at least one feature branch The branch code is stripped from the release branch code.
  • it also includes:
  • the obtaining unit 1311 is configured to obtain an adjusted post branch code obtained based on the issuing branch adjustment instruction
  • the second generating unit 1312 generates a corresponding new instance according to the adjusted post branch code, where the code version of the new instance is different from the historical code version of the historical instance.
  • it also includes:
  • the conflict detecting unit 1313 detects whether a code conflict occurs when the feature branch code of any feature branch is merged into the issuing branch code.
  • the conflict processing unit 1314 when a code conflict occurs, strips the characteristic branch code of any of the feature branches from the release branch code, and generates a corresponding conflict prompt to the preset user.
  • it also includes:
  • the information storage unit 1315 saves the release record information of the corresponding instance of each code version
  • the information searching unit 1316 after the first instance of the first code version is released to the online environment, searches for the second code according to the received rollback instruction from the first code version to the second code version. Release record information for the second instance of the version;
  • the difference determining unit 1317 determines, according to the found release record information, a difference between the second instance and the characteristic branch included in the first instance;
  • the code adjustment unit 1318 adjusts the release branch code in the first instance according to the difference to automatically roll back to the second instance.
  • it also includes:
  • the pipeline determining unit 1319 determines at least one associated publishing pipeline corresponding to the publishing pipeline to which the plurality of publishing stages belong;
  • a providing unit 1320 provides the publishing branch of the instance to the associated publishing pipeline to form and run a corresponding instance on the associated publishing pipeline.
  • it also includes:
  • the audit result recording unit 1321 acquires an audit result of the feature branch, and records the snapshot data corresponding to the feature branch;
  • the situation determining unit 1322 determines the audit status of the feature branch according to the audit result recorded in the corresponding snapshot data when the feature branch does not change.
  • the system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, and a game control.
  • a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read only memory
  • EEPROM electrically erasable programmable read only memory
  • flash memory or other memory technology
  • compact disk read only memory CD-ROM
  • DVD digital versatile disk
  • Magnetic cassette tape disk storage
  • quantum memory graphene-based storage media or other magnetic storage devices or any other non-transporting media
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • first, second, third, etc. may be used to describe various information in one or more embodiments of the specification, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • the first information may also be referred to as the second information without departing from the scope of one or more embodiments of the present disclosure.
  • the second information may also be referred to as the first information.
  • the word "if” as used herein may be interpreted as "when” or "when” or "in response to a determination.”

Abstract

An application publishing method and apparatus. Said method may comprise: displaying a plurality of publishing stages of an application (202); and displaying, in an information presentation region corresponding to the corresponding publishing stage, a code version of the example according to an example of the application respectively running in each publishing stage (204).

Description

应用发布方法及装置Application publishing method and device
本申请要求2018年3月9日递交的申请号为201810193470.2、发明名称为“应用发布方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 20110119347, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本说明书一个或多个实施例涉及终端技术领域,尤其涉及一种应用发布方法及装置。One or more embodiments of the present disclosure relate to the field of terminal technologies, and in particular, to an application publishing method and apparatus.
背景技术Background technique
在相关技术中,提出了发布流水线的处理思路,通过创建应用对应的发布流水线,可以将针对应用发布流程划分为串联的若干发布阶段,从而由各个发布阶段对该应用进行有序的构架、部署、测试等处理操作,有助于将应用快速、安全地部署到生产环境中。In the related art, a processing idea of a publishing pipeline is proposed. By creating a publishing pipeline corresponding to an application, the application publishing process can be divided into several publishing phases in series, so that the application is organized and deployed in an orderly manner by each publishing phase. Processing, testing, and other processing operations help to quickly and securely deploy applications to production environments.
发明内容Summary of the invention
有鉴于此,本说明书一个或多个实施例提供一种应用发布方法及装置。In view of this, one or more embodiments of the present specification provide an application publishing method and apparatus.
为实现上述目的,本说明书一个或多个实施例提供技术方案如下:To achieve the above object, one or more embodiments of the present specification provide the following technical solutions:
根据本说明书一个或多个实施例的第一方面,提出了一种应用发布方法,包括:According to a first aspect of one or more embodiments of the present specification, an application publishing method is provided, including:
展示应用的多个发布阶段;Show multiple release phases of the app;
根据各个发布阶段分别运行的所述应用的实例,将所述实例的代码版本展示于相应发布阶段对应的信息展示区域中。The code version of the instance is displayed in the information display area corresponding to the corresponding release stage according to the instance of the application that is respectively run in each release stage.
根据本说明书一个或多个实施例的第二方面,提出了一种应用发布装置,包括:According to a second aspect of one or more embodiments of the present specification, an application publishing apparatus is provided, including:
阶段展示单元,展示应用的多个发布阶段;A stage display unit that displays multiple release phases of the application;
版本展示单元,根据各个发布阶段分别运行的所述应用的实例,将所述实例的代码版本展示于相应发布阶段对应的信息展示区域中。The version display unit displays the code version of the instance in the information display area corresponding to the corresponding release stage according to the instance of the application respectively running in each release stage.
附图说明DRAWINGS
图1是一示例性实施例提供的一种应用发布系统的架构示意图。FIG. 1 is a schematic structural diagram of an application publishing system according to an exemplary embodiment.
图2是一示例性实施例提供的一种应用发布方法的流程图。FIG. 2 is a flowchart of an application publishing method provided by an exemplary embodiment.
图3是一示例性实施例提供的一种创建实例的流程图。FIG. 3 is a flow chart of a creation example provided by an exemplary embodiment.
图4A是一示例性实施例提供的一种通过特性分支管理界面实施特性分支管理的示意图。FIG. 4A is a schematic diagram of implementing feature branch management through a feature branch management interface according to an exemplary embodiment.
图4B是一示例性实施例提供的一种通过特性分支管理界面实施特性分支管理的示意图。FIG. 4B is a schematic diagram of implementing feature branch management through a feature branch management interface according to an exemplary embodiment.
图4C是一示例性实施例提供的一种通过特性分支管理界面实施特性分支管理的示意图。FIG. 4C is a schematic diagram of implementing feature branch management through a feature branch management interface according to an exemplary embodiment.
图5是一示例性实施例提供的一种展示发布阶段所运行实例的相关信息的示意图。FIG. 5 is a schematic diagram showing information related to an example of running a release phase provided by an exemplary embodiment.
图6是一示例性实施例提供的一种创建新实例的示意图。FIG. 6 is a schematic diagram of creating a new instance according to an exemplary embodiment.
图7是一示例性实施例提供的一种分别展示多个发布阶段所运行实例的相关信息的示意图。FIG. 7 is a schematic diagram of related information respectively showing an example of running a plurality of publishing stages, according to an exemplary embodiment.
图8是一示例性实施例提供的一种展示被选取的发布阶段所运行实例的相关信息的示意图。FIG. 8 is a schematic diagram of information related to an example of running a selected release phase provided by an exemplary embodiment.
图9是一示例性实施例提供的一种实现回滚操作的流程图。FIG. 9 is a flowchart of an implementation of a rollback operation provided by an exemplary embodiment.
图10是一示例性实施例提供的一种在多个发布流水线之间共享发布分支的流程图。FIG. 10 is a flowchart of sharing a publishing branch between multiple publishing pipelines according to an exemplary embodiment.
图11是一示例性实施例提供的一种在多个发布流水线之间共享发布分支的示意图。FIG. 11 is a schematic diagram of sharing a publishing branch between multiple publishing pipelines according to an exemplary embodiment.
图12是一示例性实施例提供的一种设备的结构示意图。FIG. 12 is a schematic structural diagram of an apparatus according to an exemplary embodiment.
图13是一示例性实施例提供的一种应用发布装置的框图。FIG. 13 is a block diagram of an application publishing apparatus according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. The following description refers to the same or similar elements in the different figures unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of the specification. Instead, they are merely examples of devices and methods consistent with aspects of one or more embodiments of the present specification as detailed in the appended claims.
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。It should be noted that the steps of the corresponding method are not necessarily performed in the order shown and described in the specification in other embodiments. In some other embodiments, the method may include more or fewer steps than those described herein. In addition, the individual steps described in this specification may be decomposed into multiple steps for description in other embodiments; while the multiple steps described in this specification may be combined into a single step in other embodiments. description.
在一实施例中,本说明书的应用发布方案可以应用于电子设备上,比如该电子设备可以包括手机、PC、平板设备、笔记本电脑、掌上电脑(PDAs,Personal Digital Assistants)、可穿戴设备(如智能眼镜、智能手表等)等,本说明书一个或多个实施例并不对此进行 限制。在运行过程中,该电子设备可以运行应用发布系统,以实现本说明书的应用发布方案。其中,应用发布系统的应用程序可以被预先安装在电子设备上,使得该应用发布系统可以在该电子设备上被启动并运行;当然,当采用诸如HTML5技术时,无需在电子设备上安装相应的应用程序,即可获得并运行该应用发布系统。In an embodiment, the application publishing solution of the present specification may be applied to an electronic device, such as a mobile phone, a PC, a tablet device, a notebook computer, a PDA (Personal Digital Assistants), and a wearable device (eg, Smart glasses, smart watches, etc., etc., one or more embodiments of the present specification are not limited thereto. During operation, the electronic device can run an application publishing system to implement the application publishing scheme of the present specification. Wherein, the application of the application publishing system can be pre-installed on the electronic device, so that the application publishing system can be started and run on the electronic device; of course, when adopting technologies such as HTML5, it is not necessary to install the corresponding device on the electronic device. The application can get and run the app publishing system.
在一实施例中,图1是一示例性实施例提供的一种应用发布系统的架构示意图。应用发布系统可以包括如图1所示的服务器11、网络12、若干电子设备,比如该电子设备可以包括PC13、PC14。其中,服务器11在运行过程中,可以运行应用发布系统的服务端侧的程序,以实现相关的处理等功能;而PC13、PC14在运行过程中,可以运行应用发布系统的客户端侧的程序,以实现相关的展示、人机交互等功能,从而在服务器11与PC13、PC14之间配合实现该应用发布系统。In an embodiment, FIG. 1 is a schematic structural diagram of an application publishing system provided by an exemplary embodiment. The application publishing system may include the server 11, the network 12, and several electronic devices as shown in FIG. 1, for example, the electronic device may include the PC 13, the PC 14. The server 11 can run the program on the server side of the application publishing system to implement related processing functions, and the PC 13 and the PC 14 can run the client side program of the application publishing system during the running process. In order to implement related functions such as display and human-computer interaction, the application publishing system is implemented between the server 11 and the PC 13 and the PC 14.
其中,服务器11可以为包含一独立主机的物理服务器,或者该服务器11可以为主机集群承载的虚拟服务器。电子设备除了上述的PC13、PC14之外,还可以包括下述其他类型的设备:手机、平板设备、笔记本电脑、掌上电脑(PDAs,Personal Digital Assistants)、可穿戴设备(如智能眼镜、智能手表等)等,本说明书一个或多个实施例并不对此进行限制。而对于PC13、PC14与服务器11之间进行交互的网络12,可以包括多种类型的有线或无线网络。在一实施例中,该网络12可以包括公共交换电话网络(Public Switched Telephone Network,PSTN)和因特网。需要指出的是:应用发布系统的客户端的应用程序可以被预先安装在电子设备上,使得该客户端可以在该电子设备上被启动并运行;当然,当采用诸如HTML5技术的在线“客户端”时,无需在电子设备上安装相应的应用程序,即可获得并运行该客户端。The server 11 may be a physical server including a separate host, or the server 11 may be a virtual server hosted by the host cluster. In addition to the PC13 and PC14 described above, the electronic device may include other types of devices as follows: mobile phones, tablet devices, notebook computers, personal digital assistants (PDAs), and wearable devices (such as smart glasses, smart watches, etc.). And the like, one or more embodiments of the present specification are not limited thereto. For the network 12 that interacts between the PC 13, the PC 14 and the server 11, various types of wired or wireless networks may be included. In an embodiment, the network 12 may include a Public Switched Telephone Network (PSTN) and the Internet. It should be noted that the client application of the application publishing system can be pre-installed on the electronic device so that the client can be launched and run on the electronic device; of course, when adopting an online "client" such as HTML5 technology. The client can be obtained and run without having to install the appropriate application on the electronic device.
图2是一示例性实施例提供的一种应用发布方法的流程图。如图2所示,该方法可以包括以下步骤:FIG. 2 is a flowchart of an application publishing method provided by an exemplary embodiment. As shown in FIG. 2, the method may include the following steps:
步骤202,展示应用的多个发布阶段。 Step 202, showing multiple release phases of the application.
在一实施例中,应用的多个发布阶段属于该应用对应的某一发布流水线。In an embodiment, multiple release phases of the application belong to a certain release pipeline corresponding to the application.
在一实施例中,应用对应的发布流水线可以配有对应的流水线管理员,并由该流水线管理员负责配置发布流水线包含的发布阶段。在其他实施例中,可以由其他身份的用户配置发布流水线的发布阶段,本说明书并不对此进行限制。In an embodiment, the corresponding release pipeline of the application may be provided with a corresponding pipeline administrator, and the pipeline administrator is responsible for configuring the release phase included in the release pipeline. In other embodiments, the release phase of the release pipeline can be configured by users of other identities, and this specification does not limit this.
在一实施例中,可以分别展示对应于各个发布阶段的可视化节点图标,将这些可视化节点图标按照相应发布阶段之间的运行顺序进行依次排列,并通过如箭头等图标对各个可视化节点图标进行依次连接,从而实现对该发布流水线包含的发布阶段的可视化展 示,可使各个角色的用户(如流水线管理员、应用的开发人员等)都能够清楚、明确地了解该发布流水线的运行状况。In an embodiment, the visualization node icons corresponding to the respective release stages may be respectively displayed, and the visualization node icons are sequentially arranged according to the running sequence between the respective release stages, and the icons of the respective visualization nodes are sequentially performed by icons such as arrows. The connection enables a visual representation of the release phase contained in the release pipeline, enabling users of each role (such as pipeline administrators, application developers, etc.) to clearly and clearly understand the health of the release pipeline.
在一实施例中,应用的实例并不一定从头至尾依次在所有的发布阶段运行,在一些情况下可以从某个中间位置的发布阶段开始或结束,在另一些情况下可以单独在某个发布阶段运行;流水线管理员或其他用户可以根据实际情况进行调整,本说明书并不对此进行限制。In an embodiment, the instances of the application do not necessarily run in all the release phases from beginning to end, in some cases from the release phase of an intermediate location, or in some cases alone. The release phase runs; the pipeline administrator or other users can adjust according to the actual situation, this specification does not limit this.
步骤204,根据各个发布阶段分别运行的所述应用的实例,将所述实例的代码版本展示于相应发布阶段对应的信息展示区域中。In step 204, the code version of the instance is displayed in the information display area corresponding to the corresponding release stage according to the instance of the application that is respectively run in each release stage.
在一实施例中,应用被加载至发布流水线运行时,基于该应用在该加载时刻的当时状况生成相应的实例(或称为运行实例),使得该实例在发布流水线上运行,而运行结果均用于反映应用在上述加载时刻的情况。而当应用在另一时刻被加载至发布流水线时,如果该应用的代码内容等与上述的加载时刻的当时状况存在差异,需要生成另一实例、将该另一实例运行于发布流水线;甚至,即便该应用的代码内容等与上述的加载时刻的当时状况不存在差异,比如只是针对该应用的重新运行,仍然可能需要重新生成实例、将该重新生成的实例运行于发布流水线。In an embodiment, when the application is loaded into the release pipeline, a corresponding instance (or a running instance) is generated based on the current situation of the application at the loading time, so that the instance runs on the publishing pipeline, and the running result is It is used to reflect the application at the above loading moment. When the application is loaded to the release pipeline at another time, if the code content of the application or the like is different from the current situation of the loading moment, another instance needs to be generated, and the other instance is run on the release pipeline; Even if the code content of the application does not differ from the current situation of the loading moment described above, such as only for the re-run of the application, it may still be necessary to regenerate the instance and run the regenerated instance on the publishing pipeline.
在一实施例中,应用的不同实例具有不同的代码版本,以用于准确区分不同实例。由于应用的实例依次在发布流水线的各个发布阶段运行,因而不同发布阶段可以运行不同代码版本的实例;比如,当发布流水线包括“第一阶段→第二阶段→第三阶段”时,在第一阶段完成了对实例1的运行后,可以由第二阶段继续运行该实例1,而第一阶段可以运行后续加载的实例2。因此,通过在发布阶段对应的信息展示区域展示所运行的实例的代码版本,可使用户清楚地了解各个发布阶段所运行的实例,明确各个实例的运行情况。In an embodiment, different instances of the application have different code versions for accurately distinguishing between different instances. Since the instances of the application are sequentially run in the various release phases of the release pipeline, different release phases can run instances of different code versions; for example, when the release pipeline includes "first phase→second phase→third phase", at first After the phase completes the operation of instance 1, the instance 1 can continue to be run by the second phase, and the first phase can run the subsequently loaded instance 2. Therefore, by displaying the code version of the running instance in the information display area corresponding to the release phase, the user can clearly understand the instances running in each release phase, and clarify the operation of each instance.
在一实施例中,可以将所述实例的发布分支所包含的特性分支展示于相应发布阶段对应的信息展示区域中。当应用包含所需发布的一个或多个新特性时,这些新特性具体表现为实例的发布分支所包含的特性分支。通过在发布阶段对应的信息展示区域展示所运行的实例包含的特性分支,并结合信息展示区域内示出的代码版本,可使用户清楚地了解各个代码版本的实例所包含的新特性,以便于根据实例的运行情况及时做出处理或调整,从而有助于提升应用发布效率。In an embodiment, the feature branches included in the publishing branch of the instance may be displayed in the information display area corresponding to the corresponding publishing stage. When an application contains one or more new features that are required to be published, these new features are represented by the feature branches contained in the release branch of the instance. By presenting the feature branches contained in the running instance in the information display area corresponding to the release phase, and combining the code versions shown in the information display area, the user can clearly understand the new features included in the instances of each code version, so as to facilitate The operation of the instance is processed or adjusted in time to help improve the efficiency of application publishing.
在一实施例中,信息展示区域可以为单一区域,代码版本与特性分支的信息等均展示于该单一区域内。在另一实施例中,信息展示区域可以为多个子区域的组合,比如第 一子区域用于展示代码版本、第二子区域用于展示特性分支的信息。In an embodiment, the information display area may be a single area, and the code version and the information of the feature branch are displayed in the single area. In another embodiment, the information presentation area may be a combination of a plurality of sub-areas, such as a first sub-area for presenting a code version and a second sub-area for displaying information of a characteristic branch.
在一实施例中,实例可以包括所述应用的主干代码、所述发布分支对应的发布分支代码。其中,主干代码对应于应用的主体功能,而发布分支由该应用的特性分支组合而成;相应地,发布分支代码由特性分支对应的特性分支代码合并得到。In an embodiment, an instance may include a trunk code of the application, and a release branch code corresponding to the release branch. The trunk code corresponds to the main function of the application, and the release branch is composed of the feature branches of the application; correspondingly, the release branch code is obtained by combining the feature branch codes corresponding to the feature branches.
在一实施例中,应用可以包括一个或多个新特性,该应用的实例中可以包含相应的一个或多个特性分支,这些特性分支的特性分支代码可由一个或多个开发人员提供,本说明书并不对此进行限制。In an embodiment, the application may include one or more new features, and the instance of the application may include a corresponding one or more feature branches, and the feature branch code of the feature branches may be provided by one or more developers. This is not a limitation.
在一实施例中,当实例包含多个特性分支时,可以由首个特性分支的特性分支代码构成最初的发布分支代码,然后依次将其他特性分支的特性分支代码合并至该发布分支代码中,最终得到完整的发布分支代码。其中,在合并每一特性分支的特性分支代码时,可以检测是否发生代码冲突;当发生代码冲突时,可以将相应的特性分支代码从发布分支代码中自动剥离,并向预设用户(如流水线管理员、相应的开发人员等)生成相应的冲突提示,以使相关人员对特性分支代码进行调整、解决冲突问题。In an embodiment, when the instance includes multiple feature branches, the initial release branch code may be formed by the feature branch code of the first feature branch, and then the feature branch code of the other feature branches is merged into the release branch code. The final release branch code is finally obtained. Wherein, when merging the feature branch code of each feature branch, it is possible to detect whether a code conflict occurs; when a code conflict occurs, the corresponding feature branch code can be automatically stripped from the release branch code and forwarded to a preset user (such as a pipeline) The administrator, the corresponding developer, etc.) generate corresponding conflict prompts, so that the relevant personnel can adjust the feature branch code and solve the conflict problem.
在一实施例中,当用户希望向应用中添加特性分支时,可以实施针对该特性分支的审核操作,以限制添加未通过审核的特性分支;当然,在一些情况下也可以允许添加未通过审核的特性分支,这取决于实际采用的管理策略,本说明书并不对此进行限制。审核操作可以为自动审核,也可以为审核人员实施的人工审核,本说明书并不对此进行限制。审核操作可以包括代码审核、安全审核等多种类型中至少之一,本说明书并不对此进行限制。审核操作可以针对特性分支的特性分支代码实施,也可以针对特性分支的提交者等其他信息而实施,本说明书并不对此进行限制。In an embodiment, when a user wishes to add a feature branch to an application, an audit operation for the feature branch may be implemented to restrict the addition of a feature branch that has not passed the audit; of course, in some cases, the addition may fail to be approved. The feature branch depends on the management strategy actually adopted, and this specification does not limit this. The audit operation can be an automatic audit or a manual audit performed by the auditor. This manual does not limit this. The audit operation may include at least one of a plurality of types such as code review and security audit, and this specification does not limit this. The auditing operation may be implemented for the feature branch code of the feature branch, or may be implemented for other information such as the submitter of the feature branch, and this specification does not limit this.
在一实施例中,可以获取对特性分支的审核结果,并记录至对应于所述特性分支的快照数据中;那么,当所述特性分支未发生变化时,可以根据相应的快照数据中记录的审核结果确定所述特性分支的审核情况,比如快照数据中记录为审核通过时、后续均认为该特性分支已通过审核而无需再次审核,而快照数据中记录为审核未通过时、后续均认为该特性分支未通过审核。当特性分支发生变化时,比如检测到针对相应的特性分支代码的编辑操作,可以删除原本对应的快照数据或者将原本对应的快照数据标记为不可信,使得必须针对变化后的特性分支重新实施审核。In an embodiment, the audit result of the feature branch may be obtained and recorded in the snapshot data corresponding to the feature branch; then, when the feature branch does not change, it may be recorded according to the corresponding snapshot data. The result of the audit determines the audit status of the feature branch. For example, when the snapshot data is recorded as the audit pass, and the subsequent view is that the feature branch has passed the audit without re-reviewing, and the snapshot data is recorded as the audit fails, the subsequent considers that The feature branch failed the approval. When the feature branch changes, for example, the editing operation for the corresponding feature branch code is detected, the original corresponding snapshot data may be deleted or the original corresponding snapshot data may be marked as untrusted, so that the audit must be re-implemented for the changed feature branch. .
在一实施例中,可以展示发布分支的特性分支管理界面,所述特性分支管理界面包括集成区和待发布区,所述集成区用于展示已选特性分支,所述待发布区用于展示备选特性分支;其中,所述发布分支代码由所述已选特性分支对应的特性分支代码合并得到; 根据收到的特性分支选取指令,可以将被选中的备选特性分支转移至所述集成区,以展示为所述集成区内的已选特性分支。换言之,通过向用户展示特性分支管理界面,使得用户可以基于可视化内容快速、准确地确定可用的特性分支(即备选特性分支)和已选用的特性分支(即已选特性分支),并通过特性分支选取指令从待发布区快速选取希望添加的特性分支,实现对特性分支的快速添加。相应地,当任一备选特性分支被转移至集成区时,相应的特性分支代码可以被自动合并至发布分支代码,而无需用户手动处理。In an embodiment, the feature branch management interface of the publishing branch may be displayed, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used for displaying An optional feature branch; wherein the release branch code is merged by the feature branch code corresponding to the selected feature branch; according to the received feature branch selection instruction, the selected candidate feature branch may be transferred to the integration The zone is shown as a selected feature branch within the integration zone. In other words, by presenting the feature branch management interface to the user, the user can quickly and accurately determine the available feature branches (ie, the candidate feature branches) and the selected feature branches (ie, the selected feature branches) based on the visualized content, and pass the characteristics. The branch selection instruction quickly selects the feature branch that you want to add from the area to be released, so as to quickly add the feature branch. Accordingly, when any of the alternate feature branches are transferred to the integration zone, the corresponding feature branch code can be automatically merged to the release branch code without the user having to manually process it.
在一实施例中,可以展示所述发布分支的特性分支管理界面,所述特性分支管理界面包括集成区和待发布区,所述集成区用于展示已选特性分支,所述待发布区用于展示备选特性分支;其中,所述发布分支代码由所述已选特性分支对应的特性分支代码合并得到;根据收到的特性分支去除指令,可以将所述集成区的至少一个已选特性分支转移至所述待发布区,以展示为所述待发布区内的备选特征分支。换言之,通过向用户展示特性分支管理界面,使得用户可以基于可视化内容快速、准确地确定可用的特性分支(即备选特性分支)和已选用的特性分支(即已选特性分支),并通过特性分支去除指令从集成区快速选取希望去除的特性分支,实现对特性分支的快速去除。相应地,当任一已选特性分支被转移至待发布区时,相应的特性分支代码可以被从发布分支代码中自动剥离,而无需用户手动处理。In an embodiment, a feature branch management interface of the publishing branch may be displayed, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used And displaying the candidate feature branch; wherein the release branch code is obtained by combining the feature branch code corresponding to the selected feature branch; according to the received feature branch removal instruction, at least one selected feature of the integrated region may be selected The branch is transferred to the to-be-released area to be displayed as an alternate feature branch in the to-be-released area. In other words, by presenting the feature branch management interface to the user, the user can quickly and accurately determine the available feature branches (ie, the candidate feature branches) and the selected feature branches (ie, the selected feature branches) based on the visualized content, and pass the characteristics. The branch removal instruction quickly selects the feature branch that is desired to be removed from the integration area to achieve rapid removal of the feature branch. Accordingly, when any of the selected feature branches are transferred to the to-be-released zone, the corresponding feature branch code can be automatically stripped from the release branch code without the user having to manually process it.
在一实施例中,可以根据收到的特性分支添加指令,向所述特性分支管理界面中添加至少一个备选特性分支,以实现对待发布区的快速管理。同时,便于进一步通过诸如上述的特性分支选取指令,将该备选特性分支转移为集成区中的已选特性分支。In an embodiment, at least one candidate feature branch may be added to the feature branch management interface according to the received feature branch adding instruction to implement fast management of the area to be released. At the same time, it is convenient to further transfer the candidate feature branch into the selected feature branch in the integration region by using a feature branch selection instruction such as the above.
在一实施例中,可以根据收到的特性分支删除指令,从所述特性分支管理界面中删除至少一个备选特性分支,以实现对待发布区的快速管理。In an embodiment, at least one candidate feature branch may be deleted from the feature branch management interface according to the received feature branch deletion instruction to implement fast management of the area to be released.
在一实施例中,当所述集成区内的已选特性分支发生变化时,比如发生了已选特性分支的增加或减少,使得相应的发布分支代码产生了变化,可以根据变化后的已选特性分支生成新实例,所述新实例的代码版本区别于历史实例的历史代码版本。一种情况下,“发布分支代码产生了变化”可以理解为发布分支代码出现了“变化”操作,而不论变化前后的发布分支代码之间是否存在实质性差异,均需要重新生成新实例及其新的代码版本,以确保所有变化均有迹可循。另一种情况下,“发布分支代码产生了变化”可以理解为变化前后的发布分支代码之间发生了实质性差异;例如,用户从集成区去除某一特性分支后,又重新将其添加至集成区,那么只要该特性分支本身未发生变化,即可认为发布分支代码在变化前后未发生实质性差异。In an embodiment, when the selected feature branch in the integrated area changes, for example, an increase or decrease of the selected feature branch occurs, the corresponding release branch code changes, and may be selected according to the change. The feature branch generates a new instance whose code version is different from the historical code version of the historical instance. In one case, "release branch code has changed" can be understood as the "change" operation of the release branch code, and whether there is a substantial difference between the release branch codes before and after the change, it is necessary to regenerate the new instance and its New code versions to ensure that all changes are traceable. In another case, "release branch code has changed" can be understood as a substantial difference between the release branch code before and after the change; for example, after the user removes a feature branch from the integration area, it is added again to The integration area, as long as the feature branch itself has not changed, it can be considered that the release branch code does not have a substantial difference before and after the change.
在一实施例中,可以根据收到的发布分支调整指令,实施下述调整操作中至少之一:向所述发布分支代码合并至少一个特性分支对应的特性分支代码,将至少一个特性分支对应的特性分支代码与所述发布分支代码剥离。在一种情况下,发布分支调整指令可与上述的特性分支管理界面相结合,那么发布分支调整指令可以相当于上述的特性分支选取指令、特性分支去除指令等,可以用于对集成区、待发布区的特性分支进行管理,以添加或去除发布分支所包含的特性分支,实现对发布分支的快捷管理。在另一种情况下,与上述的特性分支管理界面无关的,用户可以通过非可视化或其他形式发出发布分支调整指令,以实现对发布分支的快捷管理。In an embodiment, at least one of the following adjustment operations may be implemented according to the received release branch adjustment instruction: combining the feature branch code corresponding to the at least one feature branch to the release branch code, and corresponding to the at least one feature branch The feature branch code is stripped from the release branch code. In one case, the issuing branch adjustment instruction may be combined with the feature branch management interface described above, and then the issuing branch adjustment instruction may be equivalent to the foregoing characteristic branch selection instruction, the characteristic branch removal instruction, etc., and may be used for the integration area, The feature branch of the release area is managed to add or remove feature branches included in the release branch to implement fast management of the release branch. In another case, regardless of the feature branch management interface described above, the user may issue a release branch adjustment instruction through non-visualization or other forms to implement quick management of the release branch.
在一实施例中,获取基于所述发布分支调整指令得到的调整后发布分支代码;根据所述调整后发布分支代码生成相应的新实例,所述新实例的代码版本区别于历史实例的历史代码版本。历史实例是指该新实例之前生成的实例,历史代码版本为历史实例对应的代码版本,通过使得新实例的代码版本区别于历史代码版本,从而据此明确区分历史实例与新实例。In an embodiment, obtaining an adjusted release branch code obtained based on the release branch adjustment instruction; generating a corresponding new instance according to the adjusted release branch code, where the code version of the new instance is different from the history code of the historical instance version. The historical instance refers to the instance generated before the new instance, and the historical code version is the code version corresponding to the historical instance. By distinguishing the code version of the new instance from the historical code version, the historical instance and the new instance are clearly distinguished according to the definition.
在一实施例中,可以分别保存各个代码版本对应实例的发布记录信息;在第一代码版本的第一实例发布至线上环境后,如果根据收到的由所述第一代码版本向第二代码版本的回滚指令,可以查找对应于所述第二代码版本的第二实例的发布记录信息;然后,根据查找到的发布记录信息,确定所述第二实例与所述第一实例所包含的特性分支之间的差异,并根据所述差异对所述第一实例中的发布分支代码进行调整,以自动回滚为所述第二实例。因此,通过为每一实例生成相应的代码版本,并为各个代码版本的实例保存相应的发布记录信息,可以通过指定代码版本获取相应的发布记录信息,并基于发布记录信息对实例进行快速、便捷的自动回滚,避免人工干预,防止将错误代码发布到线上环境中。In an embodiment, the release record information of the corresponding instance of each code version may be separately saved; after the first instance of the first code version is released to the online environment, if the first code version is received according to the received version a rollback instruction of the code version, which may search for the release record information corresponding to the second instance of the second code version; and then, according to the found release record information, determine that the second instance and the first instance are included The difference between the feature branches, and the release branch code in the first instance is adjusted according to the difference to automatically roll back to the second instance. Therefore, by generating a corresponding code version for each instance and saving the corresponding release record information for each code version instance, the corresponding release record information can be obtained by specifying the code version, and the instance can be quickly and conveniently based on the release record information. Automatic rollback, avoiding manual intervention and preventing the release of error codes into the online environment.
在一实施例中,可以确定所述发布流水线对应的至少一个关联发布流水线,并将所述实例的发布分支提供至所述关联发布流水线,以在所述关联发布流水线上形成并运行相应的实例,从而在多个发布流水线之间实现对发布分支的共享,而无需重复对相应的特性分支进行合并操作。其中,可以在发布流水线上的发布分支合并完成后,就将其分享至关联发布流水线;或者,可以当实例在发布流水线上正常运行、确认发布分支没有问题之后,将发布分支分享至关联发布流水线。In an embodiment, at least one associated release pipeline corresponding to the issue pipeline may be determined, and a release branch of the instance is provided to the associated release pipeline to form and run a corresponding instance on the associated release pipeline Thus, sharing of the publishing branches is implemented between multiple publishing pipelines without repeating the merge operation of the corresponding feature branches. After the publishing branch of the publishing pipeline is merged, it can be shared to the associated publishing pipeline. Alternatively, the publishing branch can be shared to the associated publishing pipeline after the instance runs normally on the publishing pipeline and confirms that there is no problem with the publishing branch. .
为了便于理解,下面以针对应用的新特性进行发布的过程为例,对本说明书一个或多个实施例的技术方案进行说明。假定应用为应用X,在该应用X的更新开发与产品迭 代过程中,可能会出现需要扩展的新特性,可由相应的开发人员开发相应的特性分支,以实现对该应用X的更新。在得到更新后的应用X后,可以通过相应的发布流水线进行处理,以实现应用的持续交付。For ease of understanding, the technical solution of one or more embodiments of the present specification will be described below by taking a process of publishing a new feature for an application as an example. Assuming that the application is application X, in the process of update development and product iteration of the application X, new features that need to be expanded may occur, and corresponding feature branches may be developed by the corresponding developers to implement the update of the application X. After the updated application X is obtained, it can be processed through the corresponding release pipeline to achieve continuous delivery of the application.
通过发布流水线对应用X进行发布时,具体由发布流水线生成该应用X的实例,并由该发布流水线运行该实例。例如,图3是一示例性实施例提供的一种创建实例的流程图;如图3所示,该创建实例的过程可以包括以下步骤:When the application X is published by the release pipeline, an instance of the application X is specifically generated by the release pipeline, and the instance is run by the release pipeline. For example, FIG. 3 is a flowchart of a creation example provided by an exemplary embodiment; as shown in FIG. 3, the process of creating an instance may include the following steps:
步骤302,启动分支集成。In step 302, branch integration is initiated.
在一实施例中,创建实例的过程可以理解为分支集成操作,可以根据应用X中所需要增加的新特性,在发布分支内集成相应的特性分支。In an embodiment, the process of creating an instance can be understood as a branch integration operation, and the corresponding feature branch can be integrated within the release branch according to the new features that need to be added in the application X.
在一实施例中,分支集成操作可以作为发布流水线的一个发布阶段。例如图4A所示,作为一实施例的发布流水线可以包括分支集成、构建、日常、正式等多个发布阶段,分别对应于可视化的图标40、图标41、图标42和图标43等。其中,根据图标40~43之间的排列顺序,分支集成在图4A所示的实施例中属于首个发布阶段;当然,分支集成也可以位于发布流水线中的任意处,而并不限于首个发布阶段。在其他实施例中,分支集成操作可以作为发布流水线之外的独立操作,与构建、日常、正式等发布阶段相区别,但并不影响本说明书的技术方案的实施;为了便于理解,本说明书中暂以分支集成操作属于发布流水线为例进行说明。In an embodiment, the branch integration operation can be used as a release phase of the release pipeline. For example, as shown in FIG. 4A, the publishing pipeline as an embodiment may include multiple publishing stages such as branch integration, construction, daily, formal, etc., corresponding to the visualized icon 40, the icon 41, the icon 42 and the icon 43 respectively. The branch integration is in the first release stage in the embodiment shown in FIG. 4A according to the arrangement order between the icons 40-43; of course, the branch integration may also be located anywhere in the release pipeline, and is not limited to the first one. Release stage. In other embodiments, the branch integration operation may be an independent operation other than the release pipeline, and is different from the construction, daily, formal, and other release phases, but does not affect the implementation of the technical solution of the present specification; for ease of understanding, in this specification, For example, the branch integration operation is a release pipeline.
步骤304,判断是否已存在发布分支;当存在时,转入步骤308,否则转入步骤306。In step 304, it is determined whether a release branch already exists; when it exists, the process proceeds to step 308, otherwise, the process proceeds to step 306.
步骤306,创建发布分支。In step 306, a release branch is created.
在一实施例中,发布分支被创建后,初始时不包含特性分支,相当于仅作为后续添加特性分支的“容器”;而对于已存在的发布分支,可能已包含一个或多个特性分支。如图4A所示,发布分支对应于特性分支管理界面400,该特性分支管理界面400包括集成区401和待发布区402,该集成区401与待发布区402用于分别管理开发人员提供的特性分支;其中,集成区401与待发布区402均为空,用户可以通过触发待发布区402中的添加选项,以添加备选的特性分支。例如图4B所示,假定开发人员提供了特性分支1、特性分支2、特性分支3与特性分支4,分别对应于图4B所示的可视化的图标51、图标52、图标53与图标54,特性分支1~4最初均处于待发布区402、表现为图标51~54均展示于待发布区402中。In an embodiment, after the release branch is created, it does not initially contain a feature branch, which is equivalent to only a "container" that adds a feature branch later; and for an existing release branch, one or more feature branches may already be included. As shown in FIG. 4A, the release branch corresponds to the feature branch management interface 400, which includes an integration area 401 and a to-be-released area 402, and the integration area 401 and the to-be-released area 402 are used to separately manage the characteristics provided by the developer. A branch; wherein the integration area 401 and the to-be-released area 402 are both empty, and the user can add an optional feature branch by triggering an add option in the to-be-released area 402. For example, as shown in FIG. 4B, it is assumed that the developer provides the feature branch 1, the feature branch 2, the feature branch 3, and the feature branch 4, respectively corresponding to the visualized icon 51, icon 52, icon 53 and icon 54 shown in FIG. 4B. The branches 1 to 4 are initially in the to-be-released area 402, and the icons 51 to 54 are all displayed in the to-be-released area 402.
步骤308,将应用X的主干代码与发布分支合并。 Step 308, merge the main code of the application X with the release branch.
在一实施例中,将主干代码与发布分支合并,实际上是将主干代码与发布分支对应 的发布分支代码进行合并,而发布分支代码由发布分支所包含的特性分支对应的特性分支代码进行合并得到。当发布分支为新创建时,该发布分支尚未包含特性分支,可以通过后续步骤添加特性分支后,合并形成发布分支代码;而当发布分支事先已存在时,可能已包含特性分支,这些特性分支对应的特性分支代码合并得到发布分支代码。In an embodiment, the main code is merged with the release branch, and the main code is actually merged with the release branch code corresponding to the release branch, and the release branch code is merged by the feature branch code corresponding to the feature branch included in the release branch. get. When the release branch is newly created, the release branch does not include the feature branch. After the feature branch is added, the merge branch code can be merged to form the release branch code. When the release branch already exists, the feature branch may be included. The feature branch code merges to get the release branch code.
在一种场景中,可以向发布分支添加特性分支,涉及下述的步骤310A~318。In one scenario, a feature branch can be added to the release branch, involving steps 310A-318 described below.
步骤310A,当需要添加特性分支时,转入步骤312A,否则转入步骤320。Step 310A, when it is necessary to add a feature branch, go to step 312A, otherwise go to step 320.
在一实施例中,可以根据实际需求确定出希望发布的新特性,并将这些新特性对应的特性分支从待发布区402转移至集成区401。例如,当希望发布的新特性对应于特性分支1~2时,可以通过诸如将图标51~52从待发布区402拖拽至集成区401等方式,可以将特性分支1~2从待发布区402转移至集成区401,从而形成如图4C所示的状态。In an embodiment, the new features that are desired to be released may be determined according to actual needs, and the feature branches corresponding to the new features are transferred from the to-be-released area 402 to the integrated area 401. For example, when the new feature that is desired to be released corresponds to the feature branches 1 to 2, the feature branches 1 to 2 can be removed from the to-be-released area by, for example, dragging the icons 51 to 52 from the to-be-released area 402 to the integrated area 401. 402 is transferred to the integration area 401 to form a state as shown in FIG. 4C.
步骤312A,将特性分支合并至发布分支。In step 312A, the feature branch is merged into the release branch.
在一实施例中,当特性分支1从待发布区402转移至集成区401时,特性分支1的特性分支代码1被合并至发布分支;由于发布分支此前并未包含特性分支,因而此时的发布分支代码由该特性分支代码1构成。进一步地,当特性分支2从待发布区402转移至集成区401时,特性分支2的特性分支代码2被合并至发布分支;由于发布分支代码由该特性分支代码1构成,因而需要将特性分支代码1与特性分支代码2进行合并,得到更新后的发布分支代码。In an embodiment, when the feature branch 1 is transferred from the to-be-released area 402 to the integration area 401, the characteristic branch code 1 of the characteristic branch 1 is merged into the issue branch; since the release branch does not previously contain the feature branch, thus the The release branch code consists of the feature branch code 1. Further, when the feature branch 2 is transferred from the to-be-released area 402 to the integration area 401, the characteristic branch code 2 of the characteristic branch 2 is merged to the issue branch; since the issue branch code is composed of the feature branch code 1, the feature branch needs to be branched Code 1 is merged with feature branch code 2 to get the updated release branch code.
在一实施例中,用户只需要关注于所需要发布的特性,并将相应的特性分支从待发布区转移至集成区,而相应的特性分支代码可以被自动合并至发布分支,无需用户手动操作。In an embodiment, the user only needs to focus on the features that need to be released, and transfer the corresponding feature branches from the to-be-released zone to the integrated zone, and the corresponding feature branch code can be automatically merged into the publishing branch without manual operation by the user. .
步骤314,判断是否发生代码冲突;如果发生代码冲突,转入步骤316,否则转入步骤318。In step 314, it is determined whether a code conflict has occurred; if a code conflict occurs, the process proceeds to step 316, otherwise, the process proceeds to step 318.
步骤316,提示用户解决代码冲突。In step 316, the user is prompted to resolve the code conflict.
在一实施例中,在特性分支代码合并至发布分支时,可以监控存在的代码冲突,并通过向用户发出提示,以便于用户尽快解决代码冲突。同时,导致发生代码冲突的特性分支代码可以从发布分支代码中被自动剥离;比如发布分支已包含特性分支1的情况下,如果在将特性分支2合并至发布分支时发生代码冲突,可以向用户提示的同时,自动将特性分支2对应的特性分支代码2从发布分支代码中剥离,使发布分支代码恢复至未合并特性分支代码2的状况,无需用户手动操作。In an embodiment, when the feature branch code is merged into the release branch, existing code conflicts can be monitored and prompted by the user to resolve the code conflict as quickly as possible. At the same time, the feature branch code that causes the code conflict can be automatically stripped from the release branch code; for example, if the release branch already contains the feature branch 1, if a code conflict occurs when the feature branch 2 is merged into the release branch, the user can be At the same time, the feature branch code 2 corresponding to the feature branch 2 is automatically stripped from the release branch code, and the release branch code is restored to the uncombined feature branch code 2, without manual operation by the user.
步骤318,完成合并。In step 318, the merge is completed.
在一实施例中,用户收到代码冲突的提示后,可能对相应的特性分支代码进行调整,并重新合并至发布分支;如果仍然存在代码冲突,可以继续向用户提示,直至最终不存在代码冲突,可以对相应的特性分支与发布分支顺利实施合并。当然,用户也可以终止对相关特性分支的合并。In an embodiment, after receiving the prompt of the code conflict, the user may adjust the corresponding feature branch code and re-merge to the release branch; if there is still a code conflict, the user may continue to be prompted until there is no code conflict. , the corresponding feature branch and release branch can be smoothly merged. Of course, the user can also terminate the merging of related feature branches.
在一实施例中,用户可以进一步通过触发待发布区402中的添加选项,添加更多备选的特性分支;以及,用户可以从待发布区向集成区转移更多的特性分支,则被转移至集成区的特性分支可以与发布分支进行合并,其过程与上述的特性分支1~2相同,此处不再赘述。In an embodiment, the user may further add more candidate feature branches by triggering the add option in the to-be-released area 402; and the user may transfer more feature branches from the to-be-released zone to the integrated zone, and then is transferred. The feature branch to the integrated area can be merged with the advertised branch, and the process is the same as the above-mentioned feature branches 1 and 2, and details are not described herein again.
需要指出的是:It should be noted that:
每一特性分支被添加至待发布区402或集成区401时,可以触发针对该特性分支的审核操作,比如代码审核、安全审核等,本说明书并不对此进行限制。在审核完成后,可以在对应于该特性分支的快照中记录相应的审核结果,那么只要该特性分支的代码未发生变化,该快照及其包含的审核结果均对该特性分支有效;例如,假定规则定义为添加至集成区401的特性分支必须通过审核,如果特性分支1对应的快照1中记录有该特性分支1对应的审核结果,且审核结果为通过审核,那么只要该特性分支1的代码未发生变化,均可以基于该快照中的审核结果而直接被添加至集成区401,而无需重复针对该特性分支1实施审核操作。When each feature branch is added to the to-be-released area 402 or the integrated area 401, audit operations for the feature branch, such as code review, security audit, etc., may be triggered, and this specification does not limit this. After the audit is completed, the corresponding audit result can be recorded in the snapshot corresponding to the feature branch. As long as the code of the feature branch has not changed, the snapshot and the audit result it contains are valid for the feature branch; for example, assume The rule is defined as the feature branch added to the integration area 401 must pass the audit. If the audit result corresponding to the feature branch 1 is recorded in the snapshot 1 corresponding to the feature branch 1, and the audit result is approved, then the code of the feature branch 1 is used. No change can be added directly to the integration area 401 based on the audit result in the snapshot, without repeating the audit operation for the feature branch 1.
在一种场景中,可以从发布分支中去除特性分支,涉及下述的步骤310B~312B。In one scenario, the feature branch can be removed from the release branch, involving steps 310B-312B described below.
步骤310B,当需要去除特性分支时,转入步骤312B,否则转入步骤320。 Step 310B, when it is necessary to remove the feature branch, go to step 312B, otherwise go to step 320.
步骤312B,将特性分支从发布分支剥离。In step 312B, the feature branch is stripped from the publishing branch.
在一实施例中,除了添加特性分支之外,用户可以去除先前添加的特性分支。例如图4C所示,用户可以通过诸如将图标51~52从集成区401拖拽至待发布区402,使得特性分支1~2从发布分支中去除,而相应的特性分支代码1~2也可以被自动从发布分支代码中剥离,从而恢复至如图4B所示的状况。In an embodiment, in addition to adding a feature branch, the user may remove the previously added feature branch. For example, as shown in FIG. 4C, the user can drag the icons 51 to 52 from the integration area 401 to the to-be-released area 402, so that the characteristic branches 1 to 2 are removed from the distribution branch, and the corresponding characteristic branch codes 1 to 2 can also be used. It is automatically stripped from the release branch code to return to the situation as shown in FIG. 4B.
步骤320,当不需要添加或去除特性分支时,根据发布分支内已包含的特性分支创建实例,并生成代码版本。Step 320: When it is not necessary to add or remove a feature branch, create an instance according to the feature branch already included in the publishing branch, and generate a code version.
在一实施例中,在完成对特性分支的添加或去除后,用户可以触发完成分支集成操作,使得应用发布系统可以生成该应用X的实例,该实例包含主干代码和发布分支代码,其中发布分支代码由集成区401最终包含的所有特性分支对应的特性分支代码进行合并得到。In an embodiment, after the addition or removal of the feature branch is completed, the user can trigger the completion of the branch integration operation, so that the application publishing system can generate an instance of the application X, the instance including the trunk code and the release branch code, wherein the branch is released The code is obtained by combining the feature branch codes corresponding to all the feature branches finally included in the integration area 401.
举例而言,假定分支集成操作完成时处于如图4C所示的状态,由于集成区401包含如图4C所示的特性分支1~2,因而该实例可用于发布相应的新特性1~2。在用户每次触发完成分支集成操作时,应用发布系统均可以生成新的实例;为了区分不同实例,并针对每一实例进行准确的追溯或相关处理,可以为每一实例生成相应的代码版本,例如图4C对应的实例的代码版本可以为V-1.1.1。For example, assuming that the branch integration operation is completed in the state shown in FIG. 4C, since the integration area 401 includes the characteristic branches 1 to 2 as shown in FIG. 4C, the instance can be used to issue the corresponding new characteristics 1 to 2. The application publishing system can generate new instances each time the user triggers the branch integration operation; in order to distinguish different instances and perform accurate traceability or related processing for each instance, a corresponding code version can be generated for each instance. For example, the code version of the example corresponding to FIG. 4C may be V-1.1.1.
当分支集成阶段完成后,应用发布系统生成的实例可以依次转入后续的发布阶段进行处理。为了便于用户确定各个发布阶段所运行的实例及其相关信息,可以在每一发布阶段对应的信息展示区域内,示出该发布阶段所运行的实例的相关信息。例如,图5是一示例性实施例提供的一种展示发布阶段所运行实例的相关信息的示意图;如图5所示,当上述代码版本为V-1.1.1的实例运行于发布阶段“构建”时,该发布阶段“构建”对应的信息展示区域可以包括两个部分:第一部分位于图标41内,用于展示所运行实例的代码版本“V-1.1.1”,第二部分包括图5所示的特性分支展示区域410,用于展示所运行实例包含的特性分支为特性分支1~2,并具体呈现为特性分支展示区域410内展示的图标51~52。因此,基于图5所示的内容,用户可以快速、准确地确定发布阶段“构建”正在运行代码版本为V-1.1.1的实例,且该实例包含特性分支1~2。After the branch integration phase is completed, the instance generated by the application publishing system can be transferred to the subsequent release phase for processing. In order to facilitate the user to determine the instance and related information that is run in each release phase, related information of the instance running in the release phase may be displayed in the information display area corresponding to each release phase. For example, FIG. 5 is a schematic diagram showing information related to an example of running a release phase provided by an exemplary embodiment; as shown in FIG. 5, when the above code version is an instance of V-1.1.1, the instance is running in the release phase. The information presentation area corresponding to the "construction" of the release phase may include two parts: the first part is located in the icon 41, and is used to display the code version "V-1.1.1" of the running instance, and the second part includes FIG. The feature branch display area 410 is shown to show that the feature branches included in the running instance are the feature branches 1 to 2, and are specifically presented as the icons 51 to 52 displayed in the feature branch display area 410. Therefore, based on the content shown in FIG. 5, the user can quickly and accurately determine that the release phase "builds" an instance of the running code version V-1.1.1, and the instance includes the feature branches 1-2.
图6是一示例性实施例提供的一种创建新实例的示意图。如图6所示,假定在图4C所示实施例的基础上,用户通过将图标53从待发布区402拖拽至集成区401,可使相应的特性分支3合并至发布分支,这与上述的步骤310A~318类似;进一步地,当用户触发完成分支集成操作时,应用发布系统可以生成新实例,该实例包含的发布分支由集成区401最终包含的特性分支1~3合并得到(即发布分支代码由特性分支代码1~3合并得到)。同时,应用发布系统可以为新实例生成相应的代码版本,例如该新实例的代码版本可以为V-1.1.2。FIG. 6 is a schematic diagram of creating a new instance according to an exemplary embodiment. As shown in FIG. 6, it is assumed that on the basis of the embodiment shown in FIG. 4C, the user can merge the corresponding feature branch 3 to the release branch by dragging the icon 53 from the to-be-released area 402 to the integration area 401, which is the same as the above. Steps 310A-318 are similar; further, when the user triggers the completion of the branch integration operation, the application publishing system may generate a new instance, and the release branch included in the instance is merged by the feature branches 1 to 3 finally included in the integration area 401 (ie, released) The branch code is obtained by combining the feature branch codes 1 to 3). At the same time, the application publishing system can generate a corresponding code version for the new instance, for example, the code version of the new instance can be V-1.1.2.
图7是一示例性实施例提供的一种分别展示多个发布阶段所运行实例的相关信息的示意图。如图7所示,假定发布阶段“构建”对代码版本为V-1.1.1的实例完成运行后,将该代码版本为V-1.1.1的实例交由后续的发布阶段“日常”运行,而上述代码版本为V-1.1.2的实例转入该发布阶段“构建”运行。那么,与图5所示实施例相类似的,可以在发布阶段“构建”对应的信息展示区域展示该代码版本为V-1.1.2的实例的相关信息、在发布阶段“日常”对应的信息展示区域展示该代码版本为V-1.1.1的实例的相关信息。其中,发布阶段“构建”对应的信息展示区域包括图标41和特性分支展示区域410,分别用于展示代码版本“V-1.1.2”与特性分支1~3对应的图标51~53;发布阶段“日常” 对应的信息展示区域包括图标42和特性分支展示区域420,分别用于展示代码版本“V-1.1.1”与特性分支1~2对应的图标51~52。FIG. 7 is a schematic diagram of related information respectively showing an example of running a plurality of publishing stages, according to an exemplary embodiment. As shown in FIG. 7, after the release phase "build" completes the running of the instance with the code version V-1.1.1, the instance of the code version V-1.1.1 is transferred to the "release" phase of the subsequent release phase. The above version of the code version V-1.1.2 is transferred to the "build" run of the release phase. Then, similar to the embodiment shown in FIG. 5, the information display area corresponding to the "build" in the release stage can display related information of the instance of the code version V-1.1.2, and the information corresponding to the "daily" in the release stage. The display area shows information about instances of this code version V-1.1.1. The information display area corresponding to the "construction" of the release stage includes an icon 41 and a characteristic branch display area 410 for displaying the code version "V-1.1.2" and the icons 51 to 53 corresponding to the characteristic branches 1 to 3, respectively; The information display area corresponding to "Daily" includes an icon 42 and a characteristic branch display area 420 for respectively displaying the code versions "V-1.1.1" and the icons 51 to 52 corresponding to the characteristic branches 1 to 2.
在一实施例中,当发布阶段存在正运行的实例时,该发布阶段对应的信息展示区域可以持续展示,以供用户查看;比如在图5所示的实施例中,持续展示发布阶段“构建”对应的图标41和特性分支展示区域410,以及在图7所示的实施例中,持续展示发布阶段“构建”对应的图标41和特性分支展示区域410、发布阶段“日常”对应的图标42和特性分支展示区域420。而在另一实施例中,可由用户选取关注的发布阶段,并仅示出被选取的发布阶段对应的信息展示区域。例如,图8是一示例性实施例提供的一种展示被选取的发布阶段所运行实例的相关信息的示意图;如图8所示,假定发布阶段“构建”运行代码版本为V-1.1.3的实例、发布阶段“日常”运行代码版本为V-1.1.2的实例、发布阶段“正式”运行代码版本为V-1.1.1的实例。当用户选取发布阶段“正式”时,相应的图标43可以采用如图8所示的粗边框、以区分于采用细边框的图标40~42等,以表明发布阶段“正式”被用户选取;相应地,可以示出特性分支展示区域430,并根据代码版本为V-1.1.1的实例包含的特性分支1~2,将相应的图标51~52展示于该特新分支展示区域430中。In an embodiment, when there is a running instance in the publishing phase, the information display area corresponding to the publishing phase may be continuously displayed for the user to view; for example, in the embodiment shown in FIG. 5, the continuous display publishing phase is “built. The corresponding icon 41 and the characteristic branch display area 410, and in the embodiment shown in FIG. 7, continue to display the icon 41 corresponding to the "construction" of the release phase and the feature branch display area 410, and the icon 42 corresponding to the "daily" release stage. And feature branch display area 420. In another embodiment, the user may select a release stage of interest and display only the information display area corresponding to the selected release stage. For example, FIG. 8 is a schematic diagram showing related information of an instance running in a selected release phase provided by an exemplary embodiment; as shown in FIG. 8, it is assumed that the release phase "build" running code version is V-1.1.3. The instance, the release phase "everyday" running code version is an instance of V-1.1.2, and the release phase "official" running code version is an instance of V-1.1.1. When the user selects the publishing stage "official", the corresponding icon 43 can adopt a thick border as shown in FIG. 8 to distinguish between the icons 40 to 42 using the thin border, etc., to indicate that the publishing stage is "formally" selected by the user; The feature branch display area 430 can be shown, and the corresponding icons 51-52 are displayed in the new branch display area 430 according to the feature branches 1 to 2 included in the example of the code version V-1.1.1.
图9是一示例性实施例提供的一种实现回滚操作的流程图。如图9所示,回滚操作的实现流程可以包括以下步骤:FIG. 9 is a flowchart of an implementation of a rollback operation provided by an exemplary embodiment. As shown in FIG. 9, the implementation process of the rollback operation may include the following steps:
步骤902,保存发布记录。In step 902, the release record is saved.
在一实施例中,在实例运行于发布流水线时,应用发布系统可以为每一实例生成相应的发布记录信息,并记录于上述的发布记录中。In an embodiment, when the instance runs on the release pipeline, the application publishing system may generate corresponding release record information for each instance and record it in the release record described above.
步骤904,选择回滚的目标版本。In step 904, the target version of the rollback is selected.
在一实施例中,假定代码版本为V-1.1.3的实例通过发布流水线发布至线上环境后,发现出现了运行异常,需要回滚至先前未出现异常的实例。用户可以通过查询上述的发布记录,选择希望作为回滚的目标版本的实例,比如该目标版本可以为V-1.1.1;例如,用户可以通过触发代码版本为V-1.1.1的实例对应的发布记录信息,使得发布流水线实施针对该代码版本为V-1.1.1的实例的回滚操作。In an embodiment, it is assumed that an instance of the code version V-1.1.3 is released to the online environment through the release pipeline, and it is found that a running exception occurs and needs to be rolled back to the instance where the exception has not occurred before. The user can select an instance of the target version that is desired to be rolled back by querying the above-mentioned release record. For example, the target version may be V-1.1.1; for example, the user may trigger the code version to correspond to the instance of V-1.1.1. The record information is published such that the release pipeline implements a rollback operation for the instance of the code version V-1.1.1.
步骤906,将部署包回滚至目标版本。In step 906, the deployment package is rolled back to the target version.
在一实施例中,回滚操作可以包括两个部分:第一部分,对服务器上的部署包进行回滚,将部署包回滚至目标版本;第二部分,代码更新。在一些情况下可能只需要实施部署包回滚,而在另一些情况下可能还需要实施代码更新。In an embodiment, the rollback operation may include two parts: a first part, rolling back a deployment package on the server, and rolling back the deployment package to the target version; and a second part, code update. In some cases it may only be necessary to implement deployment package rollback, while in other cases it may be necessary to implement code updates.
步骤908,当需要更新代码时,转入步骤910,否则回滚结束。In step 908, when it is necessary to update the code, the process proceeds to step 910, otherwise the rollback ends.
步骤910,确定目标版本对应的实例。In step 910, an instance corresponding to the target version is determined.
步骤912,实施代码更新。 Step 912, implementing a code update.
在一实施例中,在确定目标版本对应的实例是代码版本V-1.1.1的实例时,可以直接获取该代码版本V-1.1.1的实例的代码,以实施代码更新。In an embodiment, when it is determined that the instance corresponding to the target version is an instance of the code version V-1.1.1, the code of the instance of the code version V-1.1.1 may be directly obtained to implement the code update.
在一实施例中,在确定目标版本对应的实例是代码版本V-1.1.1的实例时,可以根据代码版本V-1.1.3的实例与该代码版本V-1.1.1的实例之间的差异,实施相应的代码更新。例如,假定代码版本V-1.1.1的实例包含特性分支1~2,而代码版本V-1.1.3的实例包含特性分支1~4,那么代码更新过程相当于从代码版本V-1.1.3的实例中剥离特性分支3~4,即从该代码版本V-1.1.3的实例的发布分支代码中剥离特性分支3~4对应的特性分支代码3~4,从而更新为代码版本V-1.1.1的实例。In an embodiment, when it is determined that the instance corresponding to the target version is an instance of the code version V-1.1.1, it may be based on an instance of the code version V-1.1.3 and an instance of the code version V-1.1.1. Differences, implement the corresponding code update. For example, assuming that the instance of code version V-1.1.1 contains feature branches 1 to 2, and the instance of code version V-1.1.3 contains feature branches 1 to 4, the code update process is equivalent to the code version V-1.1.3. In the example of the stripping characteristic branches 3 to 4, the characteristic branch codes 3 to 4 corresponding to the characteristic branches 3 to 4 are stripped from the issuing branch code of the example of the code version V-1.1.3, thereby being updated to the code version V-1.1. An example of .1.
图10是一示例性实施例提供的一种在多个发布流水线之间共享发布分支的流程图。如图10所示,在多个发布流水线之间共享发布分支的过程可以包括以下步骤:FIG. 10 is a flowchart of sharing a publishing branch between multiple publishing pipelines according to an exemplary embodiment. As shown in FIG. 10, the process of sharing a publishing branch between multiple publishing pipelines may include the following steps:
步骤1002,创建发布分支。In step 1002, a release branch is created.
步骤1004,将主干代码与发布分支合并。In step 1004, the trunk code is merged with the release branch.
在一实施例中,步骤1002-1004与图3所示实施例中的步骤306-308相同,此处不再赘述。In an embodiment, steps 1002-1004 are the same as steps 306-308 in the embodiment shown in FIG. 3, and details are not described herein again.
步骤1006,导入关联发布流水线的实例的发布分支。Step 1006: Import the release branch of the instance of the associated release pipeline.
在一实施例中,当某一发布流水线上已经生成了实例,那么该实例的发布分支所包含的特性分支已经完成了合并,并且这些特性分支已经分别通过了审核,且不存在代码冲突,那么当另一发布流水线同样需要使用这些特性分支时,可以通过共享发布分支,从而无需重复实施对特性分支的审核、对代码冲突的检验、对特性分支代码的合并等操作,可以提升发布效率。In an embodiment, when an instance has been generated on a release pipeline, the feature branches included in the release branch of the instance have been merged, and the feature branches have passed the audit, and there is no code conflict, then When another release pipeline also needs to use these feature branches, it can share branches by sharing, so that it is not necessary to repeatedly perform auditing of feature branches, checking for code conflicts, and merging feature branch codes, etc., to improve publishing efficiency.
例如,图11是一示例性实施例提供的一种在多个发布流水线之间共享发布分支的示意图。假定应用X对应的一条发布流水线包括分支集成、构建、日常、正式等发布阶段,分别对应于图11所示的图标1100~1103。在分支集成操作对应的特性分支管理界面111中,包括集成区1111和待发布区1112。在一种情况下,用户可以通过触发待发布区1112中的添加选项,向待发布区1112添加开发人员提供的特性分支,并将需要的特性分支分别转移至集成区1111,完成对这些特性分支的合并。在另一种情况下,假定图11所示的发布流水线与图4C所示的发布流水线之间存在关联关系;在图4C所示的发布流水线 已经创建了代码版本为V-1.1.1的实例后,如果图11所示的发布流水线也希望采用特性分支1~2,那么可以通过触发集成区1111中的导入选项,直接将该代码版本为V-1.1.1的实例的发布分支导入集成区1111,使得相应的发布分支代码与图11所示发布流水线上的主干代码实现合并,而无需依次合并特性分支代码1、特性分支代码2,也无需考虑代码冲突等问题。For example, FIG. 11 is a schematic diagram of sharing a publishing branch between multiple publishing pipelines according to an exemplary embodiment. It is assumed that a release pipeline corresponding to the application X includes a branch integration, construction, daily, formal, and the like release phases, which respectively correspond to the icons 1100 to 1103 shown in FIG. In the feature branch management interface 111 corresponding to the branch integration operation, an integration area 1111 and a to-be-released area 1112 are included. In one case, the user can add a feature branch provided by the developer to the to-be-released area 1112 by triggering the add option in the to-be-released area 1112, and transfer the required feature branch to the integration area 1111, respectively, to complete the branch of the feature. Merger. In another case, it is assumed that there is an association relationship between the issue pipeline shown in FIG. 11 and the issue pipeline shown in FIG. 4C; the release pipeline shown in FIG. 4C has created an instance of the code version V-1.1.1. Then, if the release pipeline shown in FIG. 11 also wants to adopt the feature branches 1 to 2, the release branch of the instance whose code version is V-1.1.1 can be directly imported into the integration area by triggering the import option in the integration area 1111. 1111, the corresponding release branch code is merged with the main code of the release pipeline shown in FIG. 11, without the need to merge the feature branch code 1, the feature branch code 2, and the code conflict.
步骤1008,创建实例,生成代码版本。In step 1008, an instance is created and a code version is generated.
在一实施例中,假定图4C所示的发布流水线与图11所示的发布流水线之间存在关联关系:在一种情况下,在图4C所示的发布流水线生成实例后,可以随时将发布分支共享至图11所示的发布流水线,使得两条发布流水线可以至少部分并行处理、提升发布效率;在另一种情况下,可以在图4C所示的发布流水线运行完成后,将发布分支共享至图11所示的发布流水线。In an embodiment, it is assumed that there is an association between the issue pipeline shown in FIG. 4C and the issue pipeline shown in FIG. 11: in one case, after the release pipeline generation example shown in FIG. 4C, the release pipeline can be released at any time. The branches are shared to the release pipeline shown in FIG. 11, so that the two release pipelines can be processed at least partially in parallel to improve the release efficiency; in another case, the branch share can be released after the release pipeline shown in FIG. 4C is completed. Go to the release pipeline shown in Figure 11.
图12是一示例性实施例提供的一种设备的示意结构图。请参考图12,在硬件层面,该设备包括处理器1202、内部总线1204、网络接口1206、内存1208以及非易失性存储器1210,当然还可能包括其他业务所需要的硬件。处理器1202从非易失性存储器1210中读取对应的计算机程序到内存1208中然后运行,在逻辑层面上形成应用发布装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。FIG. 12 is a schematic structural diagram of an apparatus provided by an exemplary embodiment. Referring to FIG. 12, at the hardware level, the device includes a processor 1202, an internal bus 1204, a network interface 1206, a memory 1208, and a non-volatile memory 1210, and of course may also include hardware required for other services. The processor 1202 reads the corresponding computer program from the non-volatile memory 1210 into the memory 1208 and then operates to form an application publishing device at a logical level. Of course, in addition to the software implementation, one or more embodiments of the present specification do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution body of the following processing flow is not limited to each. A logical unit, which can also be a hardware or logic device.
请参考图13,在软件实施方式中,该应用发布装置可以包括:Referring to FIG. 13, in the software implementation, the application publishing apparatus may include:
阶段展示单元1301,展示应用的多个发布阶段;The stage display unit 1301 displays multiple release stages of the application;
版本展示单元1302,根据各个发布阶段分别运行的所述应用的实例,将所述实例的代码版本展示于相应发布阶段对应的信息展示区域中。The version display unit 1302 displays the code version of the instance in the information display area corresponding to the corresponding release stage according to the instance of the application that is respectively executed in each release stage.
可选的,还包括:Optionally, it also includes:
特性展示单元1303,将所述实例的发布分支所包含的特性分支展示于相应发布阶段对应的信息展示区域中。The feature display unit 1303 displays the feature branches included in the release branch of the instance in the information display area corresponding to the corresponding release stage.
可选的,所述实例包括所述应用的主干代码、所述发布分支对应的发布分支代码,所述发布分支代码由所述特性分支对应的特性分支代码合并得到。Optionally, the example includes a trunk code of the application, a release branch code corresponding to the release branch, and the release branch code is obtained by combining the feature branch codes corresponding to the feature branch.
可选的,还包括:Optionally, it also includes:
界面展示单元1304,展示所述发布分支的特性分支管理界面,所述特性分支管理界面包括集成区和待发布区,所述集成区用于展示已选特性分支,所述待发布区用于展示 备选特性分支;其中,所述发布分支代码由所述已选特性分支对应的特性分支代码合并得到;The interface display unit 1304 is configured to display a feature branch management interface of the publishing branch, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used for displaying An alternative feature branch; wherein the release branch code is obtained by combining the feature branch codes corresponding to the selected feature branches;
特性分支选取单元1305,根据收到的特性分支选取指令,将被选中的备选特性分支转移至所述集成区,以展示为所述集成区内的已选特性分支。The feature branch selecting unit 1305, according to the received feature branch selection instruction, transfers the selected candidate feature branch to the integrated area to be displayed as the selected feature branch in the integrated area.
可选的,还包括:Optionally, it also includes:
界面展示单元1304,展示所述发布分支的特性分支管理界面,所述特性分支管理界面包括集成区和待发布区,所述集成区用于展示已选特性分支,所述待发布区用于展示备选特性分支;其中,所述发布分支代码由所述已选特性分支对应的特性分支代码合并得到;The interface display unit 1304 is configured to display a feature branch management interface of the publishing branch, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used for displaying An alternative feature branch; wherein the release branch code is obtained by combining the feature branch codes corresponding to the selected feature branches;
特性分支去除单元1306,根据收到的特性分支去除指令,将所述集成区的至少一个已选特性分支转移至所述待发布区,以展示为所述待发布区内的备选特征分支。The feature branch removal unit 1306, according to the received feature branch removal instruction, transfers at least one selected feature branch of the integration zone to the to-be-released zone to be displayed as an candidate feature branch in the to-be-released zone.
可选的,还包括以下至少之一:Optionally, at least one of the following is also included:
特性分支添加单元1307,根据收到的特性分支添加指令,向所述特性分支管理界面中添加至少一个备选特性分支;The feature branch adding unit 1307 adds at least one candidate feature branch to the feature branch management interface according to the received feature branch adding instruction;
特性分支删除单元1308,根据收到的特性分支删除指令,从所述特性分支管理界面中删除至少一个备选特性分支。The feature branch deleting unit 1308 deletes at least one candidate feature branch from the feature branch management interface according to the received feature branch deletion instruction.
可选的,还包括:Optionally, it also includes:
第一生成单元1309,当所述集成区内的已选特性分支发生变化时,根据变化后的已选特性分支生成新实例,所述新实例的代码版本区别于历史实例的历史代码版本。The first generating unit 1309 generates a new instance according to the changed selected characteristic branch when the selected characteristic branch in the integrated area changes, and the code version of the new instance is different from the historical code version of the historical instance.
可选的,还包括:Optionally, it also includes:
发布分支调整单元1310,根据收到的发布分支调整指令,实施下述调整操作中至少之一:向所述发布分支代码合并至少一个特性分支对应的特性分支代码,将至少一个特性分支对应的特性分支代码与所述发布分支代码剥离。The issue branch adjustment unit 1310 performs at least one of the following adjustment operations according to the received release branch adjustment instruction: combining the feature branch code corresponding to the at least one feature branch to the release branch code, and the feature corresponding to the at least one feature branch The branch code is stripped from the release branch code.
可选的,还包括:Optionally, it also includes:
获取单元1311,获取基于所述发布分支调整指令得到的调整后发布分支代码;The obtaining unit 1311 is configured to obtain an adjusted post branch code obtained based on the issuing branch adjustment instruction;
第二生成单元1312,根据所述调整后发布分支代码生成相应的新实例,所述新实例的代码版本区别于历史实例的历史代码版本。The second generating unit 1312 generates a corresponding new instance according to the adjusted post branch code, where the code version of the new instance is different from the historical code version of the historical instance.
可选的,还包括:Optionally, it also includes:
冲突检测单元1313,在将任一特性分支的特性分支代码合并至所述发布分支代码时,检测是否发生代码冲突;The conflict detecting unit 1313 detects whether a code conflict occurs when the feature branch code of any feature branch is merged into the issuing branch code.
冲突处理单元1314,当发生代码冲突时,将所述任一特性分支的特性分支代码从所述发布分支代码中剥离,并向预设用户生成相应的冲突提示。The conflict processing unit 1314, when a code conflict occurs, strips the characteristic branch code of any of the feature branches from the release branch code, and generates a corresponding conflict prompt to the preset user.
可选的,还包括:Optionally, it also includes:
信息保存单元1315,分别保存各个代码版本对应实例的发布记录信息;The information storage unit 1315 saves the release record information of the corresponding instance of each code version;
信息查找单元1316,在第一代码版本的第一实例发布至线上环境后,根据收到的由所述第一代码版本向第二代码版本的回滚指令,查找对应于所述第二代码版本的第二实例的发布记录信息;The information searching unit 1316, after the first instance of the first code version is released to the online environment, searches for the second code according to the received rollback instruction from the first code version to the second code version. Release record information for the second instance of the version;
差异确定单元1317,根据查找到的发布记录信息,确定所述第二实例与所述第一实例所包含的特性分支之间的差异;The difference determining unit 1317 determines, according to the found release record information, a difference between the second instance and the characteristic branch included in the first instance;
代码调整单元1318,根据所述差异对所述第一实例中的发布分支代码进行调整,以自动回滚为所述第二实例。The code adjustment unit 1318 adjusts the release branch code in the first instance according to the difference to automatically roll back to the second instance.
可选的,还包括:Optionally, it also includes:
流水线确定单元1319,确定所述多个发布阶段所属的发布流水线对应的至少一个关联发布流水线;The pipeline determining unit 1319 determines at least one associated publishing pipeline corresponding to the publishing pipeline to which the plurality of publishing stages belong;
提供单元1320,将所述实例的发布分支提供至所述关联发布流水线,以在所述关联发布流水线上形成并运行相应的实例。A providing unit 1320 provides the publishing branch of the instance to the associated publishing pipeline to form and run a corresponding instance on the associated publishing pipeline.
可选的,还包括:Optionally, it also includes:
审核结果记录单元1321,获取对所述特性分支的审核结果,并记录至对应于所述特性分支的快照数据中;The audit result recording unit 1321 acquires an audit result of the feature branch, and records the snapshot data corresponding to the feature branch;
情况确定单元1322,当所述特性分支未发生变化时,根据相应的快照数据中记录的审核结果确定所述特性分支的审核情况。The situation determining unit 1322 determines the audit status of the feature branch according to the audit result recorded in the corresponding snapshot data when the feature branch does not change.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function. A typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, and a game control. A combination of a tablet, a tablet, a wearable device, or any of these devices.
在一个典型的配置中,计算机包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介 质的示例。The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory. Memory is an example of a computer readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic cassette tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transporting media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It is also to be understood that the terms "comprises" or "comprising" or "comprising" or any other variations are intended to encompass a non-exclusive inclusion, such that a process, method, article, Other elements not explicitly listed, or elements that are inherent to such a process, method, commodity, or equipment. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device including the element.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing description of the specific embodiments of the specification has been described. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the embodiments and still achieve the desired results. In addition, the processes depicted in the figures are not necessarily in a particular order or in a sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
在本说明书一个或多个实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terms used in one or more embodiments of the present specification are for the purpose of describing particular embodiments, and are not intended to limit one or more embodiments. The singular forms "a", "the", and "the" It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本说明书一个或多个实施例可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of the specification, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, the first information may also be referred to as the second information without departing from the scope of one or more embodiments of the present disclosure. Similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to a determination."
以上所述仅为本说明书一个或多个实施例的较佳实施例而已,并不用以限制本说明书一个或多个实施例,凡在本说明书一个或多个实施例的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例保护的范围之内。The above is only a preferred embodiment of one or more embodiments of the present specification, and is not intended to limit one or more embodiments of the present specification, which is within the spirit and principles of one or more embodiments of the present specification, Any modifications, equivalent substitutions, improvements, etc., are intended to be included within the scope of the protection of one or more embodiments.

Claims (26)

  1. 一种应用发布方法,其特征在于,包括:An application publishing method, comprising:
    展示应用的多个发布阶段;Show multiple release phases of the app;
    根据各个发布阶段分别运行的所述应用的实例,将所述实例的代码版本展示于相应发布阶段对应的信息展示区域中。The code version of the instance is displayed in the information display area corresponding to the corresponding release stage according to the instance of the application that is respectively run in each release stage.
  2. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1 further comprising:
    将所述实例的发布分支所包含的特性分支展示于相应发布阶段对应的信息展示区域中。The feature branches included in the publishing branch of the instance are displayed in the information display area corresponding to the corresponding publishing stage.
  3. 根据权利要求2所述的方法,其特征在于,所述实例包括所述应用的主干代码、所述发布分支对应的发布分支代码,所述发布分支代码由所述特性分支对应的特性分支代码合并得到。The method according to claim 2, wherein the instance comprises a trunk code of the application, a release branch code corresponding to the release branch, and the release branch code is merged by a feature branch code corresponding to the feature branch. get.
  4. 根据权利要求3所述的方法,其特征在于,还包括:The method of claim 3, further comprising:
    展示所述发布分支的特性分支管理界面,所述特性分支管理界面包括集成区和待发布区,所述集成区用于展示已选特性分支,所述待发布区用于展示备选特性分支;其中,所述发布分支代码由所述已选特性分支对应的特性分支代码合并得到;The feature branch management interface of the publishing branch is displayed, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used to display the candidate feature branch; The issue branch code is obtained by combining the feature branch codes corresponding to the selected feature branches;
    根据收到的特性分支选取指令,将被选中的备选特性分支转移至所述集成区,以展示为所述集成区内的已选特性分支。The selected candidate feature branch is transferred to the integration zone according to the received feature branch selection instruction to be displayed as the selected feature branch in the integration zone.
  5. 根据权利要求3所述的方法,其特征在于,还包括:The method of claim 3, further comprising:
    展示所述发布分支的特性分支管理界面,所述特性分支管理界面包括集成区和待发布区,所述集成区用于展示已选特性分支,所述待发布区用于展示备选特性分支;其中,所述发布分支代码由所述已选特性分支对应的特性分支代码合并得到;The feature branch management interface of the publishing branch is displayed, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used to display the candidate feature branch; The issue branch code is obtained by combining the feature branch codes corresponding to the selected feature branches;
    根据收到的特性分支去除指令,将所述集成区的至少一个已选特性分支转移至所述待发布区,以展示为所述待发布区内的备选特征分支。And transmitting, according to the received feature branch removal instruction, at least one selected feature branch of the integrated area to the to-be-released area to be displayed as an alternate feature branch in the to-be-released area.
  6. 根据权利要求4或5所述的方法,其特征在于,还包括以下至少之一:The method according to claim 4 or 5, further comprising at least one of the following:
    根据收到的特性分支添加指令,向所述特性分支管理界面中添加至少一个备选特性分支;Adding at least one candidate feature branch to the feature branch management interface according to the received feature branch adding instruction;
    根据收到的特性分支删除指令,从所述特性分支管理界面中删除至少一个备选特性分支。And deleting at least one candidate feature branch from the feature branch management interface according to the received feature branch deletion instruction.
  7. 根据权利要求4或5所述的方法,其特征在于,还包括:The method according to claim 4 or 5, further comprising:
    当所述集成区内的已选特性分支发生变化时,根据变化后的已选特性分支生成新实 例,所述新实例的代码版本区别于历史实例的历史代码版本。When the selected feature branch in the integrated zone changes, a new instance is generated based on the changed selected feature branch, the code version of the new instance being different from the historical code version of the historical instance.
  8. 根据权利要求3所述的方法,其特征在于,还包括:The method of claim 3, further comprising:
    根据收到的发布分支调整指令,实施下述调整操作中至少之一:向所述发布分支代码合并至少一个特性分支对应的特性分支代码,将至少一个特性分支对应的特性分支代码与所述发布分支代码剥离。And performing, according to the received release branch adjustment instruction, at least one of the following adjustment operations: combining the feature branch code corresponding to the at least one feature branch with the release branch code, and the feature branch code corresponding to the at least one feature branch and the issuing The branch code is stripped.
  9. 根据权利要求8所述的方法,其特征在于,还包括:The method of claim 8 further comprising:
    获取基于所述发布分支调整指令得到的调整后发布分支代码;Obtaining an adjusted release branch code obtained based on the release branch adjustment instruction;
    根据所述调整后发布分支代码生成相应的新实例,所述新实例的代码版本区别于历史实例的历史代码版本。A corresponding new instance is generated according to the adjusted post branch code, and the code version of the new instance is different from the historical code version of the historical instance.
  10. 根据权利要求3所述的方法,其特征在于,还包括:The method of claim 3, further comprising:
    在将任一特性分支的特性分支代码合并至所述发布分支代码时,检测是否发生代码冲突;Detecting whether a code conflict occurs when the feature branch code of any feature branch is merged into the release branch code;
    当发生代码冲突时,将所述任一特性分支的特性分支代码从所述发布分支代码中剥离,并向预设用户生成相应的冲突提示。When a code conflict occurs, the feature branch code of any of the feature branches is stripped from the release branch code, and a corresponding conflict prompt is generated to the preset user.
  11. 根据权利要求2所述的方法,其特征在于,还包括:The method of claim 2, further comprising:
    分别保存各个代码版本对应实例的发布记录信息;Separate the release record information of the corresponding instance of each code version;
    在第一代码版本的第一实例发布至线上环境后,根据收到的由所述第一代码版本向第二代码版本的回滚指令,查找对应于所述第二代码版本的第二实例的发布记录信息;After the first instance of the first code version is released to the online environment, searching for a second instance corresponding to the second code version according to the received rollback instruction from the first code version to the second code version Release record information;
    根据查找到的发布记录信息,确定所述第二实例与所述第一实例所包含的特性分支之间的差异;Determining, according to the found release record information, a difference between the second instance and a feature branch included in the first instance;
    根据所述差异对所述第一实例中的发布分支代码进行调整,以自动回滚为所述第二实例。The release branch code in the first instance is adjusted according to the difference to automatically roll back to the second instance.
  12. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1 further comprising:
    确定所述多个发布阶段所属的发布流水线对应的至少一个关联发布流水线;Determining at least one associated release pipeline corresponding to the release pipeline to which the multiple release stages belong;
    将所述实例的发布分支提供至所述关联发布流水线,以在所述关联发布流水线上形成并运行相应的实例。A publishing branch of the instance is provided to the associated publishing pipeline to form and run a corresponding instance on the associated publishing pipeline.
  13. 根据权利要求2所述的方法,其特征在于,还包括:The method of claim 2, further comprising:
    获取对所述特性分支的审核结果,并记录至对应于所述特性分支的快照数据中;Obtaining an audit result of the feature branch, and recording the snapshot data corresponding to the feature branch;
    当所述特性分支未发生变化时,根据相应的快照数据中记录的审核结果确定所述特性分支的审核情况。When the feature branch does not change, the audit status of the feature branch is determined according to the audit result recorded in the corresponding snapshot data.
  14. 一种应用发布装置,其特征在于,包括:An application publishing device, comprising:
    阶段展示单元,展示应用的多个发布阶段;A stage display unit that displays multiple release phases of the application;
    版本展示单元,根据各个发布阶段分别运行的所述应用的实例,将所述实例的代码版本展示于相应发布阶段对应的信息展示区域中。The version display unit displays the code version of the instance in the information display area corresponding to the corresponding release stage according to the instance of the application respectively running in each release stage.
  15. 根据权利要求14所述的装置,其特征在于,还包括:The device according to claim 14, further comprising:
    特性展示单元,将所述实例的发布分支所包含的特性分支展示于相应发布阶段对应的信息展示区域中。The feature display unit displays the feature branches included in the release branch of the instance in the information display area corresponding to the corresponding release stage.
  16. 根据权利要求15所述的装置,其特征在于,所述实例包括所述应用的主干代码、所述发布分支对应的发布分支代码,所述发布分支代码由所述特性分支对应的特性分支代码合并得到。The apparatus according to claim 15, wherein the instance comprises a trunk code of the application, a release branch code corresponding to the release branch, and the release branch code is merged by a feature branch code corresponding to the feature branch. get.
  17. 根据权利要求16所述的装置,其特征在于,还包括:The device according to claim 16, further comprising:
    界面展示单元,展示所述发布分支的特性分支管理界面,所述特性分支管理界面包括集成区和待发布区,所述集成区用于展示已选特性分支,所述待发布区用于展示备选特性分支;其中,所述发布分支代码由所述已选特性分支对应的特性分支代码合并得到;An interface display unit, where the feature branch management interface of the publishing branch is displayed, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used for displaying the standby Selecting a feature branch; wherein the issue branch code is obtained by combining the feature branch codes corresponding to the selected feature branch;
    特性分支选取单元,根据收到的特性分支选取指令,将被选中的备选特性分支转移至所述集成区,以展示为所述集成区内的已选特性分支。The feature branch selection unit transfers the selected candidate feature branch to the integration zone according to the received feature branch selection instruction to be displayed as the selected feature branch in the integration zone.
  18. 根据权利要求16所述的装置,其特征在于,还包括:The device according to claim 16, further comprising:
    界面展示单元,展示所述发布分支的特性分支管理界面,所述特性分支管理界面包括集成区和待发布区,所述集成区用于展示已选特性分支,所述待发布区用于展示备选特性分支;其中,所述发布分支代码由所述已选特性分支对应的特性分支代码合并得到;An interface display unit, where the feature branch management interface of the publishing branch is displayed, where the feature branch management interface includes an integrated area and a to-be-released area, where the integrated area is used to display the selected feature branch, and the to-be-released area is used for displaying the standby Selecting a feature branch; wherein the issue branch code is obtained by combining the feature branch codes corresponding to the selected feature branch;
    特性分支去除单元,根据收到的特性分支去除指令,将所述集成区的至少一个已选特性分支转移至所述待发布区,以展示为所述待发布区内的备选特征分支。The feature branch removal unit transfers the at least one selected feature branch of the integration area to the to-be-released area according to the received feature branch removal instruction to be displayed as an candidate feature branch in the to-be-released area.
  19. 根据权利要求17或18所述的装置,其特征在于,还包括以下至少之一:The apparatus according to claim 17 or 18, further comprising at least one of the following:
    特性分支添加单元,根据收到的特性分支添加指令,向所述特性分支管理界面中添加至少一个备选特性分支;The feature branch adding unit adds at least one candidate feature branch to the feature branch management interface according to the received feature branch adding instruction;
    特性分支删除单元,根据收到的特性分支删除指令,从所述特性分支管理界面中删除至少一个备选特性分支。The feature branch deleting unit deletes at least one candidate feature branch from the feature branch management interface according to the received feature branch deletion instruction.
  20. 根据权利要求17或18所述的装置,其特征在于,还包括:The device according to claim 17 or 18, further comprising:
    第一生成单元,当所述集成区内的已选特性分支发生变化时,根据变化后的已选特性分支生成新实例,所述新实例的代码版本区别于历史实例的历史代码版本。The first generating unit generates a new instance according to the changed selected feature branch when the selected feature branch in the integrated area changes, and the code version of the new instance is different from the historical code version of the historical instance.
  21. 根据权利要求16所述的装置,其特征在于,还包括:The device according to claim 16, further comprising:
    发布分支调整单元,根据收到的发布分支调整指令,实施下述调整操作中至少之一:向所述发布分支代码合并至少一个特性分支对应的特性分支代码,将至少一个特性分支对应的特性分支代码与所述发布分支代码剥离。And a release branch adjustment unit, configured to perform at least one of the following adjustment operations according to the received release branch adjustment instruction: merge the feature branch code corresponding to the at least one feature branch with the release branch code, and branch the feature branch corresponding to the at least one feature branch The code is stripped from the release branch code.
  22. 根据权利要求21所述的装置,其特征在于,还包括:The device according to claim 21, further comprising:
    获取单元,获取基于所述发布分支调整指令得到的调整后发布分支代码;Obtaining a unit, and obtaining an adjusted release branch code obtained based on the release branch adjustment instruction;
    第二生成单元,根据所述调整后发布分支代码生成相应的新实例,所述新实例的代码版本区别于历史实例的历史代码版本。The second generating unit generates a corresponding new instance according to the adjusted post branch code, where the code version of the new instance is different from the historical code version of the historical instance.
  23. 根据权利要求16所述的装置,其特征在于,还包括:The device according to claim 16, further comprising:
    冲突检测单元,在将任一特性分支的特性分支代码合并至所述发布分支代码时,检测是否发生代码冲突;The conflict detection unit detects whether a code conflict occurs when the feature branch code of any feature branch is merged into the release branch code;
    冲突处理单元,当发生代码冲突时,将所述任一特性分支的特性分支代码从所述发布分支代码中剥离,并向预设用户生成相应的冲突提示。The conflict processing unit, when a code conflict occurs, strips the characteristic branch code of the any feature branch from the release branch code, and generates a corresponding conflict prompt to the preset user.
  24. 根据权利要求15所述的装置,其特征在于,还包括:The device according to claim 15, further comprising:
    信息保存单元,分别保存各个代码版本对应实例的发布记录信息;The information saving unit separately saves the release record information of the corresponding instance of each code version;
    信息查找单元,在第一代码版本的第一实例发布至线上环境后,根据收到的由所述第一代码版本向第二代码版本的回滚指令,查找对应于所述第二代码版本的第二实例的发布记录信息;An information searching unit, after the first instance of the first code version is released to the online environment, searching for a second code version according to the received rollback instruction from the first code version to the second code version Release record information of the second instance;
    差异确定单元,根据查找到的发布记录信息,确定所述第二实例与所述第一实例所包含的特性分支之间的差异;a difference determining unit, determining, according to the found release record information, a difference between the second instance and a feature branch included in the first instance;
    代码调整单元,根据所述差异对所述第一实例中的发布分支代码进行调整,以自动回滚为所述第二实例。The code adjustment unit adjusts the release branch code in the first instance according to the difference to automatically roll back to the second instance.
  25. 根据权利要求14所述的装置,其特征在于,还包括:The device according to claim 14, further comprising:
    流水线确定单元,确定所述多个发布阶段所属的发布流水线对应的至少一个关联发布流水线;a pipeline determining unit, configured to determine at least one associated publishing pipeline corresponding to the publishing pipeline to which the plurality of publishing stages belong;
    提供单元,将所述实例的发布分支提供至所述关联发布流水线,以在所述关联发布流水线上形成并运行相应的实例。A providing unit is provided to the publishing branch of the instance to the associated publishing pipeline to form and run a corresponding instance on the associated publishing pipeline.
  26. 根据权利要求15所述的装置,其特征在于,还包括:The device according to claim 15, further comprising:
    审核结果记录单元,获取对所述特性分支的审核结果,并记录至对应于所述特性分支的快照数据中;An audit result recording unit obtains an audit result of the feature branch and records the snapshot data corresponding to the feature branch;
    情况确定单元,当所述特性分支未发生变化时,根据相应的快照数据中记录的审核结果确定所述特性分支的审核情况。The situation determining unit determines, when the feature branch does not change, the audit status of the feature branch according to the audit result recorded in the corresponding snapshot data.
PCT/CN2019/076248 2018-03-09 2019-02-27 Application publishing method and apparatus WO2019170018A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810193470.2A CN110244951B (en) 2018-03-09 2018-03-09 Application publishing method and device
CN201810193470.2 2018-03-09

Publications (1)

Publication Number Publication Date
WO2019170018A1 true WO2019170018A1 (en) 2019-09-12

Family

ID=67845786

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/076248 WO2019170018A1 (en) 2018-03-09 2019-02-27 Application publishing method and apparatus

Country Status (2)

Country Link
CN (1) CN110244951B (en)
WO (1) WO2019170018A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112540771A (en) * 2019-12-02 2021-03-23 北京首都在线科技股份有限公司 Automated operation and maintenance method, system, equipment and computer readable storage medium
CN111190584A (en) * 2019-12-10 2020-05-22 平安健康保险股份有限公司 EHIS-DB system version release method and device, computer equipment and storage medium
CN111722842A (en) * 2020-05-29 2020-09-29 北京宝兰德软件股份有限公司 Pipeline arranging method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632825A (en) * 2017-08-18 2018-01-26 深圳怡化电脑股份有限公司 A kind of business software development approach and device
CN107632843A (en) * 2017-09-26 2018-01-26 郑州云海信息技术有限公司 A kind of version display system and method based on CPLD_FPGA

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9715282B2 (en) * 2013-03-29 2017-07-25 Microsoft Technology Licensing, Llc Closing, starting, and restarting applications
US9417869B2 (en) * 2014-11-10 2016-08-16 International Business Machines Corporation Visualizing a congruency of versions of an application across phases of a release pipeline
CN106469068B (en) * 2015-08-14 2020-11-03 中国移动通信集团安徽有限公司 Application program deployment method and system
US9910654B1 (en) * 2015-09-29 2018-03-06 Amazon Technologies, Inc. Extensible software release management automation service
US9787779B2 (en) * 2015-12-21 2017-10-10 Amazon Technologies, Inc. Analyzing deployment pipelines used to update production computing services using a live pipeline template process
CN107025104A (en) * 2016-02-02 2017-08-08 龙芯中科技术有限公司 kernel development management system and method
CN107479862A (en) * 2016-06-07 2017-12-15 阿里巴巴集团控股有限公司 The gray scale dissemination method and system of a kind of software upgrading
CN107463422A (en) * 2017-07-20 2017-12-12 阿里巴巴集团控股有限公司 Code dispositions method and device, electronic equipment
CN107450933A (en) * 2017-08-18 2017-12-08 郑州云海信息技术有限公司 A kind of software continuous integrated approach and system
CN107621944A (en) * 2017-09-22 2018-01-23 天翼电子商务有限公司 Continuous integrating pipeline system and its method based on automation O&M

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632825A (en) * 2017-08-18 2018-01-26 深圳怡化电脑股份有限公司 A kind of business software development approach and device
CN107632843A (en) * 2017-09-26 2018-01-26 郑州云海信息技术有限公司 A kind of version display system and method based on CPLD_FPGA

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"fEATURES bRANCHES", ANONYMITY, 12 February 2018 (2018-02-12), pages 1 - 2, Retrieved from the Internet <URL:https://help.aliyun.com/document_detail/67015.html?spm=a2c4g> *
"Pipeline operation", ANONYMITY, 12 January 2018 (2018-01-12), Retrieved from the Internet <URL:https://help.aliyun.com/document_detail/59954.html?spm=a2c4g> *

Also Published As

Publication number Publication date
CN110244951B (en) 2024-03-12
CN110244951A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
JP7001843B2 (en) Data backup methods and their computer programs and computing devices
US8443361B2 (en) Systems and methods for tracking a history of changes associated with software packages in a computing system
JP6062987B2 (en) Network storage management system
US20150032690A1 (en) Virtual synchronization with on-demand data delivery
WO2019170018A1 (en) Application publishing method and apparatus
JP6050917B2 (en) Virtual database rewind
US20140282553A1 (en) Meta-application management in a multitasking environment
JP5161119B2 (en) File system idempotent journal mechanism
JP6794347B2 (en) Application interface navigation
US7567257B2 (en) Partition-based undo of partitioned object graph
US8983908B2 (en) File link migration for decommisioning a storage server
US20130275369A1 (en) Data record collapse and split functionality
US10338910B2 (en) Multi-tenant upgrading
WO2016110203A1 (en) File path storing and local file accessing method and device
US10140166B2 (en) Message oriented middleware with integrated rules engine
CN105094811A (en) Method can device for processing events
US11157456B2 (en) Replication of data in a distributed file system using an arbiter
US9483535B1 (en) Systems and methods for expanding search results
US10565202B2 (en) Data write/import performance in a database through distributed memory
CN110888649B (en) Application deployment method, application baseline creation method and device
CN114816470A (en) Metadata database management method and device, electronic equipment and medium
US20220237176A1 (en) Method and system for managing changes of records on hosts
US11475382B2 (en) Graphical user interface for receiving proposed and displaying alternative computer architectures
CN116643918A (en) Rollback method of application version and related equipment
US10620922B2 (en) Compiler platform for test method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19763867

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19763867

Country of ref document: EP

Kind code of ref document: A1