Jenkins work on two slaves?

We need to be able to run Jenkins, which consumes two slaves. (Or two tasks, if we can guarantee that they will work at the same time, and perhaps at least let someone know what the other is.) The situation is that we have an application with a large the weight that we need to run the tests against, Testing is performed on one machine, the application runs on another. It is unreasonable to have them on the same host.

We currently have a Jenkins job that uses a script to run a dedicated application server, install the correct version, the correct data, and then test it. This means that I cannot use a dedicated application server to run other tasks if intensive weight testing is not carried out. It also pretty much limits us to one cycle. The ability to assign an application server dynamically will allow more of them.

Obviously, there is no way to do this in basic jenkins, but I hope there is a plugin or hacking there to make this possible. The current test build is maven 2's job, but it is customizable if we need to wrap it with something else. This began with the successful completion of another assignment that could be changed to start two or something else.

+4
source share
2 answers

Let me see if I understood this problem.

  • You want to dynamically select a slave device and run the application server on it.

  • When the application server is running on a slave device, you do not want it to perform any other task.

  • But when the application server is not running, you want to use this slave like any other slave for other tasks.

One way is to designate Slaves. And use “Limit where this project can be run” to have the application server and test suite run on machines labeled Slave.

"# " 1. , .

, .

, , .

0

, pipeline node :

node('label1') {
    node('label2') {
        // your code here
        [...]
    }
}

. , .

+2

Source: https://habr.com/ru/post/1524179/


All Articles