title: How to define jobs in Jenkins/Hudson to run in parallel?
body: <p><strong>PROBLEM:</strong> Given a number of jobs in Jenkins/Hudson, each assigned a number we can call level. This number ranges from 1 to n, and multiple jobs can have the same level. Now, I would like to define those (otherwise independent) jobs to run such that level 1 must build before level 2, <strong>and</strong> I would like Jenkins/Hudson to start multiple jobs at the same level in parallel if the slave executors on which the jobs are defined are free. </p>
  
  <p>What this level number is doesn't matter, it's just defined to explain the problem.</p>
  
  <p><strong>IMPORTANT:</strong> I would like the possibility of generating those jobs automatically, because I know which jobs depend of which and which can run in parallel, so if the solution is some configuration in the config.xml, it would be nice to hear about that, such that I can script automatic generation of those configuration files.</p>
  
  <p><img src="https://i.stack.imgur.com/q7W6q.png" alt="Jobs at level X can and should run in parallel, as many as possible."></p>
  
  <p>Thanks for your time.</p>
  
  <p><strong>EDIT:</strong> There is one more that I would like to know, in case there is some elegant solution: given that job X is triggered by Build Flow Plugin, and it fails. Is there any way if I want the Build Flow Plugin to trigger the same job again (after I have fixed it), and continue normally for the of the jobs defined through the plugin?</p>