title: Teamcity chain multiple build promotions
body: <p>Im trying to figure out how to chain multiple '<strong>promotions</strong>' (by a user clicking) whilst  ensuring that ever build in the chain is not queued. By current setup is as follows, NOTE as my application is a white label the configuration described below is repeated for every site.</p>
  
  <ul>
  <li>Build &amp; Test - Creates zipped artifact</li>
  <li>Deploy to Testing - Has artifact and snapshot dependency</li>
  <li>Deploy to Staging - Has artifact and snapshot dependency</li>
  <li>Deploy to Production Has artifact dependency </li>
  </ul>
  
  <p>When promoting to production i want to do this across all websites (without having to manually click promote on each build).</p>
  
  <p>I am currently trying the following strategy, to set the 'deploy to production' build to have a Artifact dependency, without a snapshot dependency so it doesn't queue down the chain. I have set the artifact to depend on the 'Build &amp; Test' configuration to gain access to the zipped project and i have set it to build with a specific build number referencing a parameter in the production build.</p>
  
  <p>After doing some googleing i found out that i am able to get the stagings build number using the rest api as follows:</p>
  
  <p><a href="http://teamcity_url/httpAuth/app/rest/builds/buildType:build_configuration_id/resulting-properties/build.number" rel="nofollow noreferrer">http://teamcity_url/httpAuth/app/rest/builds/buildType:build_configuration_id/resulting-properties/build.number</a></p>
  
  <p>And this works great, however i don't understand how i can get this value into the parameter?</p>
  
  <p>Also i dont know if my approach is correct? is there a better way?</p>