WO2019042311A1 - 基于Jenkins工具的软件项目构建任务配置方法及装置 - Google Patents

基于Jenkins工具的软件项目构建任务配置方法及装置 Download PDF

Info

Publication number
WO2019042311A1
WO2019042311A1 PCT/CN2018/102918 CN2018102918W WO2019042311A1 WO 2019042311 A1 WO2019042311 A1 WO 2019042311A1 CN 2018102918 W CN2018102918 W CN 2018102918W WO 2019042311 A1 WO2019042311 A1 WO 2019042311A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
jenkins
task
software
build
Prior art date
Application number
PCT/CN2018/102918
Other languages
English (en)
French (fr)
Inventor
李祖海
卢毅荣
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019042311A1 publication Critical patent/WO2019042311A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • the present invention relates to the field of computer technology, and in particular, to a software project construction task configuration method and apparatus based on the Jenkins tool.
  • Continuous integration is to integrate the update code into the trunk program frequently during the software project development phase. Specifically, when the developer submits the code of the update point, it is immediately built (ie, compiled and packaged), first. Round test, based on the test results to determine whether the update point code and the backbone code can be correctly integrated, thus helping developers to quickly find errors, enabling the product to quickly iterate while ensuring high quality products. Jenkins is one of the commonly used build tools.
  • the existing Jenkins build task solution requires developers to manually configure it on Jenkins' graphical interface, which is cumbersome and inefficient. Moreover, the more software projects, the more difficult it is to maintain.
  • Jenkins backup or migration scenarios have the same problems as Jenkins build tasks, requiring developers to manually configure what needs to be backed up on Jenkins' graphical interface.
  • the object of the present invention is to provide a software project construction task configuration method and device based on the Jenkins tool, to solve the existing Jenkins tool creation task, backup and migration, must be manually performed on the Jenkins graphical interface.
  • the technical solutions of the configuration are as follows:
  • the present application provides a software engineering configuration method based on a Jenkins tool, including: when monitoring a code change of a code repository of a target software project, acquiring a target build task configuration file corresponding to the target software project;
  • the target build task profile obtains target system resources, dependencies, and task definitions required for the build task, the target system resources include: a machine type, a machine specification, and a dependent operating system on which the build task depends.
  • the machine type includes a virtual machine, a container, a bare metal or a physical machine; the dependency is used to describe software and a Jenkins plugin on which the build task depends; the task definition is used to define a build step and a trigger time of the build task Configuring a system resource that matches the target system resource; configuring, according to the dependency relationship, a target software and a target Jenkins plug-in on which the build task depends in the current system environment; and generating a build task according to the task definition.
  • the software engineering configuration method based on the Jenkins tool provided by the first aspect automatically configures the system resources (ie, the system environment) required to run the build task according to the build task configuration file of the software project written by the developer, and automatically allocates the system resources. Mounted to the Jenkins host. And, based on the dependencies in the build task configuration file, automatically configure the software and Jenkins plugin that the build task depends on, and finally, automatically create the Jenkins build task.
  • the entire process is automatically parsed by the system to build the task configuration file to automatically complete the configuration and creation of the build task, without the user to operate on the graphical interface, the operation is simple and efficient.
  • the configuring the system resource that matches the target system resource includes: searching for the target system resource in the current system environment; and if the current system environment If the target system resource exists, performing the step of configuring the software and the Jenkins plug-in on which the build task depends in the current system environment according to the dependency relationship; if the target system resource does not exist in the current system environment And creating the target system resource, and then performing the step of configuring the software and the Jenkins plugin on which the build task depends in the current system environment according to the dependency relationship.
  • the software engineering configuration method based on the Jenkins tool provided by the implementation method can automatically find or create a system resource that matches the target system resource according to the target system resource specified in the build task configuration file.
  • the configuring, according to the dependency, the software and the Jenkins plug-in that the build task depends on in the current system environment including: searching whether the current operating system is installed. Decoding the target software, if the target software is not installed in the current operating system, acquiring the target software according to the download address of the target software included in the target configuration task configuration file, and installing the target software; If the target software is installed in the current operating system, continue to find whether the target Jenkins plugin is installed in the Jenkins tool; if the target Jenkins plugin is not installed in the Jenkins tool, according to the target Build a download address of the target Jenkins plugin included in the task configuration file to obtain the target Jenkins plugin, and install the target Jenkins plugin; if the target Jenkins plugin is installed in the Jenkins tool, determine the current system environment The target software and the target Jenkins plugin are installed.
  • the Jenkins tool-based software engineering configuration method provided by the implementation method can automatically install the target software and the target Jenkins according to the target software and the target Jenkins plug-in that the build task specified in the build task configuration file, that is, automatically according to the build task configuration file. Resolve dependencies.
  • the generating a build task according to the task definition includes: creating or updating the build task according to the task definition; and mounting the target system resource to Jenkins On the host to run the build task.
  • the Jenkins tool-based software engineering configuration method provided by this implementation can automatically create or update a build task according to the task definition in the build task configuration file.
  • the method further includes: monitoring an operating state of the Jenkins tool, and monitoring an operating state of the current operating system; when an abnormality occurs in an operating state of the current operating system And generating alarm information; when the running state of the Jenkins tool is that the target system resource is dropped, the target system resource is re-mounted to the Jenkins host.
  • the software engineering configuration method based on the Jenkins tool monitors the running state of the Jenkins tool and the running state of the current operating system in real time, and automatically generates an alarm information after the abnormal state is detected, so as to provide the user with timely processing of the abnormality. And when the target system resource running the current build task is dropped, the target system resource is remounted to the Jenkins host.
  • the method further includes: converting the created build task to an initial build task profile corresponding to the created build task, where the initial build task profile includes the created The task definition corresponding to the task, as well as the system resources and software resources in the current system environment.
  • the present application further provides a software engineering configuration apparatus based on a Jenkins tool, including: a first obtaining unit, configured to acquire a target software item corresponding to a code change of a code repository of a target software item a target configuration task profile; a parsing unit, configured to parse the target build task profile to obtain a target system resource, a dependency, and a task definition required by the build task, where the target system resource includes: the build task Dependent machine type, machine specification, and dependent operating system, the machine type including a virtual machine, a container, a bare metal or a physical machine; the dependency relationship is used to describe software and a Jenkins plugin on which the build task depends; the task Defining a construction step and a trigger time for defining the construction task; a first configuration unit, configured to configure a system resource that matches the target system resource; and a second configuration unit, configured to The target software and the target Jenkins plugin on which the build task depends are configured in the system environment; Service generation unit for generating a build
  • the first configuration unit includes: a first search subunit, configured to find whether the target system resource exists in a current system environment; when the current system environment exists And executing, by the second configuration unit, the software and the Jenkins plug-in that the build task depends on in the current system environment according to the dependency relationship; creating a sub-unit for when the current system is The target system resource is created if the target system resource does not exist in the environment.
  • the second configuration unit includes: a second search subunit, configured to find whether the target software on which the build task depends is installed in the current operating system; Obtaining a subunit, configured to acquire the target software according to a download address of the target software included in the target configuration task configuration file, and install the target when the target software is not installed in the current operating system a third search subunit, configured to: when the target software is installed in the current operating system, continue to find whether the target Jenkins plugin is installed in the Jenkins tool; and the second obtaining subunit is used to be When the target Jenkins plugin is not installed in the Jenkins tool, obtain the target Jenkins plugin according to the download address of the target Jenkins plugin included in the target build task configuration file, and install the target Jenkins plugin; the first determiner a unit, configured to determine the installation in the current system environment when the target Jenkins plugin is installed in the Jenkins tool The goals and objectives Jenkins software plug-ins.
  • the task generating unit includes: a task generating subunit, configured to create or update the building task according to the task definition; and mounting a subunit for The target system resource is mounted to the Jenkins host to run the build task.
  • the method further includes: a monitoring unit, configured to monitor an operating state of the Jenkins tool, and monitor an operating state of the current operating system; When the running status of the current operating system is abnormal, the alarm information is generated; and the remounting unit is configured to remount the target system resource when the running state of the Jenkins tool is that the target system resource is offline. On the Jenkins host.
  • the method further includes: a configuration file generating unit, configured to convert the created build task into an initial build task configuration file corresponding to the created build task, the initial build task
  • the configuration file includes the task definition corresponding to the created task, and system resources and software resources in the current system environment.
  • the present application further provides a computer device, the computer device comprising a processor and a memory, wherein the memory stores program instructions, and the processor implements the first aspect by executing a storage instruction in the memory
  • the computer device comprising a processor and a memory
  • the memory stores program instructions
  • the processor implements the first aspect by executing a storage instruction in the memory
  • the present application further provides a computer readable storage medium having stored therein instructions that, when run on a computer, cause the computer to perform any of the above-mentioned possible aspects of the first aspect The method described in the implementation.
  • the present application also provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of the possible implementations of the first aspect above.
  • the Jenkins tool-based software project construction task configuration method provided by the embodiment of the present application, the developer writes a build task configuration file of the software project, and then automatically configures the system resources required to run the build task according to the build task configuration file (ie, System environment), and automatically mount the system resources to the Jenkins host. And, based on the dependencies in the build task configuration file, automatically configure the software and Jenkins plugin that the build task depends on, and finally, automatically create the Jenkins build task based on the task definitions in the build task configuration file.
  • the user only needs to maintain the configuration task configuration file.
  • the other processes are automatically parsed and configured by the system to automatically configure and create the construction task. The user does not need to operate on the graphical interface, and the operation is simple and efficient. Moreover, the user only needs Maintain build task configuration files with low maintenance costs.
  • FIG. 1 is a schematic structural diagram of a Jenkins system according to an embodiment of the present application.
  • FIG. 2 is a flowchart of a Jenkins-based software project construction task configuration method according to an embodiment of the present application
  • FIG. 3 is a block diagram of a Jenkins-based software project construction task configuration apparatus according to an embodiment of the present application.
  • FIG. 4 is a block diagram of another Jenkins-based software project construction task configuration apparatus according to an embodiment of the present application.
  • FIG. 5 is a block diagram of another software engineering configuration apparatus based on the Jenkins tool according to an embodiment of the present application.
  • FIG. 6 is a block diagram of a computer device according to an embodiment of the present application.
  • the traditional Jenkins build task solution requires developers to manually configure it on Jenkins' graphical interface, which is cumbersome and inefficient.
  • the Jenkins tool-based software project construction task configuration method provided by the application, the developer writes a corresponding build task configuration file for the software project, and then the Jenkins tool can configure the system resources on which the build task depends according to the build task configuration file.
  • the build task configuration file the operating system software and Jenkins plug-in on which the build task depends are installed.
  • the build task is automatically created according to the task definition in the build task configuration file.
  • the creation process of the build task is completed automatically, and the user does not need to perform any operation on the graphical interface, and the operation is simple and efficient. Moreover, users only need to maintain the build task configuration file, which has low maintenance costs.
  • FIG. 1 a schematic structural diagram of a Jenkins system according to an embodiment of the present application is shown.
  • the system includes: a code warehouse, a management tool, a monitoring alarm service, a resource management service, a dependency management service, an engineering task management service, a project import service, and a Jenkins cluster;
  • the Jenkins cluster consists of multiple Jenkins masters and multiple Jenkins slaves.
  • the Jenkins master is used to manage individual Jenkins slaves, and each Jenkins slave is used to perform the creation and operation of build tasks.
  • the monitoring alarm service, the resource management service, the dependency management service, the engineering task management service, and the engineering import service are software service names defined for convenience of description.
  • the service name may also not be defined in other embodiments of the present application.
  • the code repository is used to store the code of the software project submitted by the developer and the build task configuration file corresponding to the software project.
  • the core of this application is the build task configuration file of the software project.
  • the build task configuration file defines the system resources, dependencies and task definitions that the build project depends on.
  • the system resources that the build depends on include the type of machine that is dependent, such as virtual machine, container, bare metal, physical machine; image name or container name, for example, centos7.1, suse 11sp3, or a custom image.
  • the specifications of the machine can be: high IO, computationally intensive, 4U8G (ie, the CPU has 4 cores, the memory is 8G).
  • the image in this article refers to the operating system image.
  • Dependency refers to the operating system software and Jenkins plugin on which the build task depends.
  • the name and version number of the software, the name and version number of the Jenkins plugin are defined separately.
  • the task definition is the core part of the build task, defining the steps to build the task, the trigger time, and so on.
  • the monitoring and alerting service is mainly responsible for monitoring the code changes in the code repository.
  • the configuration task configuration file corresponding to the changed software project is injected into Jenkins to create or update the build task.
  • the monitoring alarm service also monitors the running status of the build task and the running status of the current system of Jenkins in real time. Once the running status of the build task, the disk status of the current system, the CPU status, and the IO status are found, an alarm is generated. If the running task is found to be running, The Jenkins slave node is dropped, notifying the management tool's resource management service to remount the Jenkins slave node.
  • the resource management service is primarily responsible for creating the machines that users need to run build tasks.
  • the Dependency Management Service is primarily responsible for installing the software and Jenkins plugins that the build tasks depend on based on the dependencies in the build task configuration file.
  • the engineering task management service is mainly responsible for mounting the machines required for the task to the Jenkins master node, and injecting the project in the build task configuration file into Jenkins to generate the Jenkins task.
  • the project import service mainly converts the existing Jenkins tasks in the system into a build task configuration file.
  • the project import service can identify the operating system software and Jenkins plug-ins installed in the current system, and convert the build task steps in Jenkins into the build task configuration.
  • the service is used in the following scenarios: Build tasks have been created using traditional Jenkins tools, and then the built tasks are imported into the improved Jenkins provided in this application.
  • FIG. 2 a flow chart of a software project construction task configuration method based on the Jenkins tool is illustrated in the embodiment of the present application.
  • This embodiment describes the construction task automation creation process of the software project in detail in conjunction with the Jenkins system architecture shown in FIG. .
  • S110 The monitoring alarm service monitors whether the configuration task configuration file corresponding to the target software item in the code repository changes; if yes, executes S120; if not, ends the current process.
  • a target software project is any software project.
  • the code repository contains the software code of the software project and the build task configuration file. When the build task configuration file changes, the method flow of executing the application is triggered.
  • the developer of the software project writes a build task configuration file according to the requirements of the software project, which specifies the system resources, dependencies, and task definitions of the build tasks. Then, store the build task configuration file into the code repository.
  • the monitoring alert service can detect the join event when the user incorporates new code or builds a task profile in the code repository.
  • the monitoring alarm service can detect whether the code in the code repository changes according to a preset time interval (for example, 30s).
  • the management tool acquires a target build task configuration file corresponding to the target software project.
  • the notification management downloads the software code and builds the task configuration file, and determines the changed portion.
  • the management tool downloads the entire software code of the target software project and the build task configuration file from the server, and compares it with the locally stored software code and the build task configuration file, respectively, and finally obtains a change. part.
  • the management tool may request the changed part from the server through the interface, and then the changed part may be downloaded to the local.
  • the change of the build task configuration file includes the following two situations: adding a build task configuration file corresponding to the target software project, or updating a build task configuration file corresponding to the target software project.
  • the management tool builds a task configuration file according to the latest target in the code repository, and parses the dependency relationship, the target system resource, and the task definition.
  • the management tool sends the target system resource to the resource management service, sends the dependency to the dependency management service, and sends the task definition to the engineering task management service.
  • the resource management service checks whether the target system resource exists in the current system. If not, executes S150; if yes, executes S160.
  • the resource management service first checks whether the specified target system resource exists in the current system environment. If there are specified specifications and system resources of the specified image, further check whether the resources are sufficient (determination in the system) Specify the specification, whether the system resource of the specified mirror matches the target system resource specified in the build task configuration file. For example, if the specified disk capacity is 100G, determine whether the resources available in the system are not less than 100G. If not enough, Then it is determined that there is no target system resource. If the specified specification and the specified mirrored system resources are sufficient, it is determined that the target system resources exist in the current system environment.
  • the resource management service creates the target system resource.
  • the system resources specified in the build task configuration file include: the required machine type (for example, virtual machine, container, bare metal, physical machine), the operating system depended on, machine specifications, and so on.
  • the required machine type for example, virtual machine, container, bare metal, physical machine
  • the operating system depended on machine specifications, and so on.
  • process implemented by the two steps S140 and S150 is a process of configuring system resources that match the target system resources.
  • the target system resource created is the Jenkins slave node in the Jenkins cluster.
  • the target system resource in this article is the Jenkins slave node.
  • the dependency management service checks, according to the dependency, whether the target software on which the build task depends is installed in the current operating system; if it is already installed, executing S180; if not, executing S170;
  • the current system environment includes an operating system and a Jenkins tool.
  • the process of detecting whether the target software and the target Jenkins plug-in are configured in the current system environment includes: detecting whether the target software is installed in the current operating system, and detecting whether the Jenkins tool is installed.
  • Target Jenkins plugin The process of detecting whether the target software and the target Jenkins plug-in are configured in the current system environment includes: detecting whether the target software is installed in the current operating system, and detecting whether the Jenkins tool is installed.
  • the dependency management service acquires the target software according to the download address of the target software included in the target build task configuration file, and installs the target software.
  • the application scenarios of the Jenkins system are different, and the corresponding download addresses are different; for example, if the Jenkins system is installed in a local area network, the software that Jenkins relies on is downloaded from the software corresponding official software repository to the local area network, and the download address is The path of the target software is stored in the local area network.
  • the system where the Jenkins system is located can directly connect to the official software repository of the software.
  • the download address of the target software is the link of the official software repository corresponding to the target software.
  • the dependency management service checks whether the target Jenkins plugin is installed in the current Jenkins tool; if it is not installed, executes S190; if it is installed, executes S200.
  • This step is to detect if the target Jenkins plugin is installed in the Jenkins tool.
  • the dependency management service obtains the target Jenkins plugin according to the download address of the Jenkins plugin included in the target build task configuration file, and installs the target Jenkins plugin.
  • the process implemented by S160-S190 is a process of configuring the target software and the target Jenkins plug-in on which the build task depends in the current system environment according to the dependency relationship.
  • the engineering task management service mounts the target system resources to the Jenkins master.
  • the target system resource is actually the Jenkins slave node in Figure 1. Mounting the target system resources to the Jenkins host is to establish a communication connection between the Jenkins slave node and the Jenkins master node.
  • the Jenkins slave node can be mounted to the Jenkins master immediately after the Jenkins slave node is created; in another embodiment of the present application, after the build task is created or updated, Then mount the Jenkins slave node running the build task to the Jenkins master.
  • the project management task creates a build task according to the task definition in the target build task configuration file.
  • the project management task injects the task definition into Jenkins to generate the build task, which does not interrupt the existing business, ie does not need to turn off Jenkins.
  • the process implemented by S200 and S210 is to generate a build task process based on the task definition.
  • the software engineering configuration method based on the Jenkins tool provided in this embodiment may further include the following steps:
  • S220 The monitoring alarm service monitors the running status of the Jenkins and monitors the running status of the current operating system.
  • the current operating state of the operating system includes disk status, CPU status, IO status, and so on.
  • the running state of Jenkins refers to the running state of the Jenkins slave node running the build task.
  • the monitoring and alerting service monitors the status of the build task and Jenkins in real time through the interface service provided by the project management service.
  • the monitoring alarm service finds that the current operating state, disk status, CPU status, and IO status of the operating system are abnormal, an alarm message is generated, and the alarm information is displayed to the user on a graphical interface; for example, the disk capacity is lower than a preset value.
  • the CPU usage is higher than a preset value, and the IO occupancy rate is higher than a certain set value.
  • the monitoring alarm service detects that the Jenkins slave node running the build task is offline, notify the resource management service to remount the node.
  • the methods provided by the present application can also be converted into corresponding initial build task profiles according to the build tasks that have been created.
  • the corresponding task definition can be obtained according to the construction task that has been created.
  • the user can write the final build task configuration file corresponding to the created build task based on the initial build task configuration file, thereby reducing the burden on the software developer.
  • the software engineering configuration method based on the Jenkins tool provided by the embodiment, the developer writes a build task configuration file of the software project, and then automatically configures the system resources (ie, the system environment) required to run the build task according to the build task configuration file. And automatically mount the system resources to the Jenkins host. And, based on the dependencies in the build task configuration file, automatically configure the software and Jenkins plugin that the build task depends on, and finally, automatically create the Jenkins build task.
  • the system automatically parses and builds the task configuration file to automatically complete the configuration and creation of the build task, without the user operating on the graphical interface, the operation is simple and efficient; and the user only needs to define and maintain his own project according to his own needs. Relevant partial profiles, no need to care about other extras, reducing user usage and learning costs and maintenance costs.
  • the build task backup is to back up the build task configuration file, and only needs to back up the updated part of the content, that is, incremental backup. Then, the process of rebuilding a task from a backup is the process of creating a build task based on the build task profile.
  • Building a task migration is to migrate the build task to another Jenkins slave node.
  • the migration process is the process of recreating the build task based on the build task configuration file.
  • the backup and migration process of the build task also does not require the user to manually operate on the graphical interface, enabling automated backup and migration. Moreover, the backup and migration process does not require shutting down the business and enabling online backup and migration. After migrating the build task to the new running node, it is efficient to automatically mount the new running node to the Jenkins master.
  • the present application also provides a software engineering configuration device embodiment based on the Jenkins tool.
  • FIG. 3 a block diagram of a software engineering configuration apparatus based on a Jenkins tool is shown in an embodiment of the present application.
  • the apparatus is applied to a system installed with a Jenkins tool.
  • the apparatus may include: The acquisition unit 310, the parsing unit 320, the first configuration unit 330, the second configuration unit 340, and the task generation unit 350.
  • the first obtaining unit 310 is configured to acquire a target build task configuration file corresponding to the target software project when the code change of the code repository of the target software project is detected.
  • the developer of the software project writes a build task configuration file according to the requirements of the software project, which specifies the system resources, dependencies, and task definitions of the build tasks. Then, store the build task configuration file into the code repository. The device detects changes in the code in the code repository at preset intervals.
  • the parsing unit 320 is configured to parse the target system task profile to obtain the target system resources, dependencies, and task definitions required for the building task.
  • the target system resources include: a machine type on which the build task depends, a machine specification, and a dependent operating system, the machine type including a virtual machine, a container, a bare metal, or a physical machine.
  • the dependencies are used to illustrate the software and Jenkins plugin that the build task depends on.
  • the task definition is used to define a build step and a trigger time of the build task.
  • the first configuration unit 330 is configured to configure system resources that match the target system resources.
  • the first configuration unit includes a first lookup subunit and a create subunit.
  • the first locating subunit is configured to find whether the target system resource exists in the current system environment; if the target system resource exists in the current system environment, the second configuration unit continues to perform the corresponding step.
  • the sub-unit is created to create a target system resource if the target system resource does not exist in the current system environment.
  • the second configuration unit 340 is configured to configure the target software and the target Jenkins plug-in on which the build task depends in the current system environment according to the dependency relationship.
  • the second configuration unit includes a second lookup subunit, a first acquisition subunit, a third lookup subunit, a second obtaining subunit, and a first determining subunit;
  • the second search subunit is configured to find whether the target software is installed in the current operating system.
  • the first obtaining subunit is configured to acquire the target software according to the download address of the target software included in the target configuration task configuration file when the target software is not installed in the current operating system, and install the target software.
  • the third lookup subunit is configured to continue to find whether the target Jenkins plugin is installed in the Jenkins tool when the target software is installed in the current operating system.
  • the second obtaining subunit is configured to obtain the target Jenkins plugin according to the download address of the target Jenkins plugin included in the target build task configuration file when the target Jenkins plugin is not installed in the current operating system, and install the target Jenkins plugin.
  • the first determining subunit is configured to determine that the target software and the target Jenkins plugin are installed in the current system environment when the target Jenkins plugin is installed in the current operating system.
  • the task generation unit 350 is configured to generate a build task according to the task definition.
  • the task generation unit includes a task generation subunit and a mount subunit;
  • the task generation subunit is configured to create or update the build task according to the task definition.
  • the mount subunit is configured to mount the target system resource to the Jenkins host to run the build task.
  • the target system resource is actually the Jenkins slave node in Figure 1. Mounting the target system resources to the Jenkins host is to establish a communication connection between the Jenkins slave node and the Jenkins master node, so that the Jenkins slave node runs the build task.
  • the Jenkins tool-based software engineering configuration device provided by the embodiment, the developer writes a build task configuration file of the software project, and the Jenkins tool can automatically configure the system resources required to run the build task according to the build task configuration file (ie, the system environment) ) and automatically mount the system resources to the Jenkins host. And, based on the dependencies in the build task configuration file, automatically configure the software and Jenkins plugin that the build task depends on, and finally, automatically create the Jenkins build task.
  • the system automatically parses and builds the task configuration file to automatically complete the configuration and creation of the build task, without the user operating on the graphical interface, the operation is simple and efficient; and the user only needs to define and maintain his own project according to his own needs. Relevant partial profiles, no need to care about other extras, reduce user usage and learning costs and maintenance costs.
  • FIG. 4 there is shown a block diagram of another Jenkins tool-based software engineering configuration apparatus according to an embodiment of the present application.
  • the apparatus further includes: a monitoring unit 410, an alarm unit 420, and Remount unit 430.
  • the monitoring unit 410 is configured to monitor the running status of the Jenkins tool and monitor the running status of the current operating system.
  • the alarm unit 420 is configured to generate alarm information when an abnormality occurs in an operating state of the current operating system.
  • the remounting unit 430 is configured to remount the target system resource to the Jenkins host when the running state of the Jenkins tool is that the target system resource is dropped.
  • the software engineering configuration device based on the Jenkins tool can monitor the running state of the Jenkins tool and the operating system in real time.
  • an alarm message is generated, and the user is displayed on the graphical interface.
  • the alarm information is used to enable the user to discover and handle the abnormality in time.
  • the Jenkins tool is running out of the Jenkins slave node running the current build task, remount the Jenkins slave node to the Jenkins master to continue running the current build task.
  • FIG. 5 a block diagram of another software engineering configuration apparatus based on the Jenkins tool is shown in the embodiment of the present application.
  • the device further includes a configuration file generating unit 510 based on the embodiment shown in FIG.
  • the configuration file generating unit 510 is configured to convert the created build task into a corresponding initial build task configuration file.
  • the initial build task configuration file includes a task definition corresponding to the created task, and system resources and software resources in the current system environment.
  • the profile generation unit can obtain the corresponding task definition according to the build task that has been created; and obtain all the software installed in the current system environment, and all Jenkins plugins installed in the Jenkins tool.
  • the user can write the final build task configuration file corresponding to the created build task based on the initial build task configuration file, thereby reducing the burden on the software developer.
  • the present application also provides a computer device.
  • FIG. 6 a block diagram of a computer device according to an embodiment of the present application is shown.
  • the device may be a server or a computer terminal, and the device is installed with Jenkins tool software.
  • the device includes a processor 610 and a memory. 620;
  • the memory 620 stores program instructions, and the processor 610 implements the following functional steps by executing the storage instructions in the memory 620:
  • the machine type includes a virtual machine, a container, a bare metal or a physical machine; the dependency relationship is used to describe software and a Jenkins plug-in on which the build task depends; the task definition is used to define a build step of the build task and Trigger time
  • a build task is generated based on the task definition.
  • the configuring system resources that match the target system resources include:
  • target system resource does not exist in the current system environment, create the target system resource, and then perform the step of configuring the software and the Jenkins plugin that the build task depends on in the current system environment according to the dependency relationship. .
  • the configuring the software and the Jenkins plug-in that the build task depends on in the current system environment according to the dependency relationship includes:
  • the target software is not installed in the current operating system, acquiring the target software according to the download address of the target software included in the target configuration task configuration file, and installing the target software;
  • target Jenkins plugin If the target Jenkins plugin is not installed in the Jenkins tool, obtain the target Jenkins plugin according to the download address of the target Jenkins plugin included in the target build task configuration file, and install the target Jenkins plugin;
  • the target Jenkins plugin is installed in the Jenkins tool, it is determined that the target software and the target Jenkins plugin are installed in the current system environment.
  • the generating a build task according to the task definition includes:
  • the target system resource is mounted to the Jenkins host to run the build task.
  • the method further includes:
  • the target system resource is re-mounted to the Jenkins host.
  • the method further includes:
  • the computer device provided in this embodiment automatically configures the system resources (ie, the system environment) required for running the build task according to the build task configuration file of the software project written by the software developer, and automatically mounts the system resource to the Jenkins host. on. And, based on the dependencies in the build task configuration file, automatically configure the software and Jenkins plug-ins that the build task depends on, and finally, automatically create Jenkins build tasks based on the task definitions in the build task configuration file.
  • the user only needs to maintain the configuration task configuration file.
  • the other processes are automatically parsed and configured by the system to automatically configure and create the construction task. The user does not need to operate on the graphical interface, and the operation is simple and efficient. Moreover, the user only needs Maintain build task configuration files with low maintenance costs.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)) or the like.
  • a magnetic medium eg, a floppy disk, a hard disk, a magnetic tape
  • an optical medium eg, a DVD
  • a semiconductor medium eg, a solid state disk (SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

一种基于Jenkins工具的软件项目构建任务配置方法及装置,该方法根据开发人员编写软件项目的构建任务配置文件,能够根据该构建任务配置文件自动配置运行构建任务所需的系统资源(即,系统环境),并自动将该系统资源挂载到Jenkins主机上。以及,根据构建任务配置文件中的依赖关系,自动配置构建任务所依赖的软件和Jenkins插件,最后,根据构建任务配置文件中的任务定义自动创建Jenkins构建任务。用户只需维护构建任务配置文件,其它过程均由系统自动解析构建任务配置文件自动进行构建任务的配置和创建,无需用户在图形化界面上进行操作,操作简单、效率高;而且,用户只需要维护构建任务配置文件,维护成本低。

Description

基于Jenkins工具的软件项目构建任务配置方法及装置 技术领域
本发明涉及计算机技术领域,尤其涉及一种基于Jenkins工具的软件项目构建任务配置方法及装置。
背景技术
持续集成(Continuous integration,CI)就是在软件项目开发阶段,频繁地将更新代码集成到主干程序,具体的,当开发人员提交更新点的代码后,立刻进行构建(即,编译打包)、第一轮测试,根据测试结果确定更新点代码和主干代码能否正确地集成在一起,从而帮助开发人员快速发现错误,使产品能够快速迭代,同时保证产品的高质量。Jenkins是常用的构建工具之一。
目前的Jenkins构建任务方案,创建一个构建工程需要以下几个步骤:
1)在Jenkins master创建构建工程(前提是已有Jenkins master);
2)安装构建任务依赖的Jenkins插件;
3)申请构建任务所需的指定镜像的虚拟机、容器或裸机;
4)在虚拟机、容器或裸机上安装构建任务必须的软件;
5)将虚拟机、容器或裸机挂载到Jenkins master上;
6)创建构建任务,配置构建步骤,主要包含配置构建任务的节点,编写构建脚本,添加构建步骤;
7)如果一个软件工程中包含多个构建任务,一个软件项目又包含多个工程,需要重复执行以上步骤1)-步骤6)。
现有的Jenkins构建任务方案每个步骤都需要开发人员手动在Jenkins的图形化界面上进行配置,操作繁琐、效率低;而且,软件项目数量越多,维护难度越大。
Jenkins备份或迁移方案与Jenkins构建任务存在同样的问题,需要开发人员在Jenkins的图形化界面上手动配置需要备份哪些东西。
发明内容
有鉴于此,本发明的目的在于提供一种基于Jenkins工具的软件项目构建任务配置方法及装置,以解决现有的Jenkins工具创建构建任务、备份和迁移时,必须在Jenkins图形化界面上进行手动配置的技术问题,其技术方案如下:
第一方面,本申请提供了一种基于Jenkins工具的软件工程配置方法包括:当监测到目标软件项目的代码仓库的代码变化时,获取所述目标软件项目对应的目标构建任务配置文件;解析所述目标构建任务配置文件获得所述构建任务所需的目标系统资源、依赖关系和任务定义,所述目标系统资源包括:所述构建任务所依赖的机器类型、机器规格和所依赖操作系统,所述机器类型包括虚拟机、容器、裸机或物理机;所述依赖关系用于说明所述构建任务所依赖的软件和Jenkins插件;所述任务定义用于定义所述构建任务的构建步骤和触发时间;配置与所述目标系统资源相匹配的系统资源;根 据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的目标软件和目标Jenkins插件;根据所述任务定义生成构建任务。
第一方面提供的基于Jenkins工具的软件工程配置方法,根据开发人员编写的软件项目的构建任务配置文件,自动配置运行构建任务所需的系统资源(即,系统环境),并自动将该系统资源挂载到Jenkins主机上。以及,根据构建任务配置文件中的依赖关系,自动配置构建任务所依赖的软件和Jenkins插件,最后,自动创建Jenkins构建任务。整个过程均由系统自动解析构建任务配置文件自动完成构建任务的配置和创建,无需用户在图形化界面上进行操作,操作简单、效率高。
在第一方面一种可能的实现方式中,所述配置与所述目标系统资源相匹配的系统资源,包括:查找所述当前系统环境中是否存在所述目标系统资源;如果所述当前系统环境中存在所述目标系统资源,则执行根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件的步骤;如果所述当前系统环境中不存在所述目标系统资源,则创建所述目标系统资源,然后执行根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件的步骤。
本实现方式提供的基于Jenkins工具的软件工程配置方法,能够自动根据构建任务配置文件中指定的目标系统资源,查找或创建与该目标系统资源相匹配的系统资源。
在第一方面另一种可能的实现方式中,所述根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件,包括:查找当前操作系统中是否安装有所述目标软件;如果所述当前操作系统中未安装所述目标软件,则根据所述目标构建任务配置文件中包含的所述目标软件的下载地址获取所述目标软件,并安装所述目标软件;如果所述当前操作系统中安装有所述目标软件,则继续查找所述Jenkins工具中是否安装有所述目标Jenkins插件;如果所述Jenkins工具中未安装所述目标Jenkins插件,则根据所述目标构建任务配置文件中包含的目标Jenkins插件的下载地址获取所述目标Jenkins插件,并安装所述目标Jenkins插件;如果所述Jenkins工具中安装有所述目标Jenkins插件,则确定所述当前系统环境中安装有所述目标软件和所述目标Jenkins插件。
本实现方式提供的基于Jenkins工具的软件工程配置方法,能够根据构建任务配置文件中指定的构建任务所依赖的目标软件和目标Jenkins插件,自动安装目标软件和目标Jenkins,即根据构建任务配置文件自动解决依赖关系。
在第一方面的又一种可能的实现方式中,所述根据所述任务定义生成构建任务,包括:根据所述任务定义创建或更新所述构建任务;将所述目标系统资源挂载到Jenkins主机上,以运行所述构建任务。
本实现方式提供的基于Jenkins工具的软件工程配置方法,能够自动根据构建任务配置文件中的任务定义自动创建或更新构建任务。
在第一方面的又一种可能的实现方式中,还包括:监测所述Jenkins工具的运行状态,以及,监测所述当前操作系统的运行状态;当所述当前操作系统的运行状态存在异常时,产生告警信息;当所述Jenkins工具的运行状态是所述目标系统资源掉线时,重新将所述目标系统资源挂载到Jenkins主机上。
本实现方式提供的基于Jenkins工具的软件工程配置方法,实时监测Jenkins工具 的运行状态,以及当前操作系统的运行状态,并在监测到状态异常后,自动产生告警信息,以提供用户及时处理异常。并在运行当前构建任务的目标系统资源掉线时,重新将该目标系统资源挂载到Jenkins主机上。
在第一方面的又一种可能的实现方式中,还包括:将已创建构建任务转换为所述已创建构建任务对应的初始构建任务配置文件,所述初始构建任务配置文件包括所述已创建任务对应的任务定义,以及,当前系统环境中的系统资源和软件资源。
第二方面,本申请还提供了一种基于Jenkins工具的软件工程配置装置,包括:第一获取单元,用于当监测到目标软件项目的代码仓库的代码变化时,获取所述目标软件项目对应的目标构建任务配置文件;解析单元,用于解析所述目标构建任务配置文件获得所述构建任务所需的目标系统资源、依赖关系和任务定义,所述目标系统资源包括:所述构建任务所依赖的机器类型、机器规格和所依赖操作系统,所述机器类型包括虚拟机、容器、裸机或物理机;所述依赖关系用于说明所述构建任务所依赖的软件和Jenkins插件;所述任务定义用于定义所述构建任务的构建步骤和触发时间;第一配置单元,用于配置与所述目标系统资源相匹配的系统资源;第二配置单元,用于根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的目标软件和目标Jenkins插件;任务生成单元,用于根据所述任务定义生成构建任务。
在第二方面的一种可能的实现方式中,所述第一配置单元包括:第一查找子单元,用于查找当前系统环境中是否存在所述目标系统资源;当所述当前系统环境中存在所述目标系统资源时,由所述第二配置单元执行根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件;创建子单元,用于当所述当前系统环境中不存在所述目标系统资源,则创建所述目标系统资源。
在第二方面的另一种可能的实现方式中,所述第二配置单元包括:第二查找子单元,用于查找当前操作系统中是否安装有所述构建任务所依赖的目标软件;第一获取子单元,用于当所述当前操作系统中未安装所述目标软件时,根据所述目标构建任务配置文件中包含的所述目标软件的下载地址获取所述目标软件,并安装所述目标软件;第三查找子单元,用于当所述当前操作系统中安装有所述目标软件时,继续查找所述Jenkins工具中是否安装有所述目标Jenkins插件;第二获取子单元,用于当所述Jenkins工具中未安装所述目标Jenkins插件时,根据所述目标构建任务配置文件中包含的目标Jenkins插件的下载地址获取所述目标Jenkins插件,并安装所述目标Jenkins插件;第一确定子单元,用于当所述Jenkins工具中安装有所述目标Jenkins插件时,确定所述当前系统环境中安装有所述目标软件和目标Jenkins插件。
在第二方面的又一种可能的实现方式中,所述任务生成单元,包括:任务生成子单元,用于根据所述任务定义创建或更新所述构建任务;挂载子单元,用于将所述目标系统资源挂载到Jenkins主机上,以运行所述构建任务。
在第二方面的又一种可能的实现方式中,还包括:监测单元,用于监测所述Jenkins工具的运行状态,以及,监测所述当前操作系统的运行状态;报警单元,用于当所述当前操作系统的运行状态存在异常时,产生告警信息;重新挂载单元,用于当所述Jenkins工具的运行状态是所述目标系统资源掉线时,重新将所述目标系统资源挂载到Jenkins主机上。
在第二方面的又一种可能的实现方式中,还包括:配置文件生成单元,用于将已创建构建任务转换为所述已创建构建任务对应的初始构建任务配置文件,所述初始构建任务配置文件包括所述已创建任务对应的任务定义,以及,当前系统环境中的系统资源和软件资源。
第三方面,本申请还提供一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有程序指令,所述处理器通过执行所述存储器中的存储指令实现第一方面的任意一种可能的实现方式所述的方法。
第四方面,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面的任意一种可能的实现方式所述的方法。
第五方面,本申请还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面的任意一种可能的实现方式所述的方法。
本申请实施例提供的基于Jenkins工具的软件项目构建任务配置方法,由开发人员编写软件项目的构建任务配置文件,然后,根据该构建任务配置文件自动配置运行构建任务所需的系统资源(即,系统环境),并自动将该系统资源挂载到Jenkins主机上。以及,根据构建任务配置文件中的依赖关系,自动配置构建任务所依赖的软件和Jenkins插件,最后,根据构建任务配置文件中的任务定义自动创建Jenkins构建任务。用户只需维护构建任务配置文件,其它过程均由系统自动解析构建任务配置文件自动进行构建任务的配置和创建,无需用户在图形化界面上进行操作,操作简单、效率高;而且,用户只需要维护构建任务配置文件,维护成本低。
附图说明
图1是本申请实施例一种Jenkins系统的构架示意图;
图2是本申请实施例一种基于Jenkins的软件项目构建任务配置方法的流程图;
图3是本申请实施例一种基于Jenkins的软件项目构建任务配置装置的框图;
图4是本申请实施例另一种基于Jenkins的软件项目构建任务配置装置的框图;
图5是本申请实施例又一种基于Jenkins工具的软件工程配置装置的框图;
图6是本申请实施例一种计算机设备的框图。
具体实施方式
传统的Jenkins构建任务方案每个步骤都需要开发人员手动在Jenkins的图形化界面上进行配置,操作繁琐、效率低。本申请提供的基于Jenkins工具的软件项目构建任务配置方法,由开发人员为软件项目编写相应的构建任务配置文件,然后,Jenkins工具能够根据该构建任务配置文件自行配置该构建任务所依赖的系统资源;根据该构建任务配置文件自行安装构建任务所依赖的操作系统软件和Jenkins插件,最后,根据构建任务配置文件中的任务定义自动创建构建任务。构建任务的创建过程都是自动完成,用户不需要在图形化界面上进行任何操作,操作简单、效率高。而且,用户只需要维护构建任务配置文件,维护成本低。
请参见图1,示出了本申请实施例一种Jenkins系统的构架示意图。如图1所示,该系统包括:代码仓库、管理工具、监控告警服务、资源管理服务、依赖管理服务、工程任务管理服务、工程导入服务和Jenkins集群;
Jenkins集群包括多个Jenkins master和多个Jenkins slave。Jenkins master用于管理各个Jenkins slave,各个Jenkins slave用于执行构建任务的创建及运行工作。
其中,监控告警服务、资源管理服务、依赖管理服务、工程任务管理服务、工程导入服务是为了描述方便而定义的软件服务名称。在本申请的其他实施例中也可以不定义服务名称。
代码仓库用于存储开发人员提交的软件项目的代码,以及软件项目对应的构建任务配置文件。本申请的核心是软件项目的构建任务配置文件,构建任务配置文件定义了构建工程依赖的系统资源、依赖关系和任务定义。
构建工程依赖的系统资源包括依赖的机器类型,例如,虚拟机、容器、裸机、物理机;镜像名称或容器名称,例如,centos7.1,suse 11sp3,也可以是自定义的镜像等。例如,机器的规格可以是:高IO、计算密集型,4U8G(即,CPU有4个内核、内存是8G)等。本文中的镜像是指操作系统镜像。
依赖关系,是指构建任务所依赖的操作系统软件和Jenkins插件,需要分别定义软件的名称和版本号,Jenkins插件的名称和版本号。
任务定义是构建任务的核心部分,定义了构建任务的步骤、触发时间等。
监控告警服务主要负责监控代码仓库中的代码变化情况,当代码仓库的代码有变化时,将发生变化的软件项目对应的构建任务配置文件注入到Jenkins中,创建或更新构建任务。
监控告警服务还实时监测构建任务的运行状态和Jenkins的当前系统的运行状态,一旦发现构建任务的运行状态、当前系统的磁盘状态、CPU状态、IO状态就会产生告警,如果发现运行构建任务的Jenkins slave节点掉线,通知管理工具的资源管理服务重新挂载Jenkins slave节点。
资源管理服务主要负责创建用户运行构建任务所需的机器。
依赖管理服务主要负责根据构建任务配置文件中的依赖关系,安装构建任务所依赖的软件和Jenkins插件。
工程任务管理服务主要负责将任务运行所需的机器挂载到Jenkins master节点上,并且将构建任务配置文件中的工程注入到Jenkins中,生成Jenkins任务。
工程导入服务主要是将系统中已有的Jenkins任务转换为构建任务配置文件,工程导入服务能够识别当前系统中安装的操作系统软件及Jenkins插件,以及将Jenkins中的构建任务步骤转换成构建任务配置文件中的任务定义。该服务应用于以下场景:已经利用传统的Jenkins工具创建了构建任务,然后,将已构建任务导入本申请提供的改进后的Jenkins中。
请参见图2,示出了本申请实施例一种基于Jenkins工具的软件项目构建任务配置方法的流程图,本实施例结合图1所示的Jenkins系统构架详细说明软件项目的构建任务自动化创建过程。
S110,监控告警服务监听代码仓库中目标软件项目对应的构建任务配置文件是否有变化;如果是,则执行S120;如果否,则结束当前流程。
目标软件项目是指任意一个软件项目。代码仓库中包含软件项目的软件代码和构建任务配置文件,当构建任务配置文件发生变化时,才触发执行本申请的方法流程。
软件项目的开发人员自己根据软件项目的需求编写构建任务配置文件,该文件中指定依赖的系统资源、依赖关系及构建任务的任务定义。然后,将构建任务配置文件存储到代码仓库中。
当用户在代码仓库中合入新的代码或构建任务配置文件时,监控告警服务能够监测到该合入事件。其中,监控告警服务可以按照预设时间间隔(例如,30s)检测代码仓库中的代码是否有变化。
S120,管理工具获取目标软件项目对应的目标构建任务配置文件。
当监控告警服务监测到代码仓库有变化后,通知管理下载软件代码和构建任务配置文件,并判断发生变化的部分。
在本申请的一种实现方式中,管理工具从服务器中下载该目标软件项目的全部软件代码和构建任务配置文件,并与本地存储的软件代码及构建任务配置文件分别进行比较,最终得到有变化的部分。
在本申请的另一种实现方式中,管理工具可以通过接口向服务器请求变化的部分,进而可以将发生变化的部分下载到本地。
例如,构建任务配置文件发生变化包括以下两种情况:新增目标软件项目对应的构建任务配置文件,或更新目标软件项目对应的构建任务配置文件。
S130,管理工具根据代码仓库中最新的目标构建任务配置文件,解析得到依赖关系、目标系统资源和任务定义。管理工具将目标系统资源发送给资源管理服务,将依赖关系发送给依赖管理服务,将任务定义发送给工程任务管理服务。
S140,资源管理服务检查当前系统中是否存在目标系统资源,如果不存在,则执行S150;如果存在,则执行S160。
在本申请的一个实施例中,资源管理服务首先查看当前系统环境中是否存在指定的目标系统资源,如果存在指定规格、指定镜像的系统资源,还要进一步查看这些资源是否够用(判断系统中的指定规格、指定镜像的系统资源是否与构建任务配置文件中指定的目标系统资源相匹配,例如,指定磁盘的容量是100G,则判断系统中可用的资源是否不小于100G),如果不够用,则确定不存在目标系统资源。如果指定规格、指定镜像的系统资源够用,则确定当前系统环境中存在目标系统资源。
S150,资源管理服务创建该目标系统资源。
例如,自动创建指定规格、指定镜像的虚拟机,并将创建的虚拟机挂载到Jenkins主机上。
构建任务配置文件中指定的系统资源包括:所需的机器类型(例如,虚拟机、容器、裸机、物理机)、所依赖的操作系统、机器规格等。
需要说明的是,S140和S150两个步骤所实现的过程即配置与目标系统资源相匹配的系统资源的过程。
创建完成的目标系统资源就是Jenkins集群中的Jenkins slave节点,换言之,本文中的目标系统资源就是Jenkins slave节点。
S160,依赖管理服务根据依赖关系,检查当前操作系统中是否安装了构建任务所依赖的目标软件;如果已经安装,则执行S180;如果未安装,则执行S170;
当前系统环境包括操作系统和Jenkins工具,其中,检测当前系统环境中是否配置 有目标软件和目标Jenkins插件的过程包括:检测当前操作系统中是否安装有目标软件,以及,检测Jenkins工具中是否安装有目标Jenkins插件。
S170,依赖管理服务根据目标构建任务配置文件中包含的目标软件的下载地址获取该目标软件,并安装该目标软件。
Jenkins系统的应用场景不同,对应下载地址也不同;例如,Jenkins系统安装在某个局域网中,则将Jenkins所依赖的软件从该软件对应官方软件仓库下载到该局域网中,而且,该下载地址是该局域网中存放该目标软件的路径。
例如,Jenkins系统所在的系统能够直接连接软件的官方软件仓库,此种应用场景下,目标软件的下载地址就是该目标软件对应的官方软件仓库的链接。
S180,依赖管理服务检查当前Jenkins工具中是否安装有目标Jenkins插件;如果未安装,则执行S190;如果已安装,则执行S200。
此步骤是检测Jenkins工具中是否安装有目标Jenkins插件。
S190,依赖管理服务根据目标构建任务配置文件中包含的Jenkins插件的下载地址获取目标Jenkins插件,并安装该目标Jenkins插件。
S160~S190所实现的过程是根据所述依赖关系,在当前系统环境中配置构建任务所依赖的目标软件和目标Jenkins插件的过程。
S200,工程任务管理服务将目标系统资源挂载到Jenkins master上。
目标系统资源其实就是图1中的Jenkins slave节点,将目标系统资源挂载到Jenkins主机上就是建立Jenkins slave节点与Jenkins master节点之间的通讯连接。
在本申请的一个实施例中,可以在创建好Jenkins slave节点后就立即将该Jenkins slave节点挂载到Jenkins master上;在本申请的另一个实施例中,可以在创建或更新构建任务之后,再将运行该构建任务的Jenkins slave节点挂载到Jenkins master上。
S210,工程管理任务根据目标构建任务配置文件中的任务定义创建构建任务。
工程管理任务将任务定义注入到Jenkins中,生成构建任务,该过程不会中断现有的业务,即不需要关掉Jenkins。
S200和S210所实现的过程是根据任务定义生成构建任务过程。
可选地,本实施例提供的基于Jenkins工具的软件工程配置方法还可以包括以下步骤:
S220,监控告警服务监测Jenkins的运行状态,以及,监测当前操作系统的运行状态;
当前操作系统的运行状态包括磁盘状态、CPU状态、IO状态等。Jenkins的运行状态是指运行构建任务的Jenkins slave节点的运行状态。
监控告警服务通过工程管理服务提供的接口服务实时监测构建任务和Jenkins的状态。
S230,当所述当前操作系统的运行状态存在异常时,产生告警信息。
监控告警服务一旦发现当前操作系统的运行状态、磁盘状态、CPU状态、IO状态有异常就会产生告警信息,并在图形化界面上向用户展示该告警信息;例如,磁盘容量低于预设值、CPU占用率高于某个预设值、IO占用率高于某个设定值等异常。
S240,当运行该构建任务的Jenkins slave节点掉线时,资源管理服务重新将该 Jenkins slave节点挂载到Jenkins master上。
如果监控告警服务监测到运行构建任务的Jenkins slave节点掉线后,通知资源管理服务重新挂载该节点。
此外,对于已经在传统的Jenkins工具中创建的构建任务,本申请提供的方法还可以根据已经创建的构建任务转换成对应的初始构建任务配置文件。具体的,可以根据已经创建的构建任务获得相应的任务定义。以及,获取当前系统环境中安装的所有软件,以及,Jenkins工具中安装的所有Jenkins插件。用户可以在该初始构建任务配置文件的基础上编写得到已创建构建任务对应的最终的构建任务配置文件,从而减轻了软件开发人员的负担。
本实施例提供的基于Jenkins工具的软件工程配置方法,由开发人员编写软件项目的构建任务配置文件,然后,根据该构建任务配置文件自动配置运行构建任务所需的系统资源(即,系统环境),并自动将该系统资源挂载到Jenkins主机上。以及,根据构建任务配置文件中的依赖关系,自动配置构建任务所依赖的软件和Jenkins插件,最后,自动创建Jenkins构建任务。整个过程均由系统自动解析构建任务配置文件自动完成构建任务的配置和创建,无需用户在图形化界面上进行操作,操作简单、效率高;而且,用户只需根据自己的需求定义和维护自己项目相关的部分配置文件,无需关心其他额外东西,降低用户使用和学习成本和维护成本。
此外,需要说明的是,构建任务备份就是备份构建任务配置文件,只需要备份有更新部分的内容,即增量备份。然后,根据备份重建构建任务的过程就是根据构建任务配置文件创建构建任务的过程。
构建任务迁移就是将构建任务迁移到另一个Jenkins slave节点上,迁移过程就是根据构建任务配置文件重新创建构建任务的过程。
可见,构建任务的备份和迁移过程就是构建任务的创建过程相同,此处不再赘述。
构建任务的备份和迁移过程同样不需要用户在图形化界面上手动操作,实现了自动化备份与迁移。而且,备份和迁移过程不需要关掉业务,实现在线备份和迁移。将构建任务迁移到新的运行节点后,能够自动将新的运行节点挂载到Jenkins master上,效率高。
相应于上述的基于Jenkins工具的软件工程配置方法实施例,本申请还提供了基于Jenkins工具的软件工程配置装置实施例。
请参见图3,示出了本申请实施例一种基于Jenkins工具的软件工程配置装置的框图,该装置应用于安装有Jenkins工具的系统中,如图3所示,该装置可以包括:第一获取单元310、解析单元320、第一配置单元330、第二配置单元340和任务生成单元350。
第一获取单元310,用于当监测到目标软件项目的代码仓库的代码变化时,获取目标软件项目对应的目标构建任务配置文件。
软件项目的开发人员自己根据软件项目的需求编写构建任务配置文件,该文件中指定依赖的系统资源、依赖关系及构建任务的任务定义。然后,将构建任务配置文件存储到代码仓库中。该装置会按照预设时间间隔检测代码仓库中的代码是否有变化。
解析单元320,用于解析目标构建任务配置文件获得构建任务所需的目标系统资 源、依赖关系和任务定义。
所述目标系统资源包括:所述构建任务所依赖的机器类型、机器规格和所依赖操作系统,所述机器类型包括虚拟机、容器、裸机或物理机。
所述依赖关系用于说明所述构建任务所依赖的软件和Jenkins插件。
所述任务定义用于定义所述构建任务的构建步骤和触发时间。
第一配置单元330,用于配置与目标系统资源相匹配的系统资源。
在本申请的一个实施例中,该第一配置单元包括第一查找子单元和创建子单元。
该第一查找子单元,用于查找当前系统环境中是否存在目标系统资源;若当前系统环境中存在目标系统资源,则由第二配置单元继续执行相应的步骤。
该创建子单元,用于若当前系统环境中不存在目标系统资源,则创建目标系统资源。
第二配置单元340,用于根据依赖关系,在当前系统环境中配置构建任务所依赖的目标软件和目标Jenkins插件。
在本申请的一个实施例中,第二配置单元包括第二查找子单元、第一获取子单元、第三查找子单元、第二获取子单元和第一确定子单元;
该第二查找子单元,用于查找当前操作系统中是否安装有目标软件。
该第一获取子单元,用于在当前操作系统中未安装目标软件时,根据目标构建任务配置文件中包含的目标软件的下载地址获取目标软件,并安装目标软件。
该第三查找子单元,用于在当前操作系统中安装有目标软件时,继续查找Jenkins工具中是否安装有目标Jenkins插件。
该第二获取子单元,用于在当前操作系统中未安装目标Jenkins插件时,根据目标构建任务配置文件中包含的目标Jenkins插件的下载地址获取目标Jenkins插件,并安装目标Jenkins插件。
该第一确定子单元,用于在当前操作系统中安装有目标Jenkins插件时,确定当前系统环境中安装有目标软件和目标Jenkins插件。
任务生成单元350,用于根据任务定义生成构建任务。
在本申请的一个实施例中,任务生成单元包括任务生成子单元和挂载子单元;
该任务生成子单元,用于根据任务定义创建或更新所述构建任务。
该挂载子单元,用于将目标系统资源挂载到Jenkins主机上,以运行所述构建任务。
目标系统资源其实就是图1中的Jenkins slave节点,将目标系统资源挂载到Jenkins主机上就是建立Jenkins slave节点与Jenkins master节点之间的通讯连接,以使Jenkins slave节点运行构建任务。
本实施例提供的基于Jenkins工具的软件工程配置装置,由开发人员编写软件项目的构建任务配置文件,Jenkins工具能够根据该构建任务配置文件自动配置运行构建任务所需的系统资源(即,系统环境),并自动将该系统资源挂载到Jenkins主机上。以及,根据构建任务配置文件中的依赖关系,自动配置构建任务所依赖的软件和Jenkins插件,最后,自动创建Jenkins构建任务。整个过程均由系统自动解析构建任务配置文件自动完成构建任务的配置和创建,无需用户在图形化界面上进行操作,操作简单、效率高;而且,用户只需根据自己的需求定义和维护自己项目相关的部分配置文件, 无需关心其他额外东西,降低用户使用和学习成本和维护成本。
请参见图4,示出了本申请实施例另一种基于Jenkins工具的软件工程配置装置的框图,该装置在图3所示实施例的基础上,还包括:监测单元410、报警单元420和重新挂载单元430。
监测单元410,用于监测Jenkins工具的运行状态,以及,监测当前操作系统的运行状态。
报警单元420,用于当所述当前操作系统的运行状态存在异常时,产生告警信息。
重新挂载单元430,用于当所述Jenkins工具的运行状态是目标系统资源掉线时,重新将目标系统资源挂载到Jenkins主机上。
本实施例提供的基于Jenkins工具的软件工程配置装置,可以实时监控Jenkins工具及操作系统的运行状态,当操作系统的运行状态出现异常时,会产生告警信息,并在图形化界面上向用户展示该告警信息,以使用户及时发现并处理异常。当Jenkins工具的运行状态是运行当前构建任务的Jenkins slave节点掉线时,重新将该Jenkins slave节点挂载到Jenkins master上,以便继续运行当前构建任务。
请参见图5,示出了本申请实施例又一种基于Jenkins工具的软件工程配置装置的框图,该装置在图3所示实施例的基础上还包括:配置文件生成单元510。
配置文件生成单元510,用于将已创建构建任务转换为对应的初始构建任务配置文件。
所述初始构建任务配置文件包括所述已创建任务对应的任务定义,以及,当前系统环境中的系统资源和软件资源。
该配置文件生成单元可以根据已经创建的构建任务获得相应的任务定义;以及,获取当前系统环境中安装的所有软件,以及,Jenkins工具中安装的所有Jenkins插件。用户可以在该初始构建任务配置文件的基础上编写得到已创建构建任务对应的最终的构建任务配置文件,从而减轻了软件开发人员的负担。
相应于上述的基于Jenkins工具的软件工程配置方法实施例,本申请还提供了一种计算机设备。
请参见图6,示出了本申请实施例一种计算机设备的框图,该设备可以是服务器或者计算机终端,该设备安装有Jenkins工具软件,如图6所示,该设备包括处理器610和存储器620;
所述存储器620中存储有程序指令,所述处理器610通过执行存储器620中的存储指令实现以下功能步骤:
当监测到目标软件项目的代码仓库的代码变化时,获取所述目标软件项目对应的目标构建任务配置文件;
解析所述目标构建任务配置文件获得所述构建任务所需的目标系统资源、依赖关系和任务定义,所述目标系统资源包括:所述构建任务所依赖的机器类型、机器规格和所依赖操作系统,所述机器类型包括虚拟机、容器、裸机或物理机;所述依赖关系用于说明所述构建任务所依赖的软件和Jenkins插件;所述任务定义用于定义所述构建任务的构建步骤和触发时间;
配置与所述目标系统资源相匹配的系统资源;
根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的目标软件和目标Jenkins插件;
根据所述任务定义生成构建任务。
在本申请一种可能的实现方式中,所述配置与所述目标系统资源相匹配的系统资源,包括:
查找所述当前系统环境中是否存在所述目标系统资源;
如果所述当前系统环境中存在所述目标系统资源,则执行根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件的步骤;
如果所述当前系统环境中不存在所述目标系统资源,则创建所述目标系统资源,然后执行根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件的步骤。
在本申请另一种可能的实现方式中,所述根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件,包括:
查找当前操作系统中是否安装有所述目标软件;
如果所述当前操作系统中未安装所述目标软件,则根据所述目标构建任务配置文件中包含的所述目标软件的下载地址获取所述目标软件,并安装所述目标软件;
如果所述当前操作系统中安装有所述目标软件,则继续查找所述Jenkins工具中是否安装有所述目标Jenkins插件;
如果所述Jenkins工具中未安装所述目标Jenkins插件,则根据所述目标构建任务配置文件中包含的目标Jenkins插件的下载地址获取所述目标Jenkins插件,并安装所述目标Jenkins插件;
如果所述Jenkins工具中安装有所述目标Jenkins插件,则确定所述当前系统环境中安装有所述目标软件和所述目标Jenkins插件。
在本申请又一种可能的实现方式中,所述根据所述任务定义生成构建任务,包括:
根据所述任务定义创建或更新所述构建任务;
将所述目标系统资源挂载到Jenkins主机上,以运行所述构建任务。
在本申请再一种可能的实现方式中,还包括:
监测所述Jenkins工具的运行状态,以及,监测所述当前操作系统的运行状态;
当所述当前操作系统的运行状态存在异常时,产生告警信息;
当所述Jenkins工具的运行状态是所述目标系统资源掉线时,重新将所述目标系统资源挂载到Jenkins主机上。
在本申请另一种可能的实现方式中,还包括:
将已创建构建任务转换为所述已创建构建任务对应的初始构建任务配置文件,所述初始构建任务配置文件包括所述已创建任务对应的任务定义,以及,当前系统环境中的系统资源和软件资源。
本实施例提供的计算机设备,根据软件开发人员编写的软件项目的构建任务配置文件,自动配置运行构建任务所需的系统资源(即,系统环境),并自动将该系统资源挂载到Jenkins主机上。以及,根据构建任务配置文件中的依赖关系,自动配置构建任务所依赖的软件和Jenkins插件,最后,根据构建任务配置文件中的任务定义自动创 建Jenkins构建任务。用户只需维护构建任务配置文件,其它过程均由系统自动解析构建任务配置文件自动进行构建任务的配置和创建,无需用户在图形化界面上进行操作,操作简单、效率高;而且,用户只需要维护构建任务配置文件,维护成本低。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如,同轴电缆、光纤、数字用户线(DSL))或无线(例如,红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者,半导体介质(例如,固态硬盘Solid State Disk(SSD))等。
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。

Claims (12)

  1. 一种基于Jenkins工具的软件工程配置方法,其特征在于,包括:
    当监测到目标软件项目的代码仓库的代码变化时,获取所述目标软件项目对应的目标构建任务配置文件;
    解析所述目标构建任务配置文件获得所述构建任务所需的目标系统资源、依赖关系和任务定义,所述目标系统资源包括:所述构建任务所依赖的机器类型、机器规格和所依赖操作系统,所述机器类型包括虚拟机、容器、裸机或物理机;所述依赖关系用于说明所述构建任务所依赖的软件和Jenkins插件;所述任务定义用于定义所述构建任务的构建步骤和触发时间;
    配置与所述目标系统资源相匹配的系统资源;
    根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的目标软件和目标Jenkins插件;
    根据所述任务定义生成构建任务。
  2. 根据权利要求1所述的方法,其特征在于,所述配置与所述目标系统资源相匹配的系统资源,包括:
    查找所述当前系统环境中是否存在所述目标系统资源;
    如果所述当前系统环境中存在所述目标系统资源,则执行根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件的步骤;
    如果所述当前系统环境中不存在所述目标系统资源,则创建所述目标系统资源,然后执行根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件的步骤。
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件,包括:
    查找当前操作系统中是否安装有所述目标软件;
    如果所述当前操作系统中未安装所述目标软件,则根据所述目标构建任务配置文件中包含的所述目标软件的下载地址获取所述目标软件,并安装所述目标软件;
    如果所述当前操作系统中安装有所述目标软件,则继续查找所述Jenkins工具中是否安装有所述目标Jenkins插件;
    如果所述Jenkins工具中未安装所述目标Jenkins插件,则根据所述目标构建任务配置文件中包含的目标Jenkins插件的下载地址获取所述目标Jenkins插件,并安装所述目标Jenkins插件;
    如果所述Jenkins工具中安装有所述目标Jenkins插件,则确定所述当前系统环境中安装有所述目标软件和所述目标Jenkins插件。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述根据所述任务定义生成构建任务,包括:
    根据所述任务定义创建或更新所述构建任务;
    将所述目标系统资源挂载到Jenkins主机上,以运行所述构建任务。
  5. 根据权利要求1所述的方法,其特征在于,还包括:
    监测所述Jenkins工具的运行状态,以及,监测所述当前操作系统的运行状态;
    当所述当前操作系统的运行状态存在异常时,产生告警信息;
    当所述Jenkins工具的运行状态是所述目标系统资源掉线时,重新将所述目标系统资源挂载到Jenkins主机上。
  6. 根据权利要求1所述的方法,其特征在于,还包括:
    将已创建构建任务转换为所述已创建构建任务对应的初始构建任务配置文件,所述初始构建任务配置文件包括所述已创建任务对应的任务定义,以及,当前系统环境中的系统资源和软件资源。
  7. 一种基于Jenkins工具的软件工程配置装置,其特征在于,包括:
    第一获取单元,用于当监测到目标软件项目的代码仓库的代码变化时,获取所述目标软件项目对应的目标构建任务配置文件;
    解析单元,用于解析所述目标构建任务配置文件获得所述构建任务所需的目标系统资源、依赖关系和任务定义,所述目标系统资源包括:所述构建任务所依赖的机器类型、机器规格和所依赖操作系统,所述机器类型包括虚拟机、容器、裸机或物理机;所述依赖关系用于说明所述构建任务所依赖的软件和Jenkins插件;所述任务定义用于定义所述构建任务的构建步骤和触发时间;
    第一配置单元,用于配置与所述目标系统资源相匹配的系统资源;
    第二配置单元,用于根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的目标软件和目标Jenkins插件;
    任务生成单元,用于根据所述任务定义生成构建任务。
  8. 根据权利要求7所述的装置,其特征在于,所述第一配置单元包括:
    第一查找子单元,用于查找当前系统环境中是否存在所述目标系统资源;当所述当前系统环境中存在所述目标系统资源时,由所述第二配置单元执行根据所述依赖关系,在当前系统环境中配置所述构建任务所依赖的软件和Jenkins插件;
    创建子单元,用于当所述当前系统环境中不存在所述目标系统资源,则创建所述目标系统资源。
  9. 根据权利要求7所述的装置,其特征在于,所述第二配置单元包括:
    第二查找子单元,用于查找当前操作系统中是否安装有所述构建任务所依赖的目标软件;
    第一获取子单元,用于当所述当前操作系统中未安装所述目标软件时,根据所述目标构建任务配置文件中包含的所述目标软件的下载地址获取所述目标软件,并安装所述目标软件;
    第三查找子单元,用于当所述当前操作系统中安装有所述目标软件时,继续查找所述Jenkins工具中是否安装有所述目标Jenkins插件;
    第二获取子单元,用于当所述Jenkins工具中未安装所述目标Jenkins插件时,根据所述目标构建任务配置文件中包含的目标Jenkins插件的下载地址获取所述目标Jenkins插件,并安装所述目标Jenkins插件;
    第一确定子单元,用于当所述Jenkins工具中安装有所述目标Jenkins插件时,确定所述当前系统环境中安装有所述目标软件和目标Jenkins插件。
  10. 根据权利要求7-9任一项所述的装置,其特征在于,所述任务生成单元,包 括:
    任务生成子单元,用于根据所述任务定义创建或更新所述构建任务;
    挂载子单元,用于将所述目标系统资源挂载到Jenkins主机上,以运行所述构建任务。
  11. 根据权利要求7所述的装置,其特征在于,还包括:
    监测单元,用于监测所述Jenkins工具的运行状态,以及,监测所述当前操作系统的运行状态;
    报警单元,用于当所述当前操作系统的运行状态存在异常时,产生告警信息;
    重新挂载单元,用于当所述Jenkins工具的运行状态是所述目标系统资源掉线时,重新将所述目标系统资源挂载到Jenkins主机上。
  12. 根据权利要求7所述的装置,其特征在于,还包括:
    配置文件生成单元,用于将已创建构建任务转换为所述已创建构建任务对应的初始构建任务配置文件,所述初始构建任务配置文件包括所述已创建任务对应的任务定义,以及,当前系统环境中的系统资源和软件资源。
PCT/CN2018/102918 2017-08-31 2018-08-29 基于Jenkins工具的软件项目构建任务配置方法及装置 WO2019042311A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710773700.8A CN107608710B (zh) 2017-08-31 2017-08-31 基于Jenkins工具的软件项目构建任务配置方法及装置
CN201710773700.8 2017-08-31

Publications (1)

Publication Number Publication Date
WO2019042311A1 true WO2019042311A1 (zh) 2019-03-07

Family

ID=61056757

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102918 WO2019042311A1 (zh) 2017-08-31 2018-08-29 基于Jenkins工具的软件项目构建任务配置方法及装置

Country Status (2)

Country Link
CN (1) CN107608710B (zh)
WO (1) WO2019042311A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111274041A (zh) * 2020-02-24 2020-06-12 北京达佳互联信息技术有限公司 图形处理器挂载方法、装置、电子设备及存储介质

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107608710B (zh) * 2017-08-31 2021-08-31 华为技术有限公司 基于Jenkins工具的软件项目构建任务配置方法及装置
CN108647010B (zh) * 2018-04-27 2021-11-26 武汉斗鱼网络科技有限公司 一种项目工程初始化的方法、终端设备及存储介质
CN108958843A (zh) * 2018-07-12 2018-12-07 成都数字天空科技有限公司 基于轻量化脚本的插件构建方法、系统、设备及介质
CN110895460A (zh) * 2018-09-13 2020-03-20 深圳市优必选科技有限公司 基于Jenkins的机器人系统集成方法、装置及终端设备
CN111414226A (zh) * 2019-01-07 2020-07-14 北京智融网络科技有限公司 一种任务沙箱的建立方法和系统
CN109871258A (zh) * 2019-01-17 2019-06-11 珠海金山网络游戏科技有限公司 基于分布式容器的修改主机配置的方法及装置
CN110096304A (zh) * 2019-03-16 2019-08-06 平安城市建设科技(深圳)有限公司 基于Jenkins的任务构建方法、装置、设备及存储介质
CN110286880B (zh) * 2019-06-17 2020-12-01 中国科学院软件研究所 一种面向GitHub与Travis CI的完整持续集成数据收集方法
CN110515625A (zh) * 2019-08-02 2019-11-29 苏州浪潮智能科技有限公司 任务构建方法、装置、设备及计算机可读存储介质
CN110888652B (zh) * 2019-10-24 2023-07-07 福建天泉教育科技有限公司 基于jenkins插件的多版本构建方法及终端
CN110955415B (zh) * 2019-12-03 2024-03-08 杭州当贝网络科技有限公司 一种投影多平台服务适配的方法
CN111144839B (zh) * 2019-12-17 2024-02-02 深圳市优必选科技股份有限公司 一种项目构建方法、持续集成系统及终端设备
CN112148462B (zh) * 2020-10-20 2023-03-28 上海新炬网络信息技术股份有限公司 基于Jenkins的CICD流程的处理方法
CN114650213A (zh) * 2020-12-18 2022-06-21 航天信息股份有限公司 配置Jenkins服务器集群的方法、装置、存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050132356A1 (en) * 2003-12-16 2005-06-16 Microsoft Corporation Self-describing software image update components
CN101515232A (zh) * 2008-02-21 2009-08-26 卓望数码技术(深圳)有限公司 一种软件持续集成系统及方法
CN105739966A (zh) * 2016-01-19 2016-07-06 浪潮软件集团有限公司 一种持续集成的方法及装置
CN105786691A (zh) * 2014-12-25 2016-07-20 重庆重邮信科通信技术有限公司 一种移动终端自动化集成测试装置、方法和系统
CN106815052A (zh) * 2017-01-10 2017-06-09 南威软件股份有限公司 一种适配多环境配置的快速部署系统的方法
CN107608710A (zh) * 2017-08-31 2018-01-19 华为技术有限公司 基于Jenkins工具的软件项目构建任务配置方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10121790B4 (de) * 2000-06-03 2006-11-23 International Business Machines Corp. Softwarekonfigurationsverfahren zur Verwendung in einem Computersystem
CN103207802B (zh) * 2012-01-12 2018-10-19 上海盛大网络发展有限公司 软件操作系统及方法
CN106095408B (zh) * 2016-05-31 2019-05-14 浙江网新恒天软件有限公司 一种数据监控和代码自动生成与部署的系统及方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050132356A1 (en) * 2003-12-16 2005-06-16 Microsoft Corporation Self-describing software image update components
CN101515232A (zh) * 2008-02-21 2009-08-26 卓望数码技术(深圳)有限公司 一种软件持续集成系统及方法
CN105786691A (zh) * 2014-12-25 2016-07-20 重庆重邮信科通信技术有限公司 一种移动终端自动化集成测试装置、方法和系统
CN105739966A (zh) * 2016-01-19 2016-07-06 浪潮软件集团有限公司 一种持续集成的方法及装置
CN106815052A (zh) * 2017-01-10 2017-06-09 南威软件股份有限公司 一种适配多环境配置的快速部署系统的方法
CN107608710A (zh) * 2017-08-31 2018-01-19 华为技术有限公司 基于Jenkins工具的软件项目构建任务配置方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111274041A (zh) * 2020-02-24 2020-06-12 北京达佳互联信息技术有限公司 图形处理器挂载方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN107608710A (zh) 2018-01-19
CN107608710B (zh) 2021-08-31

Similar Documents

Publication Publication Date Title
WO2019042311A1 (zh) 基于Jenkins工具的软件项目构建任务配置方法及装置
US11429365B2 (en) Systems and methods for automated retrofitting of customized code objects
US11561889B2 (en) Orchestration for automated performance testing
US9250672B2 (en) Cloning target machines in a software provisioning environment
US9038059B2 (en) Automatically targeting application modules to individual machines and application framework runtimes instances
US10666507B2 (en) Automatic reconfiguration of dependency graph for coordination of device configuration
US10595204B2 (en) Flexible remote server validation
US11169792B2 (en) Method and apparatus for generating patch
WO2015192608A1 (zh) 安卓系统中app的更新方法、终端及存储介质
CN110162334B (zh) 一种代码管理方法、装置及存储介质
US9116808B2 (en) Method and system for determining device configuration settings
WO2024002243A1 (zh) 应用管理方法、应用订阅方法及相关设备
CN111831567B (zh) 应用的测试环境配置方法、装置、系统和介质
US10452635B2 (en) Synchronizing files on different computing devices using file anchors
CN114968406B (zh) 一种插件管理方法、装置、电子设备及存储介质
CN109218338B (zh) 信息处理系统、方法和装置
WO2024002302A1 (zh) 应用管理方法、应用订阅方法及相关设备
CN113254045A (zh) 软件初始化方法、系统及计算机可读存储介质
CN111679842B (zh) 应用程序热更新处理方法、装置及系统
CN109032641B (zh) 应用版本更新方法及装置
CN111339055A (zh) 大数据集群扩容方法及装置
CN113495723B (zh) 一种调用功能组件的方法、装置及存储介质
WO2011157105A2 (zh) 组件扩展方法和装置
CN111488268A (zh) 自动化测试的调度方法和调度装置
JP6045707B2 (ja) ライセンス管理装置、ライセンス管理方法、及びプログラム

Legal Events

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

Ref document number: 18849699

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18849699

Country of ref document: EP

Kind code of ref document: A1