Uppercut - Automated Builds - DeploymentBuilder

UppercuT comes with DeploymentBuilder.  What is DeploymentBuilder? Perhaps you maintain a bunch of deployment scripts that point to all your different environments.  We now you can define a template batch file and let UppercuT create all of those deployments scripts for you. It's less for you to maintain, and you no longer have to update a bunch of different scripts. Just one or a couple depending on the types of deployment.

To help people better understand what it can do, we've included a starting template file and a sample LOCAL.settings file so you can see the power of UppercuT's DeploymentBuilder.

You have a folder called Templates. In that folder are the templates for every environment. You can plug in any deployment framework based on how your template files use the framework.

1. Create/edit template files for your deployment framework.

      A folder with the deployment batch file templates.

2. What’s in these files? Anything you want, but something must be in there to tell the deployment framework we are deploying to a different environment. An example is below. The naming of variables is done like so: “${variableName}” and I believe it is case sensitive. Here we are using a variable named "environment".

     An example of a deployment.bat template file showing the ${environment} variable

3. At the top level directory (up one directory from DeploymentScripts), you should find a Settings folder. For each *.settings file in that folder, UppercuT will create a deployment file for each file in the templates folder.

     A folder showing all of the settings files.

4. In each ENVIRONMENT.settings file, you need to define that variable. You can see below that we define “environment” to have a value of “LOCAL”.

     The settings file showing the environment property has been set.

     Here's that file:

<?xml version="1.0" encoding="utf-8" ?> <project name="Settings">     
<property name="environment" value="LOCAL" /> </project>

5. What you get for that is this:

     a. Here is what’s in the DeploymentScripts folder in source control:

     A deployment scripts folder with no deployment scripts

     b. Here is what’s in the DeploymentScripts folder on code_drop (after building):

     A folder full of deployment scripts

6. What’s in one of those files after building? All variables have been replaced.

     Deployment File after building with the environment variable replaced with LOCAL

Pretty sweet, eh?

 With this knowledge you shall build.

kick it on DotNetKicks.com

Print | posted @ Tuesday, May 19, 2009 4:24 PM

Comments on this entry:

Comments are closed.

Comments have been closed on this topic.