CN109032786A - Jenkins continuous integrating cluster, APP packaging method and server - Google Patents

Jenkins continuous integrating cluster, APP packaging method and server Download PDF

Info

Publication number
CN109032786A
CN109032786A CN201710428351.6A CN201710428351A CN109032786A CN 109032786 A CN109032786 A CN 109032786A CN 201710428351 A CN201710428351 A CN 201710428351A CN 109032786 A CN109032786 A CN 109032786A
Authority
CN
China
Prior art keywords
server
packing
task
packing task
primary
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
Application number
CN201710428351.6A
Other languages
Chinese (zh)
Inventor
冯波
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710428351.6A priority Critical patent/CN109032786A/en
Publication of CN109032786A publication Critical patent/CN109032786A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a kind of Jenkins continuous integrating cluster, APP packaging method and servers, for realizing the technical effect for being packaged the time and improving server reliability is shortened.The Jenkins continuous integrating cluster includes: primary server, and is connect with the primary server multiple from server;Multiple application APPs that the primary server is used to receive client submission are packaged task, according to multiple packing tasks, it determines and executes the described from server of each packing task, and each packing task is sent to corresponding described from server;It is described to be used to receive the packing task that the primary server is sent from server, and execute the packing task.

Description

Jenkins continuous integrating cluster, APP packaging method and server
Technical field
The present invention relates to field of computer technology more particularly to a kind of Jenkins continuous integrating clusters, APP packaging method And server.
Background technique
Charles Jenkins Jenkins continuous integrating is to provide the service of continuous integrating based on Jenkins.In the related art, respectively User end to server (i.e. Jenkins continuous integrating equipment) submits packing task, and server successively executes packing in order.
However, the required App Archive packing time is also increasingly longer with the exploitation and accumulation of application APP, thus lead The total time-consuming for causing server to complete all packings is very long.Also, if sorting preceding packing task abnormity, even result in service Device deadlock, then subsequent packing task can not just perform.
It is packaged the time so above-mentioned the relevant technologies there is technical issues that how to shorten and improves.
Summary of the invention
The embodiment of the invention provides a kind of Jenkins continuous integrating cluster, APP packaging method and servers, for real Now shorten the technical effect for being packaged the time and improving server reliability.
In a first aspect, the present invention provides a kind of Jenkins continuous integrating clusters, comprising:
Primary server, and connect with the primary server multiple from server;
Multiple application APPs that the primary server is used to receive client submission are packaged task, according to multiple described Packing task determines and executes the described from server of each packing task, and each packing task is sent to pair That answers is described from server;
It is described to be used to receive the packing task that the primary server is sent from server, and execute described be packaged and appoint Business.
Optionally, the primary server is used to be determined according to the affiliated type of multiple packing tasks corresponding each default The quantity of the packing task of type, the quantity based on the corresponding packing task of each preset kind is by multiple institutes The slave server group that corresponding each preset kind is divided into from server is stated, and corresponding according to each packing task It is corresponding described from described in one in server group that the packing task is sent to the preset kind by the preset kind From server.
Optionally, the primary server is also used to determine corresponding each title according to the title of multiple packing tasks The quantity of the packing task, the quantity based on the corresponding packing task of each title described will be drawn from server group It is divided into the slave server subgroup of corresponding each title, and according to the title of each packing task by the packing task It is sent to described in one from server subgroup of the corresponding title from server.
Optionally, the primary server is used to for the packing task to be sent to the weight highest from server subgroup It is described from server.
Optionally, the primary server be also used to according to it is each it is described where server described in from server group to institute It states from server and sends safety certificate.
Optionally, the primary server is also used to obtain each state from server, according to each described from clothes The state of business device is each described from the server distribution weight.
Second aspect, the present invention provides a kind of application APP packaging methods, are applied to Jenkins continuous integrating collection Group primary server, the Jenkins continuous integrating cluster further include connect with the primary server it is multiple from server, institute The method of stating includes:
It receives multiple APP that client is submitted and is packaged task;
According to multiple packing tasks, determines and execute the described from server of each packing task;
Each packing task is sent to it is corresponding described from server so that described receive the master from server The packing task that server is sent, and execute the packing task.
Optionally, it according to multiple packing tasks, determines and executes the described from server, packet of each packing task It includes:
The number of the packing task of corresponding each preset kind is determined according to the affiliated type of multiple packing tasks Amount;
Quantity based on the corresponding packing task of each preset kind described is divided into multiple from server The slave server group of corresponding each preset kind;
According to the corresponding preset kind of each packing task, determine that the preset kind is corresponding described from clothes Be engaged in device group in one described in from server be the server for executing the packing task.
Optionally, it according to multiple packing tasks, determines and executes the described from server of each packing task, also Include:
The quantity of the packing task of corresponding each title is determined according to the title of multiple packing tasks;
Quantity based on the corresponding packing task of each title by it is described be divided into from server group it is corresponding every The slave server subgroup of a title;
Determine that the preset kind is beaten from described in one in server group from server for execution is described described in corresponding The server of packet task, comprising:
According to the title of each packing task, determine that the title is corresponding described from one in server subgroup It is described from server be the server for executing the packing task.
Optionally, determine that the title is corresponding described from from server being execution institute described in one in server subgroup State the server of packing task, comprising:
From server for described in the execution packing task described in the determining weight from server subgroup is highest From server.
Optionally, the method also includes:
According to it is each it is described where server described in from server group to it is described from server send safety certificate.
Optionally, the method also includes:
Obtain each state from server;
According to it is each it is described from the state of server be each described to distribute the weight from server.
The third aspect, the present invention provides a kind of server, the server is the main clothes of Jenkins continuous integrating cluster Be engaged in device, the Jenkins continuous integrating cluster further include connect with the primary server it is multiple from server, the server Include:
Receiving module, multiple APP for receiving client submission are packaged task;
Determining module, for determining and executing the described from clothes of each packing task according to multiple packing tasks Business device;
First sending module, it is corresponding described from server for each packing task to be sent to, so that described The packing task that the primary server is sent is received from server, and executes the packing task.
Optionally, the determining module is used to be determined according to the affiliated type of multiple packing tasks corresponding each default The quantity of the packing task of type;Quantity based on the corresponding packing task of each preset kind is by multiple institutes State the slave server group that corresponding each preset kind is divided into from server;According to the corresponding institute of each packing task Preset kind is stated, determines that the preset kind is corresponding described described in execute described in one in server group from server The server of packing task.
Optionally, the determining module is also used to determine corresponding each title according to the title of multiple packing tasks The quantity of the packing task;Quantity based on the corresponding packing task of each title described will be drawn from server group It is divided into the slave server subgroup of corresponding each title;According to the title of each packing task, the title pair is determined It from server is the server for executing the packing task described in one from server subgroup answered.
Optionally, the determining module described is from server for determining that the weight from server subgroup is highest Execute the described from server of the packing task.
Optionally, the server further includes the second sending module, for according to each institute from where server It states and sends safety certificate from server from server group to described.
Optionally, the server further include:
Module is obtained, for obtaining each state from server;
Weight distribution module, for according to it is each it is described from the state of server be each described from described in server distribution Weight.
Fourth aspect, the present invention provides a kind of computer readable storage mediums, are stored thereon with computer program, the journey The step of any one of second aspect the method is realized when sequence is executed by processor.
5th aspect, the present invention provides a kind of server, including memory, processor and storage are on a memory and can The computer program run on a processor, the processor realize any one of second aspect the method when executing described program The step of.
Said one or multiple technical solutions in the embodiment of the present application at least have following one or more technology effects Fruit:
In the technical solution of the embodiment of the present invention, Jenkins continuous integrating cluster includes primary server and multiple from clothes Business device, the primary server are used to receive multiple packing tasks of client submission, and according to multiple packing tasks, determination is held The each packing task of row it is described from server, and each packing task is sent to corresponding described from service Device, it is described to be used to receive the packing task that the primary server is sent from server, and execute the packing task.It can See, by by multiple packing tasks distribute to it is multiple it is described executed parallel from server, execute phase compared to the prior art With the packing task of quantity, the embodiment of the present invention, which shortens, is packaged the time.Also, as executing described in packing task from service Device has multiple, even if wherein one or more are described from server deadlock, the subsequent packing task can distribute to other It is described to be executed from server, thus avoid deadlock and the consequence that causes subsequent packing task that can not execute, so improve clothes Business device reliability.
Detailed description of the invention
Fig. 1 is a kind of configuration diagram of Jenkins continuous integrating cluster in the embodiment of the present invention;
Fig. 2 is the configuration diagram of another kind Jenkins continuous integrating cluster in the embodiment of the present invention;
Fig. 3 is the configuration diagram of another kind Jenkins continuous integrating cluster in the embodiment of the present invention;
Fig. 4 is the flow chart of APP packaging method in the embodiment of the present invention;
Fig. 5 is the structural schematic diagram of a server in the embodiment of the present invention;
Fig. 6 is the structural schematic diagram of another server in the embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of Jenkins continuous integrating cluster, APP packaging method and servers, for real Now shorten the technical effect for being packaged the time and improving server reliability.
In order to solve the above technical problem, the present invention provides technical solution general thought it is as follows:
In the technical solution of the embodiment of the present invention, Jenkins continuous integrating cluster includes primary server and multiple from clothes Business device, the primary server are used to receive multiple packing tasks of client submission, and according to multiple packing tasks, determination is held The each packing task of row it is described from server, and each packing task is sent to corresponding described from service Device, it is described to be used to receive the packing task that the primary server is sent from server, and execute the packing task.It can See, by by multiple packing tasks distribute to it is multiple it is described executed parallel from server, execute phase compared to the prior art With the packing task of quantity, the embodiment of the present invention, which shortens, is packaged the time.Also, as executing described in packing task from service Device has multiple, even if wherein one or more are described from server deadlock, the subsequent packing task can distribute to other It is described to be executed from server, thus avoid deadlock and the consequence that causes subsequent packing task that can not execute, so improve clothes Business device reliability.
Technical solution of the present invention is described in detail below by attached drawing and specific embodiment, it should be understood that the application Specific features in embodiment and embodiment are the detailed description to technical scheme, rather than to present techniques The restriction of scheme, in the absence of conflict, the technical characteristic in the embodiment of the present application and embodiment can be combined with each other.
The terms "and/or", only a kind of incidence relation for describing affiliated partner, indicates that there may be three kinds of passes System, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.In addition, herein Middle character "/" typicallys represent the relationship that forward-backward correlation object is a kind of "or".
First aspect present invention provides a kind of Jenkins continuous integrating cluster.
Jenkins is derived from Hudson Hudson, is the open source integration tool based on Java written in Java, provides Software development continuous integrating service, it operates in Java Servlet container, support SCM tool (including AccuRev SCM, CVS, Subversion, Git, Perforce, Clearcase and RTC), it can execute based on Apache The project of Ant and Apache Maven, and arbitrary Shell script and Windows errorlevel.Continuous integrating is a kind of Practice of software, program member continually integrates in practice, can all be constructed by automation after integrating (including survey Examination).Large-scale team greatly reduces integration problem using such method and can rapidly develop the soft of high cohesion Part.
As shown in Figure 1, Jenkins continuous integrating cluster in the embodiment of the present invention include a primary server and it is multiple from Server, it is multiple to be connect from server with primary server.Although Jenkins continuous integrating cluster includes primary server and more It is a that but Jenkins continuous integrating cluster unanimously provides service to each client from server, so client can will From the point of view of Jenkins continuous integrating cluster is as a server.Wherein, client refers to that submitting application APP to be packaged appoints Terminal used in being engaged in, such as tablet computer or all-in-one machine etc..
Specifically, the packing task of client submits to primary server, so primary server is for receiving each client The APP that end is submitted is packaged task.After primary server receives multiple packing tasks, according to multiple packing tasks, determines and execute each The slave server of packing task, and each packing task is sent to corresponding from server.
Wherein, in one embodiment, primary server receives multiple packing tasks and refers to that primary server reception is default The packing task of quantity.Preset quantity can be according to being actually configured.In other words, primary server is receiving enough present counts After the packing task of amount, the slave server specifically executed is distributed for the packing task of this preset quantity.After being assigned, then weigh Newly wait the packing task of enough preset quantities, and again sub-distribution from server.Alternatively, in another embodiment, due to The client of access Jenkins continuous integrating cluster has multiple, and each client is as required at any time to Jenkins continuous integrating Cluster submits packing task, therefore the packing task that primary server receives at any time may be multiple.So in this kind of reality It applies in mode, to be divided constantly, primary server is that the packing task received at each moment is distributed from server.Specific real During now, any of the above-described kind of embodiment can be used, or combine two kinds of embodiments, this hair in the absence of conflict It is bright to be not particularly limited.
Primary server determines embodiment there are many slave servers for executing each packing task according to multiple packing tasks. For example, according to multiple affiliated types of packing task, mark off a certain number of to come from server for the packing task of each type Execute the packing task of the type.Alternatively, being that the packing task of different names divides for example according to the title of multiple packing tasks A certain number of packing tasks that the title is executed from server.Alternatively, resource for example will be occupied according to packing required by task, Be to be packaged task distribution from server, be further, for example, occupy resource higher packing task distribution surplus resources it is more from Server, it is less from server to occupy the less packing task distribution surplus resources of resource.It below, will be to wherein several Kind embodiment is specifically introduced.During specific implementation, those skilled in the art can basis It is actually selected, the present invention is not particularly limited.
Determined for each packing task corresponding after server, each packing task is sent correspondence by primary server Slave server in.In turn, after server reception packing task, packing task is executed, to complete to be packaged.
Seen from the above description, by by multiple packing tasks distribute to it is multiple executed parallel from server, compared to existing There is technology to execute the packing task of identical quantity, the embodiment of the present invention, which shortens, is packaged the time.Also, due to executing packing task Slave server have it is multiple, even if wherein one or more are from server deadlock, subsequent packing task can distribute to other from Server executes, and thus avoids the consequence that deadlock causes subsequent packing task that can not execute, so it is reliable to improve server Property.
Several primary servers are determined below and execute that packing task is corresponding is introduced from the embodiment of server.? During specific implementation, including but not limited to following several embodiments.
The first:
In the first embodiment, primary server is specifically used for:
The number of the packing task of corresponding each preset kind is determined according to the affiliated type of multiple packing tasks Amount, the quantity based on the corresponding packing task of each preset kind by it is multiple it is described are divided into from server it is corresponding every The slave server group of a preset kind, and according to the corresponding preset kind of each packing task by the packing Task be sent to the preset kind it is corresponding it is described from described in one in server group from server.
Specifically, it is packaged the affiliated type in the attribute of task including packing task.In embodiments of the present invention, type Including but not limited to xcodeproj, provisioning_profile_specifier and code_sign_identity etc..It is main Server determines the affiliated type of packing task by reading the attribute of packing task.
Preset kind, such as xcodeproj, provisioning_profile_ are previously provided in primary server Specifier and code_sign_identity etc., those skilled in the art can according to need statistics packing task quantity Preset kind is arranged in type.The affiliated type for reading out multiple packing tasks, further counts the packing of each preset kind The quantity of task.For example, by following code count xcodeproj, provisioning_profile_specifier and The packing task quantity of code_sign_identity type.
match_provisioning_profile_specifier(
Xcodeproj:{ xcworkspace_name }, // obtain certificate
Provisioning_profile_specifier:{ xcworkspace_provision } // verifying authorization
code_sign_identity:'iPhone Developer',
target:{Target_name}',
Development_team: " Temp_id " // verifying engineering legitimacy
)
In order to shorten the packing time, simultaneously for reasonable distribution from server resource, it is corresponding that primary server is based on each preset kind The quantity of packing task is divided to multiple from server, and then will be multiple multiple from server group from server division, such as Shown in Fig. 2.Specifically, if the corresponding packing task quantity of a preset kind is more, primary server divides plurality The slave server of amount is corresponding from server group as the preset kind;, whereas if corresponding be packaged of a preset kind is appointed Business negligible amounts, then primary server divides small number of corresponding from server group as the preset kind from server.Often It is a from server group include zero, it is one or more from server.
As an example it is assumed that 10 are shared from server, and in 100 packing tasks being currently received, xcodeproj The packing task of type has 77, and the packing task of provisioning_profile_specifier type has 23.So, Primary server will be divided into two from server group from server, wherein first from server group include 8 from server, it is right Answer xcodeproj type;Second includes 2 from server from server group, corresponds to provisioning_profile_ Specifier type.
In addition, it will be appreciated by those skilled in the art that although primary server " is based on the corresponding institute of each preset kind The quantity of packing task is stated by multiple slave server groups for being divided into corresponding each preset kind from server ", but Be, if the corresponding packing task quantity of some preset kind is zero, in order to further shorten be packaged time and reasonable distribution from Server, primary server can not divide for the preset kind from server group.So, will be equal to from the quantity of server group or It less than the quantity of preset kind, and include each one or more from server from server group.
Next, primary server sends the packing task according to the affiliated type of task is packaged for each packing task It is executed to any one in the slave server group of corresponding preset kind from server.
Example above is continued to use, in the 100 packing tasks received, the affiliated type of first packing task is Xcodeproj, then first packing task is sent to first from any one in server group from service by primary server Device executes.
It can be seen from foregoing description in the first embodiment, divide to be packaged a fairly large number of preset kind of task With a fairly large number of from server, guarantee to avoid a large amount of same types from being packaged task due to not having from server resource reasonable distribution Sufficient device resource and extend be packaged the time.
Second:
In the second embodiment, primary server is specifically used for:
The number of the packing task of corresponding each preset kind is determined according to the affiliated type of multiple packing tasks Amount, the quantity based on the corresponding packing task of each preset kind by it is multiple it is described are divided into from server it is corresponding every The slave server group of a preset kind, and according to the corresponding preset kind of each packing task by the packing It is corresponding described highest described from server from the weight in server group that task is sent to the preset kind.
It is no longer repeated for the something in common of second of embodiment and the first embodiment.Second embodiment with The first embodiment the difference is that: primary server is multiple from server group, main clothes in addition to that will be divided into from server Be engaged in device also according to it is each from the state of server be each to distribute weight from server, and packing task is distributed to from service Weight is highest in device group executes from server.
Specifically, primary server obtains each state from server in real time, and dynamically for each from server point With weight.It wherein, include but is not limited to from the CPU usage of server, memory usage, active thread from the state of server Quantity, interface quantity and network speed etc..It is better from the state of server, for example, CPU usage is lower, memory usage more Low, active thread quantity less, interface quantity it is much higher with network speed, primary server be this from server dynamically distribute Weight is then higher;Conversely, the state from server is poorer, such as CPU usage is higher, memory usage is higher, active thread Quantity is more, interface quantity is lower with network speed less, and primary server is that the weight dynamically distributed from server is then lower. So, that packing task is distributed to the weight from server group is highest from server, thereby guarantees that each packing task can With distribute to currently from server group it is in the best state from server execute, and then reduce be packaged task queue wait when Between, the slave server that packing task distributes to deadlock is also avoided, further shortens and is packaged the time, improves server reliability.
Continue to use for example above, when distributing first packing task, first from 8 in server group from Server ip address and weight are as follows:
192.168.0.101weight:25
192.168.0.102weight:15
192.168.0.103weight:10
192.168.0.104weight:10
192.168.0.105weight:10
192.168.0.106weight:10
192.168.0.107weight:10
192.168.0.108weight:10
Wherein, " 192.168.0.101weight:25 " indicates from the IP address of server to be 192.168.0.101, weight It is 25.It remaining 7 and so on, just no longer details one by one herein.Since IP address is the slave clothes of 192.168.0.101 at this time Be engaged in device weight highest, therefore primary server by first packing task be sent to first from server group IP address be 192.168.0.101 slave server execute.
The third:
In conjunction with the first embodiment, in the third embodiment, primary server is further used for:
The quantity that the packing task of corresponding each title is determined according to the title of multiple packing tasks, based on every The quantity of the corresponding packing task of a title by it is described from server group be divided into corresponding each title from Server subgroup, and the packing task is sent to described in the corresponding title according to the title of each packing task From described in one in server subgroup from server.
Specifically, it is packaged the title that packing task is still further comprised in the attribute of task.In embodiments of the present invention, The title of packing task, which can according to need, presets one or more, and the present invention is not particularly limited.Primary server passes through The attribute for reading packing task determines the title of packing task, further counts the quantity of the packing task of each title.Example Such as, xcodeproj, provisioning_profile_specifier and code_sign_ are counted by following code The packing task quantity of each title under identity type.
match_job_name_specifier(
Xcodeproj:{ xcworkspace_name }, // obtain certificate
job_name:{job_name}
code_sign_identity:'iPhone Developer',
target:{Target_name}',
Development_team: " Temp_id " // it is verified automatically using highest permission and from server permission Match
)
In order to further shorten the packing time, simultaneously reasonable distribution is from server resource, and primary server is based on each preset kind Under the corresponding packing task of each title quantity by it is each be further divided into from server group it is multiple from server subgroup, such as Shown in Fig. 3.Specifically, if the quantity of the corresponding packing task of a title is more, primary server divides a greater number Slave server it is corresponding from server subgroup as the title;, whereas if the quantity of the corresponding packing task of a title Less, then primary server divides small number of corresponding from server subgroup as the title from server.Each from service Device subgroup includes one or more from server.
It continues to use for example above, the packing task of xcodeproj type has 77, for xcodeproj type First from server group include 8 from server.In 77 packing tasks of xcodeproj type, entitled AAA's Packing task has 50, and the packing task of entitled BBB has 27.So, primary server divides first from server group For two from server subgroup, wherein first from server subgroup include 5 from server, corresponding A AA;Second from service Device subgroup includes 3 from server, corresponds to BBB.The packing task of provisioning_profile_specifier type has 23, for second of provisioning_profile_specifier type from server group include 2 from server. In 23 packing tasks of provisioning_profile_specifier type, the packing task of entitled CCC has 11 A, the packing task of entitled DDD has 12.So, primary server is divided into two from service from server group for second Device subgroup corresponds to CCC wherein first includes 1 from server from server subgroup;Second includes 1 from server subgroup It is a from server, corresponding DDD.
Next, primary server, will according to the affiliated type and title of each packing task for each packing task The packing task is sent to any one corresponding from server subgroup and executes from server.
Example above is continued to use, in the 100 packing tasks received, the affiliated type of first packing task is Xcodeproj, entitled AAA, then first packing task is sent to first first from server group by primary server It is executed from any one in server subgroup from server.
It can be seen from foregoing description in the third embodiment, number is distributed to be packaged a fairly large number of title of task It measures more from server, guarantees to avoid largely being packaged task due to there is no abundance with title from server resource reasonable distribution Device resource and extend be packaged the time.
4th kind:
In conjunction with the third embodiment, in the 4th kind of embodiment, primary server is sent to from clothes will be packaged task When any one in device subgroup of being engaged in is from server, described weighed from server subgroup specifically for the packing task to be sent to Weight is highest described from server.
It continues to use for example above, when distribution executes the slave server of first packing task, first from clothes First of device group of being engaged in is as follows from 5 in server subgroup from server ip address and weight:
192.168.0.101weight:25
192.168.0.102weight:15
192.168.0.103weight:10
192.168.0.104weight:10
192.168.0.105weight:10
Since IP address is the slave server weight highest of 192.168.0.101 at this time, primary server is by first Packing task is sent to the slave clothes that IP address in first first server subgroup from server group is 192.168.0.101 Business device executes.
During specific implementation, the including but not limited to above several embodiments.Those skilled in the art can basis Any one embodiment of actual selection, the present invention are not particularly limited.
Further, in conjunction with any embodiment in above embodiment, primary server is further also used to:
According to it is each it is described where server described in from server group to it is described from server send safety certificate.
Specifically, since the affiliated type of received multiple packing tasks and title may not every time for primary server Together, therefore, primary server is specifically to divide according to the actual conditions dynamic of the multiple packing tasks received every time from server Group and from server subgroup.Therefore, for from server, where slave server group and be also that can send out from server subgroup Changing.
In order to guarantee smoothly execute packing task from server, primary server is completed from server group and from service After the division of device subgroup, according to each slave server group from where server and place from server subgroup, to each Corresponding safety certificate is sent from server.
Further, it completes from server group and after the division of server subgroup, primary server is also used to:
Obtain the state from server, according to it is each it is described from the state of server be each described from service Device distributes the weight.
For example, other pretreatments such as safety certificate transmission, weight distribution can be realized by following process:
Platform:ios do
gym(
Workspace: "/# { workspaceName } .xcworkspace ", // allocation project name
Scheme: " # { schemeName } ", // configuration entry name
Silent:true, // silence packing manner
Clean:true, // remove old building packet
Configuration:configuration, // configuration file do not expose
Output_directory: " ./build ", // export folders path
Output_name:outputName, // export file name
Export_method:method, // configuration export mode are method secrecy
Destination: " generic/platform=iOS ", // platform are described as ios platform
)
end
Building Jenkins continuous integrating cluster is introduced below.
The working field of Jenkins is disposed on primary server, includes multiple nodes in the working field.Primary server will Jenkins project is published to from server, deploying projects to different male cat tomcat or application server from server Jboss, material is thus formed Jenkins continuous integrating clusters.Installation Jenkins is not needed from server, it is only necessary to from clothes The corresponding working space of each node is disposed on business device.The step of specific building cluster, is as follows:
(1) increase Jenkins node (i.e. from server):
Node IP address, such as 192.168.0.101 above etc. are set from server to be each.To be each from service Unified starting verification mode is arranged in device.The starting verification mode can be any verification mode, such as SSH (containment agreement, Secure Shell) etc..And for domain name etc. each is arranged from server.
(2) nodal community is set:
Maximum execution task quantity, such as 5 or 6 etc. are set from server to be each.Work is established from server to be each Catalogue.It is arranged each from the road the JDK of server (Software Development Kit of Java language, Java Development Kit) Diameter.
(3) start primary server:
Pass through script command sudo launchctl load/Library/LaunchDaemons/org.jenkins- Ci.plist starts primary server.
(4) start each node:
Start all safe-conducts from server, distributed from server downloading primary server by Launch agent mode Book, and it is stored in local.
In embodiments of the present invention, primary server will be each from the configuration of the path server JDK and the path primary server JDK one It causes as preferably selection.On the one hand, facilitate primary server to enter by the unified path JDK to be arbitrarily managed from server, separately On the one hand, it when the subsequent slave server increased newly does not need that the path JDK is separately provided again.
In addition, in embodiments of the present invention, the old construction of client automatic packaging, discarding is established new for client Construction.Specifically, client can be realized by operation following code:
Export LANG=en_US.UTF-8
Export LANGUAGE=en_US.UTF-8
Export LC_ALL=en_US.UTF-8
Export PATH="/usr/local/bin:$ PATH "
echo"rm-rf build"
rm-rf build
echo"mkdir build"
mkdir build
sh${workspace}/build.sh${jobname}${buildNum}${ExportMethod}
cd${workspace}/build
Based on inventive concept same as Jenkins continuous integrating cluster in previous embodiment, second aspect of the present invention is also A kind of APP packaging method is provided, is applied to primary server, as shown in Figure 4, comprising:
S101: multiple APP that client is submitted are received and are packaged task;
S102: it according to multiple packing tasks, determines and executes the described from server of each packing task;
S103: each packing task is sent to it is corresponding described from server so that described receive from server The packing task that the primary server is sent, and execute the packing task.
Wherein, S102 is specifically included:
The number of the packing task of corresponding each preset kind is determined according to the affiliated type of multiple packing tasks Amount;
Quantity based on the corresponding packing task of each preset kind described is divided into multiple from server The slave server group of corresponding each preset kind;
According to the corresponding preset kind of each packing task, determine that the preset kind is corresponding described from clothes Be engaged in device group in one described in from server be the server for executing the packing task.
Further, S102 can also include:
The quantity of the packing task of corresponding each title is determined according to the title of multiple packing tasks;
Quantity based on the corresponding packing task of each title by it is described be divided into from server group it is corresponding every The slave server subgroup of a title;
Determine that the preset kind is beaten from described in one in server group from server for execution is described described in corresponding The server of packet task, comprising:
According to the title of each packing task, determine that the title is corresponding described from one in server subgroup It is described from server be the server for executing the packing task.
Further, determine that the title is executed from described in one in server subgroup from server described in corresponding The server of the packing task, comprising:
From server for described in the execution packing task described in the determining weight from server subgroup is highest From server.
Further, the method also includes:
According to it is each it is described where server described in from server group to it is described from server send safety certificate.
Further, the method also includes:
Obtain each state from server;
According to it is each it is described from the state of server be each described to distribute the weight from server.
The various change mode and specific example of Jenkins continuous integrating cluster in earlier figures 1- Fig. 3 embodiment are same Suitable for the APP packaging method of the present embodiment, pass through the aforementioned detailed description to Jenkins continuous integrating cluster, this field skill Art personnel are clear that the implementation method of APP packaging method in the present embodiment, so in order to illustrate the succinct of book, herein No longer it is described in detail.
Based on inventive concept same as Jenkins continuous integrating cluster in previous embodiment, third aspect present invention is also A kind of server is provided, the server is primary server described previously, as shown in figure 5, the server includes:
Receiving module 101, multiple APP for receiving client submission are packaged task;
Determining module 102, for according to multiple packing tasks, determine execute each packing task it is described from Server;
First sending module 103, it is corresponding described from server for each packing task to be sent to, so that institute It states from server and receives the packing task that the primary server is sent, and execute the packing task.
Specifically, determining module 102 is used to determine that correspondence is each pre- according to the affiliated type of multiple packing tasks If the quantity of the packing task of type;Quantity based on the corresponding packing task of each preset kind will be multiple The slave server group that corresponding each preset kind is divided into from server;It is corresponding according to each packing task The preset kind determines that the preset kind is corresponding described from from server being execution institute described in one in server group State the server of packing task.
Further, determining module 102 is also used to determine corresponding each title according to the title of multiple packing tasks The quantity of the packing task;Quantity based on the corresponding packing task of each title described will be drawn from server group It is divided into the slave server subgroup of corresponding each title;According to the title of each packing task, the title pair is determined It from server is the server for executing the packing task described in one from server subgroup answered.
Further, determining module 102 is for determining that the weight from server subgroup is highest described from server To execute described in the packing task from server.
Further, the server further includes the second sending module, for according to each described where server It is described to send safety certificate from server from server group to described.
Further, the server further include:
Module is obtained, for obtaining each state from server;
Weight distribution module, for according to it is each it is described from the state of server be each described from described in server distribution Weight.
The various change mode and specific example of Jenkins continuous integrating cluster in earlier figures 1- Fig. 3 embodiment are same Suitable for the server of the present embodiment, pass through the aforementioned detailed description to Jenkins continuous integrating cluster, those skilled in the art The implementation method of server in the present embodiment is clear that, so this will not be detailed here in order to illustrate the succinct of book.
Based on inventive concept same as Jenkins continuous integrating cluster in previous embodiment and APP packaging method, this hair It is bright that a kind of computer readable storage medium is also provided, it is stored thereon with computer program, realization when which is executed by processor The step of either primary server execution described previously method.
Based on inventive concept same as Jenkins continuous integrating cluster in previous embodiment and APP packaging method, this hair It is bright that a kind of server is also provided, including memory 204, processor 202 and storage can run on a memory and on a processor Computer program, the processor realizes that primary server described previously either executes the step of method when executing described program Suddenly.
Wherein, in Fig. 6, bus architecture (is represented) with bus 200, and bus 200 may include any number of interconnection Bus and bridge, bus 200 will include the one or more processors represented by processor 202 and what memory 204 represented deposits The various circuits of reservoir link together.Bus 200 can also will peripheral equipment, voltage-stablizer and management circuit etc. it Various other circuits of class link together, and these are all it is known in the art, therefore, no longer carry out further to it herein Description.Bus interface 206 provides interface between bus 200 and receiver 201 and transmitter 203.Receiver 201 and transmitter 203 can be the same element, i.e. transceiver, provide the unit for communicating over a transmission medium with various other devices.
Processor 202 is responsible for management bus 200 and common processing, and memory 204 can be used for storage processor 202 when executing operation used data.
The various change mode and specific example of Jenkins continuous integrating cluster in earlier figures 1- Fig. 3 embodiment are same Suitable for the server of the present embodiment, pass through the aforementioned detailed description to Jenkins continuous integrating cluster, those skilled in the art The implementation method of server in the present embodiment is clear that, so this will not be detailed here in order to illustrate the succinct of book.
Said one or multiple technical solutions in the embodiment of the present application at least have following one or more technology effects Fruit:
In the technical solution of the embodiment of the present invention, Jenkins continuous integrating cluster includes primary server and multiple from clothes Business device, the primary server are used to receive multiple packing tasks of client submission, and according to multiple packing tasks, determination is held The each packing task of row it is described from server, and each packing task is sent to corresponding described from service Device, it is described to be used to receive the packing task that the primary server is sent from server, and execute the packing task.It can See, by by multiple packing tasks distribute to it is multiple it is described executed parallel from server, execute phase compared to the prior art With the packing task of quantity, the embodiment of the present invention, which shortens, is packaged the time.Also, as executing described in packing task from service Device has multiple, even if wherein one or more are described from server deadlock, the subsequent packing task can distribute to other It is described to be executed from server, thus avoid deadlock and the consequence that causes subsequent packing task that can not execute, so improve clothes Business device reliability.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of Jenkins continuous integrating cluster characterized by comprising
Primary server, and connect with the primary server multiple from server;
Multiple application APPs that the primary server is used to receive client submission are packaged task, according to multiple packings Task determines and executes the described from server of each packing task, and each packing task is sent to corresponding It is described from server;
It is described to be used to receive the packing task that the primary server is sent from server, and execute the packing task.
2. Jenkins continuous integrating cluster as described in claim 1, which is characterized in that the primary server is used for according to more The affiliated type of a packing task determines the quantity of the packing task of corresponding each preset kind, based on each described Multiple described are divided into from server are corresponded to each preset kind by the quantity of the corresponding packing task of preset kind Slave server group, and according to each packing task corresponding preset kind the packing task is sent to described Preset kind it is corresponding it is described from described in one in server group from server.
3. Jenkins continuous integrating cluster as claimed in claim 2, which is characterized in that the primary server is also used to basis The title of multiple packing tasks determines the quantity of the packing task of corresponding each title, is based on each title pair The quantity for the packing task answered by the slave server subgroup for being divided into corresponding each title from server group, and The packing task is sent to described in the corresponding title from server subgroup according to the title of each packing task In one described in from server.
4. Jenkins continuous integrating cluster as claimed in claim 3, which is characterized in that the primary server is used for will be described It is highest described from server that packing task is sent to the weight from server subgroup.
5. such as the described in any item Jenkins continuous integrating clusters of claim 2-4, which is characterized in that the primary server is also For according to it is each it is described where server described in from server group to it is described from server send safety certificate.
6. Jenkins continuous integrating cluster as claimed in claim 4, which is characterized in that the primary server is also used to obtain The state from server, according to it is each it is described from the state of server be each described to distribute the power from server Weight.
7. a kind of application APP packaging method, which is characterized in that applied to the primary server of Jenkins continuous integrating cluster, The Jenkins continuous integrating cluster further include connect with the primary server it is multiple from server, which comprises
It receives multiple APP that client is submitted and is packaged task;
According to multiple packing tasks, determines and execute the described from server of each packing task;
Each packing task is sent to it is corresponding described from server so that described receive the main service from server The packing task that device is sent, and execute the packing task.
8. a kind of server, which is characterized in that the server is the primary server of Jenkins continuous integrating cluster, described Jenkins continuous integrating cluster further includes connecting with the primary server multiple from server, and the server includes:
Receiving module, multiple APP for receiving client submission are packaged task;
Determining module, for determining and executing the described from server of each packing task according to multiple packing tasks;
First sending module, it is corresponding described from server for each packing task to be sent to, so that described from clothes Business device receives the packing task that the primary server is sent, and executes the packing task.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The step of claim 7 the method is realized when row.
10. a kind of server including memory, processor and stores the computer that can be run on a memory and on a processor Program, which is characterized in that the step of processor realizes claim 7 the method when executing described program.
CN201710428351.6A 2017-06-08 2017-06-08 Jenkins continuous integrating cluster, APP packaging method and server Pending CN109032786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710428351.6A CN109032786A (en) 2017-06-08 2017-06-08 Jenkins continuous integrating cluster, APP packaging method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710428351.6A CN109032786A (en) 2017-06-08 2017-06-08 Jenkins continuous integrating cluster, APP packaging method and server

Publications (1)

Publication Number Publication Date
CN109032786A true CN109032786A (en) 2018-12-18

Family

ID=64629258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710428351.6A Pending CN109032786A (en) 2017-06-08 2017-06-08 Jenkins continuous integrating cluster, APP packaging method and server

Country Status (1)

Country Link
CN (1) CN109032786A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110262970A (en) * 2019-06-14 2019-09-20 浪潮软件集团有限公司 A kind of method and system based on Hadoop big data cluster API automatic test
CN110471748A (en) * 2019-07-04 2019-11-19 口碑(上海)信息技术有限公司 Task processing method, device and the equipment of server cluster

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808118A (en) * 2010-03-02 2010-08-18 浪潮(北京)电子信息产业有限公司 Access method, device and system of server
CN104539725A (en) * 2015-01-15 2015-04-22 北京金和软件股份有限公司 Method for clustering and packaging generated APP
CN105721595A (en) * 2016-03-03 2016-06-29 上海携程商务有限公司 IOS APP packaging method and system
CN106101232A (en) * 2016-06-16 2016-11-09 北京思源置地科技有限公司 Load-balancing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808118A (en) * 2010-03-02 2010-08-18 浪潮(北京)电子信息产业有限公司 Access method, device and system of server
CN104539725A (en) * 2015-01-15 2015-04-22 北京金和软件股份有限公司 Method for clustering and packaging generated APP
CN105721595A (en) * 2016-03-03 2016-06-29 上海携程商务有限公司 IOS APP packaging method and system
CN106101232A (en) * 2016-06-16 2016-11-09 北京思源置地科技有限公司 Load-balancing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110262970A (en) * 2019-06-14 2019-09-20 浪潮软件集团有限公司 A kind of method and system based on Hadoop big data cluster API automatic test
CN110471748A (en) * 2019-07-04 2019-11-19 口碑(上海)信息技术有限公司 Task processing method, device and the equipment of server cluster

Similar Documents

Publication Publication Date Title
KR101614052B1 (en) System and method for configuring cloud computing systems
CN107637042B (en) Custom communication channel for application deployment
US9413819B1 (en) Operating system interface implementation using network-accessible services
CN109656538A (en) Generation method, device, system, equipment and the medium of application program
JP6045134B2 (en) Parallel workload simulation for application performance testing
KR20150043377A (en) System and method for tuning a cloud computing system
WO2014035309A1 (en) Re-configuration in cloud computing environments
CN114327861B (en) Method, device, system and storage medium for executing EDA task
US10452442B2 (en) System and method for resource management
US8027817B2 (en) Simulation management within a grid infrastructure
CN112288423A (en) Aggregation payment method and system of distributed framework
CN112463375A (en) Data processing method and device
Rubio-Montero et al. GWpilot: Enabling multi-level scheduling in distributed infrastructures with GridWay and pilot jobs
WO2020172692A2 (en) Dynamic resource tuning cloud service
CN109104368B (en) Connection request method, device, server and computer readable storage medium
Xiong et al. Challenges for building a cloud native scalable and trustable multi-tenant AIoT platform
Iorio et al. Computing without borders: The way towards liquid computing
Huang et al. HCloud: A trusted JointCloud serverless platform for IoT systems with blockchain
Boob et al. Automated instantiation of heterogeneous fast flow CPU/GPU parallel pattern applications in clouds
Wang et al. Schedule distributed virtual machines in a service oriented environment
CN109032786A (en) Jenkins continuous integrating cluster, APP packaging method and server
Fokaefs et al. Enabling devops for containerized data-intensive applications: an exploratory study.
US20230138867A1 (en) Methods for application deployment across multiple computing domains and devices thereof
Rak et al. Chase: An autonomic service engine for cloud environments
CN107357603A (en) A kind of method for loading software, equipment and system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181218