CN116382694A - Method for improving compiling speed of Maven engineering in container environment - Google Patents
Method for improving compiling speed of Maven engineering in container environment Download PDFInfo
- Publication number
- CN116382694A CN116382694A CN202310232084.0A CN202310232084A CN116382694A CN 116382694 A CN116382694 A CN 116382694A CN 202310232084 A CN202310232084 A CN 202310232084A CN 116382694 A CN116382694 A CN 116382694A
- Authority
- CN
- China
- Prior art keywords
- maven
- warehouse
- jenkins
- slave node
- compilation
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明实施例提供的一种提升容器环境下Maven工程编译速度的方法,首先,通过访问包含调度算法的Web程序,提交关于Gitlab仓库某条分支的编译任务;计算出该Gitlab仓库对应的执行的slave节点和对应的Mave n本地仓库,之后存储对应关系;将编译任务提交到Jenkins master;Jenk in master节点创建Jenkins job,并判断是否存在Jenkins job,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slav e节点;所述Jenkins slave节点先从Gitlab拉取指定仓库下指定分支代码,然后从Harbor拉取用于编译的镜像;将Maven本地仓库挂载,同时将代码仓库目录。本申请提出的一种提升容器环境下Maven工程编译速度的方法,提升了Maven工程在容器环境下的编译速度和持续集成效率。
The embodiment of the present invention provides a method for improving the compilation speed of a Maven project in a container environment. First, by accessing a Web program containing a scheduling algorithm, submit a compilation task for a certain branch of the Gitlab warehouse; calculate the execution time corresponding to the Gitlab warehouse. The slave node and the corresponding Mave n local warehouse, and then store the corresponding relationship; submit the compilation task to the Jenkins master; the Jenk in master node creates a Jenkins job, and judges whether there is a Jenkins job. If the Jenkins job does not exist, then according to the slave label , and issue the instructions for compiling task execution to the slave node; the Jenkins slave node first pulls the specified branch code from the specified warehouse from Gitlab, and then pulls the image for compilation from Harbor; mounts the Maven local warehouse, and at the same time Change the code warehouse directory. A method for improving the compilation speed of a Maven project in a container environment proposed by this application improves the compilation speed and continuous integration efficiency of a Maven project in a container environment.
Description
技术领域technical field
本发明涉及虚拟机安全技术领域,尤其涉及一种提升容器环境下Maven工程编译速度的方法。The invention relates to the technical field of virtual machine security, in particular to a method for improving the compilation speed of a Maven project in a container environment.
背景技术Background technique
在传统的软件开发过程中,源码编译这一重要环节都是在物理机上执行的,但是随着容器技术的成熟和普及,容器原生的优点,比如:环境统一标准化,让源码编译在容器环境下执行成为了一种更好的选择。In the traditional software development process, the important link of source code compilation is executed on the physical machine, but with the maturity and popularization of container technology, the advantages of container native, such as: unified and standardized environment, allowing source code to be compiled in the container environment Execution becomes a better option.
软件企业通常部署Jenkins+Nexus+Gitlab作为基于Maven的Java微服务的持续集成与交付工具。在编译阶段,Jenkins拉取安装了Maven和JDK的Docker镜像,并创建容器,在容器环境里执行编译,编译结束后销毁容器。在容器环境下编译代码,有安全、环境标准统一等容器带来的优点,但是因为容器用完即毁,Maven本地仓库也会随之销毁,这就导致每次编译都得重新从Nexus拉取pom中的包和插件(本专利后面统一用包指代包和插件),从而导致编译速度慢,持续集成效率低的问题。本专利解决Maven工程在容器环境下编译速度慢的问题。Software companies usually deploy Jenkins+Nexus+Gitlab as a continuous integration and delivery tool for Maven-based Java microservices. In the compilation phase, Jenkins pulls the Docker image with Maven and JDK installed, creates a container, executes compilation in the container environment, and destroys the container after the compilation is completed. Compiling code in a container environment has the advantages of containers such as security and unified environmental standards. However, because the container is destroyed when it is used up, the Maven local warehouse will also be destroyed, which leads to re-pulling from Nexus for each compilation. Packages and plug-ins in the pom (packages are used to refer to packages and plug-ins later in this patent), resulting in slow compilation speed and low continuous integration efficiency. This patent solves the problem of slow compilation speed of Maven projects in a container environment.
发明内容Contents of the invention
本发明实施例提供一种提升容器环境下Maven工程编译速度的方法,旨在解决或者部分解决上述技术问题。An embodiment of the present invention provides a method for improving the compilation speed of a Maven project in a container environment, aiming at solving or partially solving the above-mentioned technical problems.
为了解决上述技术问题,本发明是这样实现的:In order to solve the problems of the technologies described above, the present invention is achieved in that:
在本申请的第一方面,提供了一种提升容器环境下Maven工程编译速度的方法,方法包括:访问包含调度算法的Web程序,提交关于Gitlab仓库某条分支的编译任务;计算出该Gitlab仓库对应的执行的slave节点和对应的Maven本地仓库,之后存储对应关系;将编译任务提交到Jenkins mas ter;Jenkin master节点创建Jenkins job,并判断是否存在Jenkins job,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slave节点;所述Jenkins slave节点先从Gitlab拉取指定仓库下指定分支代码,然后从Harbor拉取用于编译的镜像;将Maven本地仓库挂载,同时将代码仓库目录。In the first aspect of the present application, a method for improving the compilation speed of a Maven project in a container environment is provided. The method includes: accessing a Web program containing a scheduling algorithm, submitting a compilation task about a branch of a Gitlab warehouse; calculating the Gitlab warehouse The corresponding execution slave node and the corresponding Maven local warehouse, and then store the corresponding relationship; submit the compilation task to the Jenkins master; the Jenkin master node creates a Jenkins job, and judges whether there is a Jenkins job. If the Jenkins job does not exist, then According to the slave label, the instruction for compiling task execution is issued to the slave node; the Jenkins slave node first pulls the specified branch code from the specified warehouse from Gitlab, and then pulls the image for compilation from Harbor; mounts the Maven local warehouse , and at the same time add the code warehouse directory.
在一些实施方式中,所述方法还包括:在容器环境中执行Maven命令进行编译打包。In some implementation manners, the method further includes: executing Maven commands in the container environment to compile and package.
在一些实施方式中,所述方法还包括:在编译结束后,清理workspace,并销毁容器环境。In some implementation manners, the method further includes: cleaning up the workspace and destroying the container environment after the compilation is completed.
在一些实施方式中,所述Jenkin master节点创建Jenkins job,并判断是否存在Jenkins job,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slave节点,包括:选择目前Maven本地仓库最少的slave节点,记录Gitlab仓库和slave节点下Maven本地仓库对应关系;若没有Maven本地仓库配额,则报错提示联系管理员,进行slave节点扩容。In some embodiments, the Jenkin master node creates a Jenkins job, and judges whether there is a Jenkins job. If the Jenkins job does not exist, then according to the slave label, the command for executing the compilation task is sent to the slave node, including: selecting At present, the slave node with the least Maven local warehouse, records the corresponding relationship between the Gitlab warehouse and the Maven local warehouse under the slave node; if there is no Maven local warehouse quota, an error message will be prompted to contact the administrator to expand the slave node.
在一些实施方式中,所述Jenkin master节点创建Jenkins job,并判断是否存在Jenkins job,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slave节点,还包括:该Maven工程再次编译时,优先调度到第一次编译时的节点,并挂载对应的Maven本地仓库;若该slave节点是非活状态,则再次选择目前Maven本地仓库最少的slave节点,记录Gitlab仓库和slave节点下Maven本地仓库对应关系;若没有Maven本地仓库配额,则报错提示联系管理员,进行slave节点扩容。In some embodiments, the Jenkin master node creates a Jenkins job, and judges whether there is a Jenkins job. If the Jenkins job does not exist, then according to the slave label, the instruction for executing the compilation task is sent to the slave node, which also includes: When the Maven project is recompiled, the node at the time of the first compilation is prioritized, and the corresponding Maven local warehouse is mounted; if the slave node is in an inactive state, the slave node with the least Maven local warehouse is selected again, and the Gitlab warehouse is recorded It corresponds to the Maven local warehouse under the slave node; if there is no Maven local warehouse quota, an error will be reported and the administrator will be prompted to expand the slave node.
在一些实施方式中,还包括:清理编译次数最少的30%的Gitlab仓库所对应的Maven本地仓库,用来回收Maven本地仓库资源。In some implementation manners, it also includes: cleaning up Maven local warehouses corresponding to 30% of the Gitlab warehouses with the least number of compilations, so as to recycle Maven local warehouse resources.
在一些实施方式中,所述清理编译的清理周期为一个月。In some implementations, the cleanup period of the cleanup compilation is one month.
在一些实施方式中,每个所述slave都有一个唯一可以标识的标签。In some embodiments, each slave has a uniquely identifiable label.
在一些实施方式中,所述Git服务器使用Gitlab。In some implementations, the Git server uses Gitlab.
在一些实施方式中,所述Maven私服使用Nexus。In some implementations, the Maven private server uses Nexus.
第二方面,本申请提供了一种提升容器环境下Maven工程编译速度的装置,装置包括:In the second aspect, the present application provides a device for improving the compilation speed of Maven projects in a container environment, and the device includes:
访问模块,说书访问模块用于访问包含调度算法的Web程序,提交关于Gitlab仓库某条分支的编译任务;The access module, the storytelling access module is used to access the web program containing the scheduling algorithm, and submit the compilation task of a certain branch of the Gitlab warehouse;
计算模块,所述计算模块用于计算出该Gitlab仓库对应的执行的slav e节点和对应的Maven本地仓库,之后存储对应关系;Computing module, described computing module is used for computing the slave node and the corresponding Maven local warehouse of the corresponding execution of this Gitlab warehouse, store correspondence afterwards;
提交模块,所述提交模块将编译任务提交到Jenkins master;A submission module, the submission module submits the compilation task to the Jenkins master;
创建模块,所述创建模块用于Jenkin master节点创建Jenkins job,并判断是否存在Jenkins job,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slave节点;Create a module, the creation module is used for the Jenkin master node to create a Jenkins job, and judge whether there is a Jenkins job, if there is no Jenkins job, then according to the slave label, the instruction for compiling task execution is sent to the slave node;
拉取模块,所述拉取模块用于所述Jenkins slave节点先从Gitlab拉取指定仓库下指定分支代码,然后从Harbor拉取用于编译的镜像;Pulling module, the pulling module is used for the Jenkins slave node to pull the specified branch code under the specified warehouse from Gitlab first, and then pull the image for compiling from Harbor;
挂载模块,所述挂载模块用于将Maven本地仓库挂载,同时将代码仓库目录。The mounting module is used to mount the Maven local warehouse and the code warehouse directory at the same time.
本发明实施例第三方面,提供了一种电子设备,电子设备包括:In the third aspect of the embodiment of the present invention, an electronic device is provided, and the electronic device includes:
至少一个处理器;以及,at least one processor; and,
与至少一个处理器通信连接的存储器;其中,memory communicatively coupled to at least one processor; wherein,
存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行本发明实施例第一方面提出方法步骤。The memory stores instructions executable by at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method steps provided in the first aspect of the embodiments of the present invention.
本发明实施例第四方面,提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现本发明实施例第一方面提出方法步骤。A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the method steps provided in the first aspect of the embodiments of the present invention are implemented.
本发明实施例提供的一种提升容器环境下Maven工程编译速度的方法,首先,通过访问包含调度算法的Web程序,提交关于Gitlab仓库某条分支的编译任务;计算出该Gitlab仓库对应的执行的slave节点和对应的Mave n本地仓库,之后存储对应关系;将编译任务提交到Jenkins master;Jenk in master节点创建Jenkins job,并判断是否存在Jenkinsjob,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slav e节点;所述Jenkins slave节点先从Gitlab拉取指定仓库下指定分支代码,然后从Harbor拉取用于编译的镜像;将Maven本地仓库挂载,同时将代码仓库目录。本申请提出的一种提升容器环境下Maven工程编译速度的方法,提升了Maven工程在容器环境下的编译速度和持续集成效率。The embodiment of the present invention provides a method for improving the compilation speed of a Maven project in a container environment. First, by accessing a Web program containing a scheduling algorithm, submit a compilation task about a certain branch of the Gitlab warehouse; calculate the execution time corresponding to the Gitlab warehouse. The slave node and the corresponding Mave n local warehouse, and then store the corresponding relationship; submit the compilation task to the Jenkins master; the Jenk in master node creates a Jenkins job, and judges whether there is a Jenkins job. If the Jenkins job does not exist, then according to the slave label, Send the instructions for compiling task execution to the slave node; the Jenkins slave node first pulls the specified branch code under the specified warehouse from Gitlab, and then pulls the image used for compilation from Harbor; mounts the Maven local warehouse, and at the same time Code repository directory. A method for improving the compilation speed of a Maven project in a container environment proposed by this application improves the compilation speed and continuous integration efficiency of a Maven project in a container environment.
1.充分利用了Maven本地仓库。本方案每次拉起用于编译的容器,都会把宿主Maven本地仓库挂载到容器上。1. Make full use of the Maven local warehouse. This solution will mount the host Maven local warehouse to the container every time the container used for compilation is pulled up.
2.解决了容器环境下更新Maven本地仓库元文件时编译卡住的问题。2. Solved the problem of compiling stuck when updating the Maven local warehouse metafile in the container environment.
3.编译任务使用了独立的Maven本地仓库,Maven本地仓库数量均匀分布在宿主机上。静态编译任务均匀分布在Jenkins slave节点上。3. The compilation task uses an independent Maven local warehouse, and the number of Maven local warehouses is evenly distributed on the host machine. Static compilation tasks are evenly distributed on the Jenkins slave nodes.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本申请实施例方案涉及的硬件运行环境的电子设备结构示意图;FIG. 1 is a schematic structural diagram of an electronic device in a hardware operating environment involved in an embodiment of the present application;
图2为根据一示例性实施例示出的一种提升容器环境下Maven工程编译速度的方法的流程图;Fig. 2 is a flow chart showing a method for improving Maven project compilation speed in a container environment according to an exemplary embodiment;
图3为根据一示例性实施例示出的一种提升容器环境下Maven工程编译速度的方法中Maven拉取依赖包流程图;FIG. 3 is a flow chart of Maven pulling dependent packages in a method for improving the compilation speed of a Maven project in a container environment according to an exemplary embodiment;
图4为根据一示例性实施例示出的一种提升容器环境下Maven工程编译速度的方法中基于Kurbenetes部署的Jenkins的示意图;Fig. 4 is a schematic diagram of Jenkins based on Kurbenetes deployment in a method for improving Maven project compilation speed in a container environment according to an exemplary embodiment;
图5为根据一示例性实施例示出的一种提升容器环境下Maven工程编译速度的方法中改进后的Maven本地仓库挂载方案示意图;5 is a schematic diagram of an improved Maven local warehouse mounting scheme in a method for improving the Maven project compilation speed in a container environment according to an exemplary embodiment;
图6为根据一示例性实施例示出的一种提升容器环境下Maven工程编译速度的方法中资源分配与任务调度流程图;Fig. 6 is a flow chart of resource allocation and task scheduling in a method for improving Maven project compilation speed in a container environment according to an exemplary embodiment;
图7为根据一示例性实施例示出的一种提升容器环境下Maven工程编译速度的方法中资源回收流程图;FIG. 7 is a flow chart of resource recovery in a method for improving Maven project compilation speed in a container environment according to an exemplary embodiment;
图8为根据一示例性实施例示出的一种提升容器环境下Maven工程编译速度的方法中架构图。Fig. 8 is a structural diagram of a method for improving the compilation speed of a Maven project in a container environment according to an exemplary embodiment.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.
在现有技术中,安全域是一种引导网络业务报文按次序通过安全服务节点(Security Node)的技术,它结合SDN(Software Defined Network,软件定义网络)来实现业务编排,引导网络报文按照要求的顺序通过安全节点进行处理和转发。安全服务节点是网络中处理某种业务的设备,可以是物理设备,也可以是NFV(Network FunctionVirtualisation,网络功能虚拟化)设备。一条安全域服务链上可以存在多个服务节点。各安全服务节点根据安全服务列表指定安全服务类型对报文进行处理。安全服务列表用于指定服务的类型及处理顺序,目前典型的服务类型包括FW、ACG、DPI和IPS等节点。In the existing technology, the security domain is a technology that guides network service packets to pass through the security service node (Security Node) in sequence. It combines SDN (Software Defined Network, software-defined network) to realize business orchestration and guide network packets It is processed and forwarded through the security nodes in the required order. The security service node is a device that processes certain services in the network, and may be a physical device or an NFV (Network Function Virtualization, network function virtualization) device. There can be multiple service nodes on a security domain service chain. Each security service node processes the message according to the security service type specified in the security service list. The security service list is used to specify the service type and processing sequence. Currently, typical service types include nodes such as FW, ACG, DPI, and IPS.
有用于编译的容器在拉起时,都挂载容器所在宿主机上的Maven本地仓库目录,这样Maven本地仓库就不会随着容器的销毁而销毁,从而达到提升编译速度的目的。这一方案在实践中会发现是有缺陷的。当同一时刻,有多个Maven工程被分配到同一个Jenkinsslave节点编译时,如果在编译过程中同时去下载同一快照版本的包时,会被卡在下载元文件maven-metadata.xml文件处。When the container used for compilation is pulled up, the Maven local warehouse directory on the host machine where the container is located is mounted, so that the Maven local warehouse will not be destroyed with the destruction of the container, thereby achieving the purpose of improving the compilation speed. This solution can be found to be flawed in practice. When multiple Maven projects are assigned to the same Jenkins slave node for compilation at the same time, if you download the package of the same snapshot version at the same time during the compilation process, you will be stuck at the place where the metafile maven-metadata.xml is downloaded.
Maven工程编译拉取依赖包原理是本专利中重要的基础技术。本专利中Maven工程编译的前置条件如下:The principle of Maven project compiling and pulling dependent packages is an important basic technology in this patent. The prerequisites for Maven project compilation in this patent are as follows:
1.Maven工程pom文件中配置仓库和插件地址均为Maven私服Nexus的地址;1. The configuration warehouse and plug-in addresses in the Maven project pom file are both the addresses of the Maven private server Nexus;
2.Maven工程编译命令:mvn–U clean package-Dmaven.test.skip=true;2. Maven project compilation command: mvn–U clean package-Dmaven.test.skip=true;
3.Maven工程依赖的所有快照版本的包均为用户自研,并发布到Maven私服Nexus;3. All the snapshot version packages that the Maven project depends on are self-developed by the user and published to the Maven private server Nexus;
4.本专利中的Maven远程仓库只有Maven私服Nexus和Maven中央仓库,并没有其它官方的远程仓库。4. The Maven remote warehouse in this patent only has Maven private server Nexus and Maven central warehouse, and there is no other official remote warehouse.
Maven依赖包分为正式版和快照版两种。对于这两种版本依赖包的拉取顺序,如图1流程图中所示:Maven dependency packages are divided into official version and snapshot version. The pull order of the dependent packages of these two versions is shown in the flowchart in Figure 1:
对于正式版依赖包,For the official version of the dependent package,
1.检查Maven本地仓库是否存在,存在则结束;否则1. Check whether the Maven local warehouse exists, and end if it exists; otherwise
2.检查Maven私服Nexus是否存在,存在则从Nexus上拉取到本地Mav en仓库;否则2. Check whether the Maven private server Nexus exists, and if it exists, pull it from the Nexus to the local Maven warehouse; otherwise
3.检查Maven中央仓库是否存在,存在则从中央仓库拉取到Maven私服Nexus上,然后再拉取到本地Maven仓库;如果Maven中央仓库不存在该包,则会编译失败。3. Check whether the Maven central warehouse exists. If it exists, pull it from the central warehouse to the Maven private server Nexus, and then pull it to the local Maven warehouse; if the package does not exist in the Maven central warehouse, the compilation will fail.
对于快照版依赖包,For snapshot version dependencies,
1.拉取依赖包元数据文件,检查是否存在最新快照版本,不存在则结束,否则1. Pull the dependency package metadata file, check whether there is the latest snapshot version, and end if it does not exist, otherwise
2.从Nexus上拉取最新快照版本包到Maven本地仓库。2. Pull the latest snapshot version package from Nexus to the Maven local warehouse.
产生上述问题的原因是编译命令中的-U参数,具体命令是mvn–U cle anpackage-Dmaven.test.skip=true。这一命令中的-U参数含义为强制刷新本地仓库缺失的正式版包和所有快照版包。对于快照版本包,需要对比Maven私服上的maven-metadata.xml文件和Maven本地仓库中的maven-meta data-snapshots.xml文件中的lastUpdated字段,该字段是个时间戳,如果决定是否下载该快照的包,并且更新maven-metadata-snapshots.xml文件。多个进程同时修改maven-metadata-snapshots.xml文件时,导致死锁。这里maven-metadata-snapshots.xml文件名中的snapshots是因为Maven私服Nexus上的快照版本仓库名称为snapshots。The reason for the above problem is the -U parameter in the compilation command, the specific command is mvn–U cle anpackage-Dmaven.test.skip=true. The -U parameter in this command means to forcibly refresh the official version package and all snapshot version packages missing from the local warehouse. For the snapshot version package, you need to compare the lastUpdated field in the maven-metadata.xml file on the Maven private server and the maven-meta data-snapshots.xml file in the Maven local warehouse. This field is a timestamp. If you decide whether to download the snapshot package, and update the maven-metadata-snapshots.xml file. When multiple processes modify the maven-metadata-snapshots.xml file at the same time, a deadlock is caused. The snapshots in the maven-metadata-snapshots.xml file name here is because the name of the snapshot version warehouse on the Maven private server Nexus is snapshots.
基于此,本申请提出了一种提升容器环境下Maven工程编译速度的方法,以改善上述问题。Based on this, the present application proposes a method for improving the compilation speed of a Maven project in a container environment, so as to improve the above problems.
参见图1,图1为本申请实施例方案涉及的硬件运行环境的电子设备结构示意图。Referring to FIG. 1 , FIG. 1 is a schematic structural diagram of an electronic device in a hardware operating environment involved in the solution of the embodiment of the present application.
如图1所示,该电子设备可以包括:处理器1001,例如中央处理器(CentralProcessing Unit,CPU),通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyb oard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如无线保真(WIreles s-FIdelity,WI-FI)接口)。存储器1005可以是高速的随机存取存储器(Ra ndomAccess Memory,RAM)存储器,也可以是稳定的非易失性存储器(Non-Volatile Memory,N虚拟机),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , the electronic device may include: a
本领域技术人员可以理解,图1中示出的结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 1 does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine some components, or arrange different components.
如图1所示,作为一种存储介质的存储器1005中可以包括操作装置、数据存储模块、网络通信模块、用户接口模块以及电子程序。As shown in FIG. 1 , the
在图1所示的电子设备中,网络接口1004主要用于与网络服务器进行数据通信;用户接口1003主要用于与用户进行数据交互;本发明电子设备中的处理器1001、存储器1005可以设置在电子设备中,电子设备通过处理器1001调用存储器1005中存储的电子程序,并执行本申请实施例提供的提升容器环境下Maven工程编译速度的方法。In the electronic device shown in Figure 1, the
参照图2,基于前述硬件运行环境,本申请的实施例提供了一种提升容器环境下Maven工程编译速度的方法,该方法包括:Referring to Fig. 2, based on the aforementioned hardware operating environment, embodiments of the present application provide a method for improving the Maven project compilation speed in a container environment, the method comprising:
S201:访问包含调度算法的Web程序,提交关于Gitlab仓库某条分支的编译任务;S201: access the web program containing the scheduling algorithm, and submit a compilation task about a certain branch of the Gitlab warehouse;
S202:计算出该Gitlab仓库对应的执行的slave节点和对应的Maven本地仓库,之后存储对应关系;S202: Calculate the corresponding execution slave node and the corresponding Maven local warehouse of the Gitlab warehouse, and then store the corresponding relationship;
S203:将编译任务提交到Jenkins master;S203: Submit the compilation task to the Jenkins master;
Jenkin master节点创建Jenkins job,并判断是否存在Jenkins job,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slave节点;The Jenkin master node creates a Jenkins job, and judges whether there is a Jenkins job. If the Jenkins job does not exist, then according to the slave label, the command to execute the compilation task is sent to the slave node;
S204:所述Jenkins slave节点先从Gitlab拉取指定仓库下指定分支代码,然后从Harbor拉取用于编译的镜像;S204: The Jenkins slave node first pulls the specified branch code under the specified warehouse from Gitlab, and then pulls the image for compiling from Harbor;
S205:将Maven本地仓库挂载,同时将代码仓库目录。S205: Mount the Maven local warehouse, and at the same time, the code warehouse directory.
请一并参阅图3、图4、图5、图6、图7及图8。Jenkins有一种部署方式,是基于Kurbenetes集群的,该部署方式下的编译任务原生就是在容器环境下执行的。在基于Kurbenetes集群Jenkins中,master节点和所有slave节点都是运行在k8s集群。其中,Jenkins master节点会持久化存储一些有状态的数据,而Jenkins slave节点是完全无状态的。每当Jenkins master节点接收到一个编译任务请求时,就会自动创建一个slave节点,并建立与master节点的连接,当编译任务完成时,slave节点会自动销毁。因为slave节点是无状态的,Maven本地仓库也随着slave节点的销毁而销毁,所以在slave节点下每次执行编译任务时,都需要重新从Maven私服Nexus拉取依赖包,这就大大降低了编译速度和持续集成的效率。Please also refer to FIG. 3 , FIG. 4 , FIG. 5 , FIG. 6 , FIG. 7 and FIG. 8 . Jenkins has a deployment method based on the Kurbenetes cluster. The compilation tasks in this deployment method are originally executed in the container environment. In Jenkins based on the Kurbenetes cluster, the master node and all slave nodes run on the k8s cluster. Among them, the Jenkins master node will persistently store some stateful data, while the Jenkins slave node is completely stateless. Whenever the Jenkins master node receives a compilation task request, it will automatically create a slave node and establish a connection with the master node. When the compilation task is completed, the slave node will be automatically destroyed. Because the slave node is stateless, the Maven local warehouse is also destroyed with the destruction of the slave node, so every time the compilation task is executed under the slave node, the dependency package needs to be pulled from the Maven private server Nexus again, which greatly reduces the Compilation speed and continuous integration efficiency.
具体算法流程如下:The specific algorithm flow is as follows:
1.Gitlab仓库Maven工程第一次编译时,选择目前Maven本地仓库最少的slave节点,记录Gitlab仓库和slave节点下Maven本地仓库对应关系;若没有Maven本地仓库配额,则报错提示联系管理员,进行slave节点扩容。1. When the Gitlab warehouse Maven project is compiled for the first time, select the slave node with the least Maven local warehouse at present, and record the corresponding relationship between the Gitlab warehouse and the Maven local warehouse under the slave node; if there is no Maven local warehouse quota, an error message will be prompted to contact the administrator to proceed Slave node expansion.
2.当该Maven工程再次编译时,优先调度到第一次编译时的节点,并挂载对应的Maven本地仓库;若该slave节点是非活状态,执行1过程;2. When the Maven project is recompiled, it is first scheduled to the node at the time of the first compilation, and the corresponding Maven local warehouse is mounted; if the slave node is in an inactive state, execute 1 process;
3.每月末定期清理编译次数最少的30%的Gitlab仓库所对应的Maven本地仓库,用来回收Maven本地仓库资源。3. Regularly clean up the Maven local warehouses corresponding to 30% of the Gitlab warehouses with the least compilation times at the end of each month to recycle Maven local warehouse resources.
需要说明的是,每台宿主机上的Maven本地仓库配额、清理规则中的时长和清理Maven本地仓库的比例都是可以配置的。这些具体参数的值需要根据在实践中的具体情况进行配置。It should be noted that the Maven local warehouse quota on each host machine, the duration in the cleanup rule, and the proportion of the Maven local warehouse cleanup are all configurable. The values of these specific parameters need to be configured according to specific situations in practice.
在一些实施方式中,所述方法还包括:在容器环境中执行Maven命令进行编译打包。In some implementation manners, the method further includes: executing Maven commands in the container environment to compile and package.
在一些实施方式中,所述方法还包括:在编译结束后,清理workspace,并销毁容器环境。In some implementation manners, the method further includes: cleaning up the workspace and destroying the container environment after the compilation is completed.
在一些实施方式中,所述Jenkin master节点创建Jenkins job,并判断是否存在Jenkins job,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slave节点,包括:选择目前Maven本地仓库最少的slave节点,记录Gitlab仓库和slave节点下Maven本地仓库对应关系;若没有Maven本地仓库配额,则报错提示联系管理员,进行slave节点扩容。In some embodiments, the Jenkin master node creates a Jenkins job, and judges whether there is a Jenkins job. If the Jenkins job does not exist, then according to the slave label, the command for executing the compilation task is sent to the slave node, including: selecting At present, the slave node with the least Maven local warehouse, records the corresponding relationship between the Gitlab warehouse and the Maven local warehouse under the slave node; if there is no Maven local warehouse quota, an error message will be prompted to contact the administrator to expand the slave node.
在一些实施方式中,所述Jenkin master节点创建Jenkins job,并判断是否存在Jenkins job,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slave节点,还包括:该Maven工程再次编译时,优先调度到第一次编译时的节点,并挂载对应的Maven本地仓库;若该slave节点是非活状态,则再次选择目前Maven本地仓库最少的slave节点,记录Gitlab仓库和slave节点下Maven本地仓库对应关系;若没有Maven本地仓库配额,则报错提示联系管理员,进行slave节点扩容。In some embodiments, the Jenkin master node creates a Jenkins job, and judges whether there is a Jenkins job. If the Jenkins job does not exist, then according to the slave label, the instruction for executing the compilation task is sent to the slave node, which also includes: When the Maven project is recompiled, the node at the time of the first compilation is prioritized, and the corresponding Maven local warehouse is mounted; if the slave node is in an inactive state, the slave node with the least Maven local warehouse is selected again, and the Gitlab warehouse is recorded It corresponds to the Maven local warehouse under the slave node; if there is no Maven local warehouse quota, an error will be reported and the administrator will be prompted to expand the slave node.
Program为包含了提升容器环境下Maven工程编译速度的方法的自研We b程序;Jenkins使用master-slave的部署方式,master负责调度,slave负责具体任务的执行,每个slave都有一个唯一可以标识的标签;Git服务器使用Gitlab;Maven私服使用Nexus,Nexus可以出公网拉取Maven中央仓库的包。Program is a self-developed Web program that includes methods to improve the compilation speed of Maven projects in a container environment; Jenkins uses the master-slave deployment method, the master is responsible for scheduling, and the slave is responsible for the execution of specific tasks. Each slave has a unique identifier label; the Git server uses Gitlab; the Maven private server uses Nexus, and Nexus can pull the packages from the Maven central warehouse out of the public network.
整体执行流程如下:The overall execution process is as follows:
1.用户访问包含调度算法的Web程序,提交关于某个Gitlab仓库某条分支的编译任务;1. The user accesses the web program containing the scheduling algorithm and submits a compilation task for a certain branch of a certain Gitlab warehouse;
2.根据自研算法,计算出该Gitlab仓库对应的执行的slave节点和对应的Maven本地仓库,并将该对应关系存储起来,然后将编译任务提交到Jenkins master;2. Calculate the execution slave node corresponding to the Gitlab warehouse and the corresponding Maven local warehouse according to the self-developed algorithm, store the corresponding relationship, and then submit the compilation task to the Jenkins master;
3.Jenkin master节点创建Jenkins job,如果Jenkins job不存在,然后根据slave标签,将编译任务执行的指令下发到slave节点;3. The Jenkin master node creates a Jenkins job. If the Jenkins job does not exist, then according to the slave label, the command to execute the compilation task is sent to the slave node;
4.Jenkins slave节点先从Gitlab拉取指定仓库下指定分支的代码,然后从Harbor拉取用于编译的镜像,创建容器时将分配好的Maven本地仓库挂载进去,同时将代码仓库目录,即:slave节点下该job的workspace目录也挂载到容器中,最后在容器环境中执行Maven命令进行编译打包。编译结束后,清理workspace,并销毁容器环境。4. The Jenkins slave node first pulls the code of the specified branch under the specified warehouse from Gitlab, and then pulls the image for compilation from Harbor. When creating the container, it mounts the allocated Maven local warehouse, and at the same time, the code warehouse directory, namely : The workspace directory of the job under the slave node is also mounted to the container, and finally execute the Maven command in the container environment to compile and package. After compilation, clean up the workspace and destroy the container environment.
在一些实施方式中,还包括:清理编译次数最少的30%的Gitlab仓库所对应的Maven本地仓库,用来回收Maven本地仓库资源。In some implementation manners, it also includes: cleaning up Maven local warehouses corresponding to 30% of the Gitlab warehouses with the least number of compilations, so as to recycle Maven local warehouse resources.
在一些实施方式中,所述清理编译的清理周期为一个月。In some implementations, the cleanup period of the cleanup compilation is one month.
在一些实施方式中,每个所述slave都有一个唯一可以标识的标签。In some embodiments, each slave has a uniquely identifiable label.
在一些实施方式中,所述Git服务器使用Gitlab。In some implementations, the Git server uses Gitlab.
在一些实施方式中,所述Maven私服使用Nexus。In some implementations, the Maven private server uses Nexus.
本发明实施例提供的一种提升容器环境下Maven工程编译速度的方法,首先,通过访问包含调度算法的Web程序,提交关于Gitlab仓库某条分支的编译任务;计算出该Gitlab仓库对应的执行的slave节点和对应的Mave n本地仓库,之后存储对应关系;将编译任务提交到Jenkins master;Jenk in master节点创建Jenkins job,并判断是否存在Jenkinsjob,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slav e节点;所述Jenkins slave节点先从Gitlab拉取指定仓库下指定分支代码,然后从Harbor拉取用于编译的镜像;将Maven本地仓库挂载,同时将代码仓库目录。本申请提出的一种提升容器环境下Maven工程编译速度的方法,提升了Maven工程在容器环境下的编译速度和持续集成效率。The embodiment of the present invention provides a method for improving the compilation speed of a Maven project in a container environment. First, by accessing a Web program containing a scheduling algorithm, submit a compilation task about a certain branch of the Gitlab warehouse; calculate the execution time corresponding to the Gitlab warehouse. The slave node and the corresponding Mave n local warehouse, and then store the corresponding relationship; submit the compilation task to the Jenkins master; the Jenk in master node creates a Jenkins job, and judges whether there is a Jenkins job. If the Jenkins job does not exist, then according to the slave label, Send the instructions for compiling task execution to the slave node; the Jenkins slave node first pulls the specified branch code under the specified warehouse from Gitlab, and then pulls the image used for compilation from Harbor; mounts the Maven local warehouse, and at the same time Code repository directory. A method for improving the compilation speed of a Maven project in a container environment proposed by this application improves the compilation speed and continuous integration efficiency of a Maven project in a container environment.
第二方面,本申请提供了一种提升容器环境下Maven工程编译速度的装置,装置包括:In the second aspect, the present application provides a device for improving the compilation speed of Maven projects in a container environment, and the device includes:
访问模块,说书访问模块用于访问包含调度算法的Web程序,提交关于Gitlab仓库某条分支的编译任务;The access module, the storytelling access module is used to access the web program containing the scheduling algorithm, and submit the compilation task of a certain branch of the Gitlab warehouse;
计算模块,所述计算模块用于计算出该Gitlab仓库对应的执行的slav e节点和对应的Maven本地仓库,之后存储对应关系;Computing module, described computing module is used for computing the slave node and the corresponding Maven local warehouse of the corresponding execution of this Gitlab warehouse, store correspondence afterwards;
提交模块,所述提交模块将编译任务提交到Jenkins master;A submission module, the submission module submits the compilation task to the Jenkins master;
创建模块,所述创建模块用于Jenkin master节点创建Jenkins job,并判断是否存在Jenkins job,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slave节点;Create a module, the creation module is used for the Jenkin master node to create a Jenkins job, and judge whether there is a Jenkins job, if there is no Jenkins job, then according to the slave label, the instruction for compiling task execution is sent to the slave node;
拉取模块,所述拉取模块用于所述Jenkins slave节点先从Gitlab拉取指定仓库下指定分支代码,然后从Harbor拉取用于编译的镜像;Pulling module, the pulling module is used for the Jenkins slave node to pull the specified branch code under the specified warehouse from Gitlab first, and then pull the image for compiling from Harbor;
挂载模块,所述挂载模块用于将Maven本地仓库挂载,同时将代码仓库目录。The mounting module is used to mount the Maven local warehouse and the code warehouse directory at the same time.
在一些实施方式中,所述创建模块还用于:选择目前Maven本地仓库最少的slave节点,记录Gitlab仓库和slave节点下Maven本地仓库对应关系;若没有Maven本地仓库配额,则报错提示联系管理员,进行slave节点扩容。In some implementations, the creation module is also used to: select the slave node with the least Maven local warehouse at present, record the corresponding relationship between the Gitlab warehouse and the Maven local warehouse under the slave node; if there is no Maven local warehouse quota, then report an error and prompt to contact the administrator , to expand the slave node.
在一些实施方式中,所述创建模块还用于所述Jenkin master节点创建Jenkinsjob,并判断是否存在Jenkins job,若不存在所述Jenkins job,则根据slave标签,将编译任务执行的指令下发到slave节点,还包括:该Maven工程再次编译时,优先调度到第一次编译时的节点,并挂载对应的Ma ven本地仓库;若该slave节点是非活状态,则再次选择目前Maven本地仓库最少的slave节点,记录Gitlab仓库和slave节点下Maven本地仓库对应关系;若没有Maven本地仓库配额,则报错提示联系管理员,进行slave节点扩容。In some implementations, the creation module is also used for the Jenkin master node to create a Jenkinsjob, and judge whether there is a Jenkins job, if there is no Jenkins job, then according to the slave label, the command to execute the compilation task is sent to The slave node also includes: when the Maven project is recompiled, the node at the time of the first compilation is prioritized, and the corresponding Maven local warehouse is mounted; if the slave node is inactive, the current Maven local warehouse with the least amount is selected again slave node, record the corresponding relationship between the Gitlab warehouse and the Maven local warehouse under the slave node; if there is no Maven local warehouse quota, an error message will be prompted to contact the administrator to expand the slave node.
基于同一发明构思,本申请的实施例还提供一种电子设备,电子设备包括:Based on the same inventive concept, an embodiment of the present application also provides an electronic device, the electronic device includes:
至少一个处理器;以及,at least one processor; and,
与至少一个处理器通信连接的存储器;其中,memory communicatively coupled to at least one processor; wherein,
存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述方法。The memory stores instructions executable by at least one processor, and the instructions are executed by at least one processor, so that the at least one processor can execute the above method.
基于同一发明构思,本申请的实施例还提供一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现上述方法。Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and implementing the above method when the computer program is executed by a processor.
基于同一发明构思,本申请的实施例还提供一种计算机程序产品,计算机程序产品在被处理器时,实现上述方法。Based on the same inventive concept, an embodiment of the present application further provides a computer program product, which implements the above method when the computer program product is processed.
本领域内的技术人员应明白,本发明实施例的实施例可提供为方法、系统、或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用车辆(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, embodiments of the invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product implemented on one or more computer-usable vehicles (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明实施例是参照根据本发明实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的系统。Embodiments of the present invention are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor or processor of other programmable data processing terminal equipment to produce a machine such that instructions executed by the computer or processor of other programmable data processing terminal equipment Produce a system for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令系统的制造品,该指令系统实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising a system of instructions, the The instruction system realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded into a computer or other programmable data processing terminal equipment, so that a series of operational steps are performed on the computer or other programmable terminal equipment to produce computer-implemented processing, thereby The instructions executed above provide steps for implementing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。“和/或”表示可以选择两者之中的任意一个,也可以两者都选择。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should also be noted that in this text, relational terms such as first and second etc. are only used to distinguish one entity or operation from another, and do not necessarily require or imply that these entities or operations, any such actual relationship or order exists. "And/or" means that either one of the two can be selected, or both can be selected. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or terminal equipment comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements identified, or also include elements inherent in such a process, method, article, or terminal equipment. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.
以上对本发明所提供的一种提升容器环境下Maven工程编译速度的方法进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The method for improving the Maven project compilation speed in the container environment provided by the present invention has been introduced in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only used to help Understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, the content of this specification is not It should be understood as a limitation of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310232084.0A CN116382694A (en) | 2023-03-12 | 2023-03-12 | Method for improving compiling speed of Maven engineering in container environment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310232084.0A CN116382694A (en) | 2023-03-12 | 2023-03-12 | Method for improving compiling speed of Maven engineering in container environment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116382694A true CN116382694A (en) | 2023-07-04 |
Family
ID=86972205
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310232084.0A Pending CN116382694A (en) | 2023-03-12 | 2023-03-12 | Method for improving compiling speed of Maven engineering in container environment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116382694A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116661811A (en) * | 2023-07-31 | 2023-08-29 | 明阳时创(北京)科技有限公司 | Closed-loop containerized controllable service cluster construction method and service cluster device |
| CN118444925A (en) * | 2024-04-30 | 2024-08-06 | 理工雷科智途(北京)科技有限公司 | A method for implementing automatic compilation of driverless code based on Jenkins |
-
2023
- 2023-03-12 CN CN202310232084.0A patent/CN116382694A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116661811A (en) * | 2023-07-31 | 2023-08-29 | 明阳时创(北京)科技有限公司 | Closed-loop containerized controllable service cluster construction method and service cluster device |
| CN116661811B (en) * | 2023-07-31 | 2023-10-20 | 明阳时创(北京)科技有限公司 | Closed-loop containerized controllable service cluster construction method and service cluster device |
| CN118444925A (en) * | 2024-04-30 | 2024-08-06 | 理工雷科智途(北京)科技有限公司 | A method for implementing automatic compilation of driverless code based on Jenkins |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109840429B (en) | Smart contract deployment, invocation methods and devices | |
| JP7090657B2 (en) | Methods, devices, devices and storage media for upgrading applications | |
| CN106559438B (en) | A program upload method and device based on a target network platform | |
| US20080120400A1 (en) | Systems and Methods for Constructing Relationship Specifications from Component Interactions | |
| US20130104133A1 (en) | Constructing change plans from component interactions | |
| JP6602283B2 (en) | System and method for supporting object-oriented script tools | |
| CN112769706B (en) | Componentized routing method and system | |
| CN106569880B (en) | A method and system for dynamically sharing resources between Android applications | |
| CN111736913B (en) | Class loading method and device | |
| CN116382694A (en) | Method for improving compiling speed of Maven engineering in container environment | |
| CN113326030A (en) | Service request processing method and device | |
| CN110806891B (en) | Method and device for generating software version of embedded device | |
| CN115934288A (en) | Timed task management method, timed task management device, timed task management equipment and timed task management storage medium | |
| CN114089965A (en) | Program development project management method and device based on monolithic code warehouse Monorepo | |
| CN111147291A (en) | A service maintenance method and device | |
| CN117707543A (en) | Application installation package manufacturing and installation method, computing device and storage medium | |
| CN116755788A (en) | On-line rule modification method, device, equipment and storage medium | |
| CN107608672A (en) | A kind of UI module managements, UI module management methods and system | |
| CN110334031B (en) | Memory allocation code detection method and device, computer equipment and storage medium | |
| CN118012453A (en) | Software deployment method, device, electronic device, storage medium and program product | |
| US20090293064A1 (en) | Synchronizing shared resources in an order processing environment using a synchronization component | |
| CN111737964A (en) | Form dynamic processing method, equipment and medium | |
| EP3743803B1 (en) | Device and system for model based version management of entity instances | |
| KR101506656B1 (en) | System for quality management of application and method therefor | |
| CN112631650A (en) | Plug-in version information checking method, computing device and storage medium |
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 |
