CN113268956A - Method for identifying YAML file and converting YAML file into XML file - Google Patents
Method for identifying YAML file and converting YAML file into XML file Download PDFInfo
- Publication number
- CN113268956A CN113268956A CN202110571383.8A CN202110571383A CN113268956A CN 113268956 A CN113268956 A CN 113268956A CN 202110571383 A CN202110571383 A CN 202110571383A CN 113268956 A CN113268956 A CN 113268956A
- Authority
- CN
- China
- Prior art keywords
- warehouse
- yaml
- files
- manifest
- file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 238000010367 cloning Methods 0.000 claims description 6
- 230000007547 defect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000005034 decoration Methods 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 238000009434 installation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
- G06F40/154—Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A method for identifying YAML files of a recipe warehouse and converting the YAML files into XML files of a manifest warehouse comprises the following steps: step A: identifying each YAML file in the recipe warehouse; and B: generating a corresponding XML file in a manifest warehouse; and C: one-touch downloading of source code is implemented. Compared with the prior art, the invention has the advantages that: the invention changes the defect that the information of all source code warehouses can be acquired by sequentially reading various YAML files in the traditional method, only one XML file is arranged in the manifest warehouse, the file records the configuration information of all related source code warehouses of the whole project, the configuration content comprises which git projects are contained in the whole project, the default public branches where all git projects are located, the remote addresses and the like, and the grammar is very clear and easy to understand; all source code can be downloaded one-key through the manifest warehouse using a repo tool, and all source code warehouses can be operated on in batches.
Description
Technical Field
The invention relates to the technical field of software continuous integration, in particular to a method for identifying YAML (extensible markup language) files of a recipe warehouse and converting the YAML files into XML files of a manifest warehouse.
Background
In the continuous integration process of software, the configuration of a source code repository can take various forms, and currently, two types are popular: one is the recipe repository using YAML files, and the other is the manifest repository using XML files.
The method for recording the configuration information of each module by using a large number of YAML files in the recipe warehouse is characterized in that the information of the source code warehouse is only concerned, and the information of all the source code warehouses can be acquired only by sequentially reading the YAML files by using the recipe warehouse, so that time is consumed, and the source code warehouses cannot be subjected to batch operation simultaneously, such as a branch with the same name is created simultaneously.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method for identifying the YAML file of the recipe warehouse and converting the YAML file into the XML file of the manifest warehouse.
The technical scheme adopted by the invention for solving the technical problems is as follows: a method for identifying YAML files of a recipe warehouse and converting the YAML files into XML files of a manifest warehouse comprises the following steps:
step A: identifying each YAML file in the recipe warehouse;
and B: generating a corresponding XML file in a manifest warehouse;
and C: one-touch downloading of source code is implemented.
In the scheme, in the step a, the recipe warehouse is stored from remote to local in a cloning manner.
In the above scheme, the recipe repository includes a plurality of source code repositories.
In the above scheme, the cloning mode is git clone in git command.
In the above scheme, in step B, the XML file includes all configuration contents in the project, and batch operation can be performed on the source code, thereby improving efficiency; and the grammar is clear and easy to understand, and the readability is improved.
In the above scheme, the recipe warehouse acquires the corresponding link, storage path and branch, and writes the link, storage path and branch into the dictionary.
In the above scheme, the dictionary is analyzed to obtain the group name of the warehouse as a first download directory; and the storage path in the dictionary is used as a second downloading directory.
In the above scheme, in step B, after the manifest warehouse is created, the obtained link and branch name are written into an XML file and uploaded to the manifest warehouse.
In the scheme, a repo tool is used for downloading the source code; making more efficient use of git for developers.
In the above scheme, the source code is downloaded to the first download directory or the second download directory.
Compared with the prior art, the invention has the advantages that: the invention changes the defect that the information of all source code warehouses can be acquired by sequentially reading various YAML files in the traditional method, only one XML file is arranged in the manifest warehouse, the file records the configuration information of all related source code warehouses of the whole project, the configuration content comprises which git projects are contained in the whole project, the default public branches where all git projects are located, the remote addresses and the like, and the grammar is very clear and easy to understand; all source codes can be downloaded through the manifest warehouse one-key by using a repo tool, and all source code warehouses can be operated in batches, so that the method is quick and efficient.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
The invention is described in further detail below with reference to the accompanying examples.
As shown in fig. 1, a method for identifying YAML files of a recipe warehouse and converting the YAML files into XML files of a manifest warehouse includes the following steps:
step A: identifying each YAML file in the recipe warehouse;
and B: generating a corresponding XML file in a manifest warehouse;
and C: one-touch downloading of source code is implemented.
In step A, the recipe warehouse is stored from the remote place to the local place through a cloning mode.
The recipe repository includes a number of source code repositories.
The cloning mode is git clone in git command.
In step B, the XML file comprises all configuration contents in the project; the configuration content comprises which git items are contained in the whole item, default public branches where all git items are located, remote addresses and the like, and the grammar is clear and easy to understand; all source code can be downloaded one-click through the manifest repository using a repo utility,
and the recipe warehouse acquires the corresponding link, storage path and branch and writes the link, storage path and branch into the dictionary.
The dictionary is analyzed, and the warehouse group name is obtained and used as a first downloading directory; and the storage path in the dictionary is used as a second downloading directory.
In order to count the source code warehouses used in all the projects in the recipe, converting the source code warehouses into manifest files, and downloading all the warehouses by using the repo; the repo is a Python script developed by Android to conveniently manage a plurality of git libraries; the presence of repo is not intended to replace git, but rather to make more efficient use of git by developers.
The repo needs to pay attention to the number, name, path and the like of the current git libraries, and can operate the git libraries only if the basic information is available; by maintaining lists of all git libraries in a centralized way, the repo can conveniently acquire the information of the git libraries from the lists; the list can change along with the evolution and upgrade of the version, and meanwhile, local modification and customization requirements exist, the repo manages the list file of the project through a git library, and the name of the git library is called manifest.
In step B, after the manifest warehouse is created, writing the obtained corresponding link, storage path and branch into an XML file and uploading the XML file to the manifest warehouse.
Downloading the source code by using a repo tool; the required source code is downloaded by installing the installation git and curl, downloading the repo tool.
And the source code is downloaded to the first download directory or the second download directory.
It will be understood by those within the art that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. Those skilled in the art will appreciate that the computer program instructions may be implemented by a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, implement the features specified in the block or blocks of the block diagrams and/or flowchart illustrations of the present disclosure.
Those of skill in the art will appreciate that various operations, methods, steps in the processes, acts, or solutions discussed in the present application may be alternated, modified, combined, or deleted. Further, various operations, methods, steps in the flows, which have been discussed in the present application, may be interchanged, modified, rearranged, decomposed, combined, or eliminated. Further, steps, measures, schemes in the various operations, methods, procedures disclosed in the prior art and the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (10)
1. A method for identifying YAML files of a recipe warehouse and converting the YAML files into XML files of a manifest warehouse is characterized by comprising the following steps:
step A: identifying each YAML file in the recipe warehouse;
and B: generating a corresponding XML file in a manifest warehouse;
and C: one-touch downloading of source code is implemented.
2. The method for identifying YAML files of a receiver warehouse and converting the YAML files into XML files of a manifest warehouse as claimed in claim 1, wherein in the step a, the receiver warehouse is saved from remote to local by means of cloning.
3. The method of claim 1, wherein the recipe repository comprises a plurality of source code repositories in the form of a YAML file that identifies the recipe repository and converts the YAml file into an XML file for the manifest repository.
4. The method for identifying the YAML file of the recipe warehouse and converting the YAML file into the XML file of the manifest warehouse as claimed in claim 2, wherein the cloning mode is a git clone in git commands.
5. The method of claim 1, wherein in step B, the XML file includes all configuration contents in the project.
6. The method for identifying YAML files of a recipe warehouse and converting the YAML files into XML files of a manifest warehouse as claimed in claim 3, wherein the recipe warehouse obtains corresponding links, storage paths and branches and writes the corresponding links, storage paths and branches into a dictionary.
7. The method for recognizing YAML files of a recipe warehouse and converting the YAML files into XML files of a manifest warehouse as claimed in claim 6, wherein the dictionary is parsed to obtain the group name of the warehouse as the first download directory; and the storage path in the dictionary is used as a second downloading directory.
8. The method for identifying YAML files of recipe warehouse and converting into XML files of manifest warehouse as claimed in claim 6, wherein in step B, after the manifest warehouse is created, the obtained corresponding links, storage paths and branches are written into manifest files and uploaded to the manifest warehouse.
9. The method of claim 1, wherein the source code is downloaded using a repo tool to identify YAML files in the recipe repository and convert them to XML files in the manifest repository.
10. The method of claim 9, wherein the source code is downloaded to the first download directory or the second download directory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110571383.8A CN113268956A (en) | 2021-05-25 | 2021-05-25 | Method for identifying YAML file and converting YAML file into XML file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110571383.8A CN113268956A (en) | 2021-05-25 | 2021-05-25 | Method for identifying YAML file and converting YAML file into XML file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113268956A true CN113268956A (en) | 2021-08-17 |
Family
ID=77232716
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110571383.8A Pending CN113268956A (en) | 2021-05-25 | 2021-05-25 | Method for identifying YAML file and converting YAML file into XML file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113268956A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115774864A (en) * | 2023-02-10 | 2023-03-10 | 闪捷信息科技有限公司 | Code leakage protection method and device based on githook script |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109783076A (en) * | 2018-12-14 | 2019-05-21 | 深圳壹账通智能科技有限公司 | Code administration method, apparatus, equipment and storage medium based on git |
CN110334326A (en) * | 2019-09-02 | 2019-10-15 | 宁波均胜普瑞智能车联有限公司 | A kind of method and system for identifying recipe file and being converted into XML file |
CN111857881A (en) * | 2020-07-21 | 2020-10-30 | 深圳创维-Rgb电子有限公司 | Repo-based manifest warehouse loading method and device and storage medium |
-
2021
- 2021-05-25 CN CN202110571383.8A patent/CN113268956A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109783076A (en) * | 2018-12-14 | 2019-05-21 | 深圳壹账通智能科技有限公司 | Code administration method, apparatus, equipment and storage medium based on git |
CN110334326A (en) * | 2019-09-02 | 2019-10-15 | 宁波均胜普瑞智能车联有限公司 | A kind of method and system for identifying recipe file and being converted into XML file |
CN111857881A (en) * | 2020-07-21 | 2020-10-30 | 深圳创维-Rgb电子有限公司 | Repo-based manifest warehouse loading method and device and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115774864A (en) * | 2023-02-10 | 2023-03-10 | 闪捷信息科技有限公司 | Code leakage protection method and device based on githook script |
CN115774864B (en) * | 2023-02-10 | 2023-06-16 | 闪捷信息科技有限公司 | Code leakage protection method and device based on git hook script |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104484269A (en) | Method for automatically generating testing script | |
CN106528258A (en) | Method and system for improving compiling speed of Android project | |
CN112558980A (en) | Multi-software-package management method and device | |
CN110334326B (en) | A kind of method and system for identifying recipe file and being converted into XML file | |
KR101882759B1 (en) | Method and apparatus for stabilized binary differencing | |
CN113268956A (en) | Method for identifying YAML file and converting YAML file into XML file | |
CN104598382B (en) | A kind of test control method and device | |
CN111208995A (en) | Method, system, device and storage medium for automatically generating IBM host job | |
CN113934640A (en) | Method and system for automatically testing software | |
CN110780854B (en) | APP automatic integrated platform system and method based on IOS system | |
CN110688140B (en) | Code management method and terminal | |
CN112379865A (en) | Software development framework updating method based on Maven plug-in mechanism | |
EP4254175A1 (en) | Enriching code for code explainability | |
CN109117173B (en) | Configuration file management method based on project version development | |
CN108090034B (en) | Cluster-based uniform document code coding generation method and system | |
CN115951916A (en) | Component processing method and device, electronic equipment and storage medium | |
CN115145826A (en) | Full-process automatic testing method and system | |
CN115437639A (en) | Automatic generation method and device of compiling configuration file, electronic equipment and storage medium | |
CN109019217B (en) | Elevator control software field debugging system | |
CN100367233C (en) | Program execution control mode | |
CN111679983A (en) | JAVA interface static test method and device | |
CN111158700A (en) | SVN automatic deployment method and system | |
CN108196853A (en) | For disposing the method for Android system SDK, storage medium, equipment and system | |
CN117762429A (en) | Script management system, script management method, and computer-readable medium | |
CN117591153A (en) | Method and device for dynamically loading JS objects by IOS |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |