Pits encountered by multiple slaves in jenkins

    The jenkins configuration is as follows:

    Added two nodes (Slave Node) on Jenkins, and set a same label "windows" for both nodes. Created a new Job - "test-windows" with the option "Build a free-style software project". And to make multiple slaves build in parallel, I selected "Only allow jobs bound to this machine" and "windows" in "Label Expression".

image

However, this method cannot achieve parallel operation of multiple slaves. 90% of what is said online is unreliable.

    In the process of my use, I use label to manage multiple slaves, and assign this label to the construction of a project. I will find that multiple builds of this project use the same slave, and do not use other slaves in the label to go to Construct.

    After checking a lot of information, I found that the consistent hash algorithm was used in the scheduling algorithm of jenkins. Jenkins evaluates the priority list according to the added information, and selects the slave with the highest priority to build. When the optimal slave does not meet the conditions or does not The next slave will be selected only when there is an available execute.

    I checked a lot of information and found that when constructing a multi-configuration project, you can choose the slave at the time of construction. This enables multi-slave parallel builds.

image

    multi configuration project Instead of building multiple Configuration Matrix for free-style software projects, you can choose multiple slaves here. If lable is selected here, the default algorithm will still be used to select the optimal slave from the lable for construction.

image

When the configuration is completed and then build, parallel builds will be performed on multiple slaves at the same time

image

Prohibit running jobs or business-related operations on the master

set [executors] to 0e

image

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325352311&siteId=291194637