title: Hudson / Jenkins - Parallel vs Series Pipelines and Reuse of jobs
body: <p>I have a series of Hudson jobs I want to run to test out various builds:</p>
  
  <ol>
  <li>Build 1.17 on Server X</li>
  <li>Build Trunk on Server X</li>
  <li>Test1</li>
  <li>Test2</li>
  </ol>
  
  <p>I want to do run these jobs in series with each job waiting for the other to finish: Build 1.17, Test1, Test2, Build Trunk, Test1, Test2</p>
  
  <p>On the other hand, I have two other jobs Test3 and Test4, which can be run in parallel, and just after Build Trunk.</p>
  
  <p>I'd prefer not to have to chain multiple jobs together from the post-build-steps section of each job, but this is the only way I can make them run in series. The problems with this are:
  1) Job Duplication: I need 2 copies of Test1 and Test2: Build 1.17-> Test1 -> Test2 -> Build Trunk -> Test1 (copy for trunk) -> Test2 (copy for trunk).
  2) More Duplication: I need another Build Trunk so I don't run Test1 every time I want to run Test3 and Test4.</p>
  
  <p>Is there a simple way to have jobs operate in series without modifying the individual jobs and creating dependencies between them outside of a top-level job?</p>
  
  <p><img src="https://i.stack.imgur.com/KlUDF.jpg" alt="Is such a thing even possible"></p>
  
  <p><strong>UPDATE:</strong> Eventually what we did is use Rakefiles to manage the whole process. None of the plugins were robust enough for this. A hudson job calls a Rakefile with args which calls other hudson jobs.</p>