Tuesday, November 30, 2010

Lab management deployment script arguments

Lab management 2010 allows you to automate the build-deploy-test workflow. By following a simple wizard, you can easily create a build of your code, run some deployment scripts to deploy the build on a test environment and run some tests inside this environment and all this by just triggering a new build inside Visual Studio.

The deployment scripts being run as part of the workflow can be anything from a batch file to an MSI or a power shell script. There are a few built-in arguments available that can be passed to these scripts:

 

Argument Description
$(BuildLocation) Refers to the location from where the binaries will be picked up for deployment. It depends on the option that is chosen in the "Build" page in the "Lab Workflow parameters" wizard. If "TeamBuild" option is chosen, then the drop location of the concerned build will be referred to. If a build location is specified explicitly, then that location will be used.
$(InternalComputerName_<VMName>) Refers to the bare host name of the specific virtual machine inside the environment.
Example : Consider an environment by name "NightlyBuild" with virtual machines by name "Webserver" and "DBServer".To refer to the computer name of the "WebServer" virtual machine, specify $(InternalComputerName_WebServer).
$(ComputerName_<VMName>) Similar to $(InternalComputerName _VMName) macro. But this will expand to FQDN name instead of bare host name.

No comments: