How to define tasks in Jenkins / Hudson for parallel work?

PROBLEM:. Given the number of jobs in Jenkins / Hudson, each is assigned a number, which we can call a level. This number varies from 1 to n, and several tasks can have the same level. Now I would like to define those (otherwise independent) tasks to run in such a way that level 1 should be created before level 2, and . I would like Jenkins / Hudson to run several tasks at the same level in parallel, if the subordinate performers on whom the tasks are set are free.

The fact that this level number does not matter, he simply identified to explain the problem.

IMPORTANT: I would like to automatically generate these tasks, because I know which tasks depend on them and which can be executed in parallel, so if the solution is some configuration in the config.xml file, it would be nice to hear about it so that I can The script will automatically generate these configuration files.

Jobs at level X can and should run in parallel, as many as possible.

Thank you for your time.

EDIT: There is another question that I would like to know if there is some elegant solution: if task X is launched using the Build Flow Plugin and it fails. Is there a way if I want the Build Flow plugin to start the same job again (after I fixed it) and continue normally for tasks defined through the plugin?

+6
source share
1 answer

There is a relatively new plugin for Jenkins called the Build Flow plugin. This plugin provides a new type of job in which you can define such job dependency structures with DSL. I think you can also do this automatically. The plugin is very powerful, you can find more information here . I do not know if this plugin will also work in Hudson, since it requires the minimum version of Jenkins 1.424, and the new version of Hudson also changed the xml configuration.

+9
source

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


All Articles