View Source

h1. Situation
Assume there are only one machine for deployment. Set up the build so that only one deployment step can run on the deployment machine even if multiple builds try to deploy.

h1. Demonstration
# Visit the [demo project|http://demo.pmease.com/overview/101], and hit the run button twice to generate two builds.
# Check [build overview|http://demo.pmease.com/build/101.latest] of generated builds: only _deploy_ step of the first build will run; the step of second build will be put into wait state until the deployment step of the first build finishes.

h1. Resolution
# Switch to [resource tab|http://demo.pmease.com/resource] and a resource named "Deployment Environment" is defined with only one agent providing the resource.
# Switch to [steps definition|http://demo.pmease.com/settings/101/steps] of the demo project, and check definition of step _deploy_. The node selection property is set to run on the node with resource _Deployment Environment_.
# This also holds true for builds from different configurations as long as their deploy step is defined to run on node with the _Deployment Environment_ resource.