Management method, system, device and storage medium based on software warehouse
By analyzing the source code and configuration files of the software project, the product type and deployment environment are automatically determined, and a standardized product library name list is generated, which solves the problem of irregular product library naming management in the existing technology, and simplified configuration management and improved user experience are achieved.
Patent Information
- Application Number
- CN202111353097.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-16
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2041-11-16
AI Technical Summary
In the prior art, the naming management of product libraries with multiple projects, types and environments is not standardized, resulting in complex configuration of subsequent product libraries, high learning costs for ordinary users, and it is difficult to achieve unified and convenient configuration management.
By obtaining relevant information of the software project, reading source code and configuration files for analysis, automatically determining the type of product and deployment environment, generating a standardized product library name list based on preset rules, and configuring to create a product library.
It realizes automatic analysis of various code bases, standardized naming of product types and deployment environments, avoids manual input errors for users, reduces the difficulty of use, and improves user experience.
Smart Images

Figure CN114327580B_ABST
Abstract
Description
Background Art
[0002] In the software development process, each project uses a different programming language, and the final products and warehouses for storing products are also different. For example, the maven warehouse of the java project, the pypi warehouse of the python project, the go warehouse of the golang project, the docker warehouse of the project products released using container technology, etc. Moreover, the products deployed in different environments of the same project are also different. The products deployed in the development environment are the products built by the latest developed code; the products deployed in the pre-production environment are those that have been fully tested and ready for release; and the products deployed in the production environment are the final products that have been tested in multiple environments and multiple rounds to ensure that they are correct.
[0003] Therefore, different deployment environments of the same project also need to strictly distinguish different artifact warehouses. A mature software company needs a set of artifact warehouses to uniformly manage the artifacts produced by each project team. It is necessary to manage artifact libraries of multiple projects, multiple types, and multiple environments in one artifact warehouse system. In reality, the naming management of artifact libraries of multiple projects, multiple types, and multiple environments is not standardized. The non-standard naming makes it difficult to use various regular expressions to achieve unified and convenient configuration management for subsequent artifact library management configuration. A unified software artifact warehouse requires multiple different types of artifacts. At present, some software artifact warehouses support dozens of artifact types, and the configuration items of each artifact are different. The artifact library configuration is complex, and the learning cost for ordinary users is very high.
[0004] In view of this, the present invention provides a management method, system, device and storage medium based on a software warehouse.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] In response to the problems in the prior art, the purpose of the present invention is to provide a management method, system, device and storage medium based on a software warehouse, which overcomes the difficulties of the prior art, can analyze various code bases, automatically determine the type of product and the environment in which the product is deployed, and perform standardized naming.
[0007] An embodiment of the present invention provides a management method based on a software warehouse, comprising the following steps:
[0008] Get relevant information about software projects;
[0009] Read the source code and configuration files corresponding to the software project for the first analysis;
[0010] Read the configuration file corresponding to the project for a second analysis;
[0011] According to the results of the first and second analyses, a product library name list is generated based on preset rules;
[0012] Select a configuration from the Artifact Library Name list to create an artifact library.
[0013] Preferably, the obtaining of relevant information of the software project includes:
[0014] Obtaining relevant information of the software project, when the software project is a main project, the relevant information at least includes the software project name and the code repository address corresponding to the software project;
[0015] When the software project is a sub-project, the relevant information includes at least the software project name, the project path, and the code repository address corresponding to the software project.
[0016] Preferably, the reading of source code and configuration files corresponding to the software project for a first analysis includes:
[0017] Read the source code and configuration files corresponding to the software project, and analyze the programming language and publishing technology used in the project, wherein the analysis includes at least one of: determining the programming language used based on the source code file name suffix analysis, determining the programming language and publishing technology used based on the project dependency configuration file analysis, and determining the programming language and publishing technology used based on the project build script file analysis.
[0018] Preferably, the configuration file corresponding to the read item is analyzed for the second time, including:
[0019] The configuration file corresponding to the project is read, and the deployment environment involved in the project is analyzed. The analysis includes at least one of: project startup configuration file analysis and deployment configuration file analysis.
[0020] Preferably, generating a product library name list based on preset rules according to the results of the first analysis and the second analysis includes:
[0021] According to the analysis results of the source code and configuration files corresponding to the read software project and the deployment environment analysis results of the configuration files corresponding to the read project, a preset product library template is matched.
[0022] Preferably, generating a product library name list based on preset rules according to the results of the first analysis and the second analysis includes:
[0023] Obtaining a first category name according to the first analysis;
[0024] Obtaining a second category designation based on said second analysis;
[0025] Traversing the product library name list in the preset rule to obtain product library names having both the first category name and the second category name;
[0026] The product library names are collected to generate a product library name list.
[0027] Preferably, the step of creating a product library from the product library name list comprises:
[0028] Feedback on the optional artifact library names and default artifact library configurations;
[0029] Receive instructions from users to select a product library;
[0030] Create an artifact library according to the artifact library name configuration selected by the user.
[0031] Preferably, the product library template includes a name generation rule, generates the product library name in an automatic manner, and presets the product library name for management.
[0032] Preferably, after selecting a configuration from the product library name list to create a product library, the method further includes:
[0033] Detecting a permission tag of a user accessing the artifact library, wherein the permission tag at least includes at least one first-category name in a preset first-category name set and at least one second-category name in a preset second-category name set;
[0034] When judging whether the permission tag satisfies both the first category name and the second category name contained in the product library name, if so, the user is allowed to access the product library, and if not, the user is denied access to the product library.
[0035] An embodiment of the present invention further provides a management system based on a software warehouse, which is used to implement the above-mentioned management method based on a software warehouse. The management system based on a software warehouse includes:
[0036] Information acquisition module, to obtain relevant information of the software project;
[0037] The first analysis module reads the source code and configuration files corresponding to the software project for the first analysis;
[0038] The second analysis module reads the configuration file corresponding to the project for the second analysis;
[0039] The name generation module generates a product library name list based on preset rules according to the results of the first and second analyses;
[0040] The product library configuration module selects one configuration from the product library name list to create a product library.
[0041] An embodiment of the present invention further provides a management device based on a software warehouse, comprising:
[0042] processor;
[0043] a memory storing executable instructions of the processor;
[0044] The processor is configured to execute the steps of the software repository-based management method by executing the executable instructions.
[0045] An embodiment of the present invention further provides a computer-readable storage medium for storing a program, wherein the program implements the steps of the above-mentioned software warehouse-based management method when executed.
[0046] The purpose of the present invention is to provide a management method, system, device and storage medium based on a software warehouse, which can analyze various code bases, automatically determine the type of product and the environment in which the product is deployed, and perform standardized naming, thereby avoiding input errors caused by manual input or manual selection by users, reducing the difficulty of user use, and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.
[0048] Figure 1 It is a flow chart of an embodiment of the management method based on software warehouse of the present invention.
[0049] Figure 2 It is a flow chart of another embodiment of the management method based on software warehouse of the present invention.
[0050] Figure 3 It is a schematic diagram of the implementation process of the management method based on software warehouse of the present invention.
[0051] Figure 4 It is a module diagram of an embodiment of the management system based on software warehouse of the present invention.
[0052] Figure 5 It is a module diagram of another embodiment of the management system based on software warehouse of the present invention.
[0053] Figure 6 It is a module diagram of another embodiment of the management system based on software warehouse of the present invention.
[0054] Figure 7 It is a schematic diagram of the operation of the management system based on the software warehouse of the present invention. DETAILED DESCRIPTION
[0055] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the present application. The present application can also be implemented or applied through other different specific implementation methods, and the details in the present application can also be modified or changed in various ways according to different viewpoints and application systems without departing from the spirit of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0056] The following is a detailed description of the embodiments of the present application with reference to the accompanying drawings so that those skilled in the art can easily implement the present application. The present application can be embodied in a variety of different forms and is not limited to the embodiments described herein.
[0057] In the representations of the present application, the representations with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics represented in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the represented specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples represented in the present application and the features of the different embodiments or examples, unless they contradict each other.
[0058] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the representation of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0059] In order to clearly describe the present application, components irrelevant to the description are omitted, and the same reference symbols are given to the same or similar components throughout the specification.
[0060] Throughout the specification, when a device is said to be "connected" to another device, this includes not only the case of "direct connection" but also the case of "indirect connection" by placing other elements therebetween. In addition, when a device is said to "include" a certain component, unless otherwise stated, it does not exclude other components, but means that other components may be included.
[0061] When a device is said to be "on" another device, it may be directly on the other device, but there may also be other devices between it. In contrast, when a device is said to be "directly" on another device, there are no other devices between it.
[0062] Although the terms first, second, etc. are used to represent various elements in some examples, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first interface and the second interface, etc. are represented. Moreover, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising" and "including" indicate the existence of features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Only when the combination of elements, functions, steps or operations is inherently mutually exclusive in some way, will there be an exception to this definition.
[0063] The technical terms used herein are only used to refer to specific embodiments and are not intended to limit the present application. The singular form used herein also includes the plural form unless the sentence clearly indicates the contrary meaning. The meaning of "including" used in the specification is to specify specific characteristics, regions, integers, steps, operations, elements and / or components, and does not exclude the existence or addition of other characteristics, regions, integers, steps, operations, elements and / or components.
[0064] Although not defined differently, all terms, including technical and scientific terms used herein, have the same meaning as those generally understood by those skilled in the art to which this application belongs. Terms defined in commonly used dictionaries are additionally interpreted as having meanings consistent with the relevant technical literature and the contents of the current disclosure, and unless defined, shall not be overly interpreted as ideal or very formal meanings.
[0065] Figure 1 FIG. 1 is a flow chart of an embodiment of the management method based on software warehouse of the present invention. Figure 1 As shown, the management method based on software warehouse of the present invention includes:
[0066] S110, obtaining relevant information of the software project.
[0067] S120, read the source code and configuration file corresponding to the software project for the first analysis, wherein the first analysis mainly involves analyzing the source code and configuration file corresponding to the project. In the field of computer science, source code (also known as source program) refers to a series of human-readable computer language instructions. In modern programming languages, source code can appear in the form of books or tapes, but the most commonly used format is a text file, and the purpose of this typical format is to compile a computer program. A configuration file (English: configuration file) is a computer file that can configure parameters and initial settings for some computer programs.
[0068] S130, read the configuration file corresponding to the project for a second analysis, wherein the second analysis mainly involves analyzing the deployment environment involved in the project. The deployment environment refers to a series of hardware and software environments required or in which the software project is deployed, and common ones include computer processors, memory, hard disks, operating systems and versions, operating permissions, databases and versions, containers, clusters, and images that are relied on; the deployment environment forms constraints or restrictions on the deployment work. When carrying out software deployment work, it is necessary to examine the deployment environment and formulate reasonable deployment methods and methods.
[0069] S140, generating a product library name list based on preset rules according to the results of the first analysis and the second analysis. The preset rules in the present invention need to obtain the product library name together according to the first type of label (name) corresponding to the result of the first analysis and the second type of label (name) corresponding to the result of the second analysis, so that the product library name can meet the common results of the first analysis and the second analysis.
[0070] S150. Select a configuration from the product library name list to create a product library.
[0071] The present invention is mainly used in the field of DevOps cloud computing and belongs to the emerging information technology application. DevOps (a combination of Development and Operations) is a collective name for a set of processes, methods and systems, which are used to promote communication, collaboration and integration between development (application / software engineering), technical operations and quality assurance (QA) departments. It is a culture, movement or practice that emphasizes communication and cooperation between "software developers (Dev)" and "IT operation and maintenance technicians (Ops)". By automating the processes of "software delivery" and "architecture changes", building, testing and releasing software can be faster, more frequent and more reliable. Its emergence is due to the software industry's increasingly clear understanding that in order to deliver software products and services on time, development and operation and maintenance work must work closely together.
[0072] DevOps can be thought of as the intersection of development (software engineering), technical operations, and quality assurance (QA). Traditional software organizations set up development, IT operations, and quality assurance as separate departments. How to adopt new development methods (such as agile software development) in this environment is an important issue: according to the previous way of working, development and deployment do not require in-depth, cross-departmental support from IT or QA, but require extremely close multi-departmental collaboration. However, DevOps considers more than just software deployment. It is a set of processes and methods for communication and collaboration issues between these departments. Enterprises that need to deliver frequently may need a general understanding of DevOps. Flickr has developed its own DevOps capabilities to support the business department's requirement of "deploying 10 times a day" - if an organization wants to produce applications for multiple users and with multiple functions, its deployment cycle must be very short. This capability is also called continuous deployment and is often associated with the lean startup method. Since 2009, related working groups, professional organizations, and blogs have emerged rapidly.
[0073] The introduction of DevOps can have a profound impact on product delivery, testing, feature development and maintenance (including "hot patches" that were once rare but are now common). In organizations that lack DevOps capabilities, there is an information "gap" between development and operations - for example, operations staff require better reliability and security, developers want infrastructure to respond faster, and business users want more features to be released to end users faster. This information gap is where problems often occur.
[0074] The name of the artifact warehouse created by this system complies with the standardized naming rules, and can provide more flexible and rich configuration methods in the subsequent artifact library permission control, artifact library event subscription management, etc. This system and method intelligently analyze the project code and environment configuration, intelligently match the template software artifact library template, and automatically generate the configuration information of the artifact library, which reduces the difficulty of user use and improves the user experience.
[0075] Figure 2 FIG. 1 is a flow chart of another embodiment of the management method based on software warehouse of the present invention. Figure 2 As shown, the management method based on software warehouse, Figure 1In the embodiment, on the basis of steps S110, S120, S130, S140, and S150, step S120 is replaced by S121, step S130 is replaced by S131, step S140 is replaced by S141, S142, S143, and S144, step S150 is replaced by S151, S152, and S153, step S160 is replaced by S161 and S162, and steps S161 and S162 are added after step S140. Each step is described below:
[0076] S110, obtaining relevant information of the software project.
[0077] S121. Read the source code and configuration files corresponding to the software project, and analyze the programming language and publishing technology used in the project.
[0078] S131. Read the configuration file corresponding to the project, analyze the deployment environment involved in the project, and the analysis technology of the deployment environment.
[0079] S141. Read the source code and configuration files corresponding to the software project, analyze the programming language and publishing technology used in the project, and the analysis technology includes at least: determining the programming language used based on the source code file name suffix analysis, determining the programming language used based on the project dependency configuration file analysis, and determining at least one of the following based on the project build script file analysis, thereby obtaining a first category name through the first analysis.
[0080] S142, obtaining a second category name according to the second analysis. Reading a configuration file corresponding to the project, analyzing the deployment environment involved in the project, and the analysis technology of the deployment environment, the analysis technology at least including: at least one of the project startup configuration file analysis and the deployment configuration file analysis, thereby obtaining a second category name through the second analysis.
[0081] S143, according to the analysis results of reading the source code and configuration file corresponding to the software project and the deployment environment analysis results of reading the configuration file corresponding to the project, match the preset product library template to obtain the product library name with both the first category name and the second category name. The product library template includes a name generation rule, automatically generates the product library name, and presets the product library name.
[0082] S144. Collect product library names to generate a product library name list.
[0083] S151. Feedback the optional product library name and the default product library configuration.
[0084] S152. Receive a user instruction to select a product library.
[0085] S153. Create a product library according to the product library name configuration selected by the user.
[0086] S161. Detect the permission tag of the user accessing the product library, where the permission tag contains at least one first-category name in the preset first-category name set and at least one second-category name in the preset second-category name set. (This can be achieved by a first-category name set containing a large number of first-category names, and a large number of first-category names can be preset according to actual needs, and the user is configured with at least one of them according to work needs. Similarly, this can be achieved by a second-category name set containing a large number of second-category names, and a large number of second-category names can be preset according to actual needs, and the user is configured with at least one of them according to work needs.)
[0087] S162, when judging whether the permission label satisfies the first category name and the second category name contained in the product library name at the same time, if so, the user is allowed to access the product library, if not, the user is denied access to the product library. Through steps S161 and S162, precise permission control can be achieved when various types of users access the software product library, so that users from different working groups or different project development groups can only access the local software of the software product library they need. This mode of permission label detection is different from the previous mode of simply defining the user level. Instead, the permission label is customized based on the user's own project attributes (the type of project to be developed and the usage scenario of the project). In this way, the user can accurately access the software library content related to his or her work without seeing the projects of other development groups, thus realizing system isolation between software development groups. Moreover, the entire process is automatically completed through the reminder of the method of the present invention, avoiding the cost of human intervention to distinguish each software, greatly improving the overall development efficiency.
[0088] Compared with the prior art, it has the following advantages and effects:
[0089] 1. Automation: This technology supports the analysis of various code bases and automatically determines the type of artifacts and the environment in which the artifacts are deployed.
[0090] 2. Ease of use: No need for manual input or selection by users. This avoids input errors caused by manual input or selection by users, reduces the difficulty of user use, and improves user experience.
[0091] 3. The product warehouse name created by this method complies with the standardized naming rules, and can provide more flexible and rich configuration methods in subsequent product library permission control, product library event subscription management, etc.
[0092] Figure 3 FIG. 1 is a schematic diagram of the implementation process of the management method based on software warehouse of the present invention. Figure 3 As shown, a specific implementation process of the present invention is as follows:
[0093] S1. Get relevant information about the project, including the project name (if it is a sub-project, the complete project path is required), the code repository address corresponding to the project, etc.
[0094] S2. The "Artifact Type Analysis Module" reads the source code and configuration files corresponding to the project, and analyzes the programming language and publishing technology used by the project. The analysis technologies used include but are not limited to: source code file name suffix analysis to determine the programming language used, project dependency configuration file analysis to determine the programming language and publishing technology used (for example: pom.xml file of Maven project, go.mod file of Go project), project build script file analysis (for example: Docker's Dockfile file), etc. Among them, the Maven Project Object Model (POM) is a project management tool software that can manage the construction, reporting and documentation of the project through a short description information. In addition to its program building capabilities, Maven also provides advanced project management tools. Since Maven's default build rules are highly reusable, simple projects can often be built with two or three lines of Maven build scripts. Due to Maven's project-oriented approach, many Apache Jakarta projects use Maven when publishing, and the proportion of company projects using Maven continues to grow. Go (also known as Golang) is a statically strongly typed, compiled language developed by Robert Griesemer, Rob Pike and Ken Thompson of Google. The syntax of Go language is similar to C, but it has the following features: memory safety, GC (garbage collection), structural form and CSP-style concurrent computing. Docker is an open source application container engine that allows developers to package their applications and dependent packages into a portable image, and then publish them to any popular Linux or Windows operating system machine, and can also achieve virtualization. Containers are completely sandboxed, and there will be no interface between them.
[0095] S3, "Deployment environment analysis module" reads the configuration files corresponding to the project and analyzes the deployment environment involved in the project. The analysis technologies used include but are not limited to: project startup configuration file analysis (for example: application-XXXX.proerties file of spring project) and deployment configuration file analysis (for example: xxx-values.yaml file of helm). Among them, Spring framework is an open source J2EE application framework initiated by Rod Johnson. It is a lightweight container for managing the life cycle of beans. Spring solves many common problems encountered by developers in J2EE development and provides powerful IOC, AOP and Web MVC functions. Spring can be used alone to build applications, or it can be used in combination with many Web frameworks such as Struts, Webwork, Tapestry, and can be combined with desktop application APs such as Swing. Therefore, Spring can be applied not only to J2EE applications, but also to desktop applications and small applications. Helm is the package manager of Kubernetes. The package manager is similar to apt used in Ubuntu, yum used in Centos, or pip in Python, which can quickly find, download and install software packages. Helm consists of the client component helm and the server component Tiller. It can package a set of K8S resources for unified management. It is the best way to find, share and use software built for Kubernetes.
[0096] S4, "Article Library Template Matching Module" matches the appropriate artifact library template according to the analysis results of steps 2 and 3, and generates an artifact library list. For example, in the aiops subproject of the srdcloud project, analysis found that docker images need to be produced as software artifacts, and their artifacts need to be deployed in production and test environments. According to the rules, the artifact library configuration templates of the docker release type and the docker snapshot type need to be matched, and two artifact libraries need to be generated, named respectively:
[0097] "srdcloud-aiops-docker-release-local" and "srdcloud-aiops-docker-snapshot-local".
[0098] AIOps refers to multi-layer technology platforms that use analytics and machine learning techniques to analyze big data collected from a variety of IT operation tools and devices, automatically identify and respond to problems in real time, and thus automate and enhance IT operations. Docker is an open source application container engine that allows developers to package their applications and dependent packages into a portable image, and then publish them to any popular Linux or Windows operating system machine, and can also achieve virtualization. Containers use a complete sandbox mechanism, and there will be no interface between them.
[0099] S5. The “user interaction module” displays the optional artifact library name and artifact library template configuration on the web interface.
[0100] S6. The user selects the required product library according to actual needs.
[0101] S7. The "product library creation module" creates a product library according to the user's selection and the configuration of the template.
[0102] Figure 4 FIG. 1 is a schematic diagram of a module of an embodiment of a software warehouse-based management system of the present invention. Figure 4 As shown, including but not limited to:
[0103] The information acquisition module 51 acquires the relevant information of the software project.
[0104] The first analysis module 52 reads the source code and configuration file corresponding to the software project to perform a first analysis.
[0105] The second analysis module 53 reads the configuration file corresponding to the project to perform a second analysis.
[0106] The name generation module 54 generates a product library name list based on preset rules according to the results of the first analysis and the second analysis.
[0107] The product library configuration module 55 selects one from the product library name list to configure and create a product library.
[0108] The implementation principle of the above modules can be found in the relevant introduction of the management method based on software warehouse, which will not be repeated here.
[0109] The software warehouse-based management system of the present invention can analyze various code bases, automatically determine the type of product and the environment in which the product is deployed, and perform standardized naming, thereby avoiding input errors caused by manual input or manual selection by users, reducing the difficulty of user use, and improving user experience.
[0110] Figure 5FIG. 1 is a module diagram of another embodiment of the management system based on software warehouse of the present invention. Figure 5 As shown, in Figure 4 On the basis of the device embodiment shown, the login authentication system based on hybrid encryption of the present invention also includes: the first analysis module 52 is replaced by the source code analysis module 521. The second analysis module 53 is replaced by the deployment environment analysis module 531. The name generation module 54 of the second analysis module 53 is replaced by the first category name module 541, the second category name module 542, the artifact library name module 543, and the name list module 544. The artifact library configuration module 55 is replaced by the name feedback module 551, the instruction receiving module 552, and the artifact library creation module 553. It also includes: the permission detection module 561 and the access permission module 562, and each step is explained below:
[0111] The business request module 50 is replaced by the state acquisition module 531, and the state response module 54 is replaced by the state response module 541. Each module is described below:
[0112] The information acquisition module 51 acquires the relevant information of the software project.
[0113] The source code analysis module 521 reads the source code and configuration files corresponding to the software project, and analyzes the programming language and publishing technology used in the project.
[0114] The deployment environment analysis module 531 reads the configuration file corresponding to the project, analyzes the deployment environment involved in the project, and the analysis technology of the deployment environment.
[0115] The first category name module 541 obtains a first category name according to the first analysis.
[0116] The second category name module 542 obtains a second category name according to the second analysis.
[0117] The product library name module 543 traverses the product library name list in the preset rule to obtain the product library name having both the first category name and the second category name.
[0118] The name list module 544 collects the product library names to generate a product library name list.
[0119] The name feedback module 551 feeds back the optional product library name and the default product library configuration.
[0120] The instruction receiving module 552 receives the instruction from the user to select a product library.
[0121] The product library creation module 553 creates a product library according to the product library name configuration selected by the user.
[0122] The permission detection module 561 detects the permission label of the user who accesses the product library.
[0123] The access permission module 562 determines whether the permission tag satisfies both the first category name and the second category name contained in the product library name. If so, the user is allowed to access the product library; if not, the user is denied access to the product library.
[0124] The implementation principle of the above model can be found in the relevant introduction of the management method based on software warehouse, which will not be repeated here.
[0125] The software warehouse-based management system of the present invention can analyze various code bases, automatically determine the type of product and the environment in which the product is deployed, and perform standardized naming, thereby avoiding input errors caused by manual input or manual selection by users, reducing the difficulty of user use, and improving user experience.
[0126] Figure 6 FIG. 1 is a module diagram of another embodiment of the management system based on software warehouse of the present invention. Figure 6 As shown, in a variation example, the technical solution of the present invention includes a product type analysis module (S101), a deployment environment analysis module (S102), a template management module (S103), a product library template matching module (S104), a user interaction module (S105), and a product warehouse creation module (S106). The function of each module is introduced below.
[0127] Artifact type analysis module: reads code and configuration from the code repository and analyzes the programming language and deployment technology used in the project.
[0128] Deployment environment analysis module: reads configuration from the code repository and analyzes the environment in which the project needs to be deployed.
[0129] Template management module: responsible for the management of preset product library templates.
[0130] Artifact library template matching module: matches the appropriate artifact library template according to the results obtained by the artifact type analysis module and the deployment environment analysis module.
[0131] User interaction module: presents the generated artifact library name and default artifact library configuration to the user for selection.
[0132] Product warehouse creation module: responsible for creating the product library according to the user's selection.
[0133] The following steps are implemented through the product type analysis module (S101), the deployment environment analysis module (S102), the template management module (S103), the product library template matching module (S104), the user interaction module (S105), and the product warehouse creation module (S106):
[0134] Step 1: Get relevant information about the project, including the project name (if it is a sub-project, the full project path is required), the code repository address corresponding to the project, and other information.
[0135] Step 2: The "Artifact Type Analysis Module" reads the source code and configuration files corresponding to the project, and analyzes the programming language and publishing technology used by the project.
[0136] Step 3: The "deployment environment analysis module" reads the configuration file corresponding to the project and analyzes the deployment environment involved in the project.
[0137] Step 4: The "name generation module" generates a product library name list based on the analysis results of steps 2 and 3 and certain rules.
[0138] Step 5: The "User Interaction Module" displays the optional artifact library names and the default artifact library configuration.
[0139] Step 6: The user selects the required product library name.
[0140] Step 7: The "Article Library Creation Module" creates the artifact library according to the user's selection.
[0141] The embodiment of the present invention further provides a management device based on a software warehouse, comprising a processor and a memory in which executable instructions of the processor are stored, wherein the processor is configured to execute the steps of the management method based on the software warehouse by executing the executable instructions.
[0142] As shown above, the software warehouse-based management system of this embodiment of the present invention can analyze various code bases, automatically determine the type of product and the environment in which the product is deployed, and perform standardized naming, thereby avoiding input errors caused by manual input or manual selection by users, reducing the difficulty of user use, and improving user experience.
[0143] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".
[0144] Figure 7 Schematic diagram of the structure of the management device based on the software warehouse of the present invention. Figure 7 The electronic device 600 according to this embodiment of the present invention is described. Figure 7The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0145] like Figure 7 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0146] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps of various exemplary embodiments of the present invention described in the electronic prescription circulation processing method section of this specification. For example, the processing unit 610 can execute the following steps: Figure 1 Follow the steps shown in .
[0147] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0148] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: a processing system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0149] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0150] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, etc.
[0151] The embodiment of the present invention also provides a computer-readable storage medium for storing a program, and the steps of the management method based on the software warehouse are implemented when the program is executed. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary embodiments of the present invention described in the above-mentioned electronic prescription circulation processing method section of this specification.
[0152] As shown above, the software warehouse-based management system of this embodiment of the present invention can analyze various code bases, automatically determine the type of product and the environment in which the product is deployed, and perform standardized naming, thereby avoiding input errors caused by manual input or manual selection by users, reducing the difficulty of user use, and improving user experience.
[0153] The program product 800 for implementing the above method according to an embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device.
[0154] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0155] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0156] Program code for performing the processes of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0157] In summary, the purpose of the present invention is to provide a management method, system, device and storage medium based on a software warehouse, which can analyze various code libraries, automatically determine the type of product and the environment in which the product is deployed, and perform standardized naming, thereby avoiding input errors caused by manual input or manual selection by users, reducing the difficulty of user use, and improving user experience.
[0158] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A management method based on software warehouse, characterized in that: include: Get relevant information about software projects; Reading the source code and configuration files corresponding to the software project for a first analysis includes: reading the source code and configuration files corresponding to the software project, analyzing the programming language and publishing technology used by the project, wherein the analysis includes at least one of: determining the programming language used based on the source code file name suffix analysis, determining the programming language and publishing technology used based on the project dependency configuration file analysis, and analyzing the project build script file; Reading a configuration file corresponding to the project for a second analysis includes: reading the configuration file corresponding to the project, analyzing the deployment environment involved in the project, and the analysis includes at least one of: project startup configuration file analysis and deployment configuration file analysis; According to the results of the first and second analyses, a product library name list is generated based on preset rules; Select a configuration from the Artifact Library Name list to create an artifact library.
2. The software warehouse-based management method according to claim 1, characterized in that: The obtaining of relevant information of the software project includes: Obtaining relevant information of the software project, when the software project is a main project, the relevant information at least includes the software project name and the code repository address corresponding to the software project; When the software project is a sub-project, the relevant information includes at least the software project name, the project path, and the code repository address corresponding to the software project.
3. The software warehouse-based management method according to claim 1, characterized in that: According to the results of the first analysis and the second analysis, a product library name list is generated based on preset rules, including: According to the analysis results of the source code and configuration files corresponding to the read software project and the deployment environment analysis results of the configuration files corresponding to the read project, a preset product library template is matched.
4. The software warehouse-based management method according to claim 3, characterized in that: According to the results of the first analysis and the second analysis, a product library name list is generated based on preset rules, including: Obtaining a first category name according to the first analysis; Obtaining a second category designation based on said second analysis; Traversing the product library name list in the preset rule to obtain product library names having both the first category name and the second category name; The product library names are collected to generate a product library name list.
5. The software warehouse-based management method according to claim 3, characterized in that: The step of creating a product library from the product library name list includes: Feedback on the optional artifact library names and default artifact library configurations; Receive instructions from users to select a product library; Create an artifact library according to the artifact library name configuration selected by the user.
6. The software warehouse-based management method according to claim 3, characterized in that: The product library template includes name generation rules, automatically generates the product library name, and presets the product library name for management.
7. The software warehouse-based management method according to claim 3, characterized in that: After selecting a configuration from the product library name list to create a product library, the method further includes: Detecting a permission tag of a user accessing the artifact library, wherein the permission tag at least includes at least one first-category name in a preset first-category name set and at least one second-category name in a preset second-category name set; When judging whether the permission tag satisfies both the first category name and the second category name contained in the product library name, if so, the user is allowed to access the product library, and if not, the user is denied access to the product library.
8. A management system based on software warehouse, characterized in that: include: Information acquisition module, to obtain relevant information of the software project; The first analysis module reads the source code and configuration files corresponding to the software project to perform the first analysis, including: reading the source code and configuration files corresponding to the software project, analyzing the programming language and the publishing technology used by the project, wherein the analysis includes at least: determining the programming language used based on the source code file name suffix analysis, determining the programming language and publishing technology used based on the project dependency configuration file analysis, and determining at least one of the following based on the project build script file analysis; The second analysis module reads the configuration file corresponding to the project for a second analysis, including: reading the configuration file corresponding to the project, analyzing the deployment environment involved in the project, and the analysis at least includes: at least one of the project startup configuration file analysis and the deployment configuration file analysis; The name generation module generates a product library name list based on preset rules according to the results of the first and second analyses; The product library configuration module selects one configuration from the product library name list to create a product library.
9. A management device based on a software warehouse, characterized in that: include: processor; a memory storing executable instructions of the processor; The processor is configured to execute the steps of the software repository-based management method according to any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the software repository-based management method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for managing test environment
CN113110992A