title: Jenkins - make agents wait for other agent to finish
body: <p>I'm new to Jenkins and I'm trying to setup a project which will use few build executors.
  The flow shall be as follows:</p>
  
  <ul>
  <li>two build executors with <code>webservice</code> label return their IP addresses and wait for the third build executor to finish its job</li>
  <li>third build executor with <code>tester</code> label collects those IP addresses and performs some long running job (e.x. sends HTTP requests to the webservices deployed on those two agents)</li>
  </ul>
  
  <p>How to achieve such behavior in Jenkins?</p>
  
  <p>I've found that when an build executor finishes its job it is immediately released and I don't know how to make it wait for other build executors to finish their jobs.</p>
  
  <p><strong>Edit</strong>:</p>
  
  <p>I forgot to mention that I want the build executors with the <code>webservice</code> label to be reserved (not available for other jobs) till the build executor with the <code>tester</code> label will finish its long-running job.</p>
  
  <p>Also all these build executors should be on separate slaves each. That means each slave has only one build executor.</p>