Resource mange external nodes in Jenkins for tests

My problem is that I have code that requires a node reboot. I have many long Jenkins test cases that need to be run on rebooted nodes.

My existing solution is to define multiple "proxies" of machines in Jenkins with the same label (TestLable) and 1 performer per machine. I associate all test cases with a label (TestLable). In a test run of the script, I discover the Jenkins machine (Jenkins env. NODE_NAME) and use this to find out which physical physical machine the tests should use.

Does anyone know of a better solution?

The above works, but I need to identify a large number of "nodes / machines" that may not be needed. I would like to have a plugin that could provide a token to Jenkins work. Thus, the work will not be completed before the Jenkins executor and the token are free. The marker must be a string so my test cases can use it to know which external node it could use.

+3
source share
1 answer

We created our own scheduler, which selects material before launching Jenkins nodes. There may be a better solution, but it works for us mostly. I have yet to meet with a ready-made scheduler who can cope with the complex distribution of various hardware resources. We have n field types allocated for n construction types.

Some types of assembly that we have are incompatible with each other, without destroying all the persistent data, which may be required, since it takes a lot of time to collect. Some tasks require combinations of these types of equipment. We store data in a database, and then use business logic to determine how it is distributed. We often find that certain types of tasks require additional business logic or additional data fields to take into account their specific requirements.

Thus, the best way is to write your own planner in your own language that takes into account your specific needs.

0
source

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


All Articles