“BuildMaster made us re-think what proper deployment is...” “...manual, error-prone deployments are a thing of the past...” “...extremely capable software, especially in an enterprise environment...” “...all of my projects are building wonderfully and are fully integrated into deployment...” “...the best thing since sliced bread when it comes to managing projects and their environments...” “...BuildMaster makes sense of incremental builds and their very liquid feature sets...” “...this is a very solid piece of software!” “BuildMaster is a great tool for automating the build process, but stands head and shoulders above other tools...” “...it's 2:45 AM your time?! Do you guys never sleep?” “...our confidence in the reliability and repeatability of the deployment process has been restored...” “...we implemented a *real* deployment process...” “...we can now react at the speed of business...” “BuildMaster is absolutely swell!”

Managing LunchMaster (part 2)

Welcome to the 2nd post for the Managing LunchMaster with BuildMaster series. This series of blog posts is intended to build a real-world application using BuildMaster from the start to manage its builds, releases, deployments, databases, and artifacts. This series will focus on management from within BuildMaster, so focus on LunchMaster itself will be secondary.

If you do not yet have a copy of BuildMaster and would like to follow along, simply click here to download a free trial!

Configuration Files

A configuration file is a special type of file that is part of an application. Unlike code files (which remain identical in every environment), configuration files are read by other code files at run time and contain environment-specific details. Configuration files generally contain some form of the following:

For LunchMaster, we will start by adding the Visual Studio auto-generated Web.config. To create this file in BuildMaster, select Configuration Files from the sidebar navigation menu, and Create New Configuration File. We will associate this configuration file with the Website deployable. We will also be required to select which Environments that this configuration file will exist in or eventually be deployed to (generally it will be all of them since it is rare that configuration files will not be deployed to a certain Environment).

cfg1

When created in BuildMaster, the configuration file instances will be blank and must be populated from an existing file in the file system or source control, or they can be created directly within BuildMaster. To modify an instance, select Edit Configuration File from the configuration file details page, and you will see a pop-up with the Environment/instance names in the tabs above the textbox:

cfg2

If we choose Load From… in the top menu of the pop-up window, we will be given the option to either:

In my case, I will upload the file directly from my workstation making sure to select both instances because this is a new application. If LunchMaster were an existing application and I already had two instances of the same configuration file (one for the development environment and one for production), I would have uploaded both of them and selected the appropriate Environment with which to associate each instance.

Once uploaded, both instances will now be populated with the contents of the Web.config file:

cfg3

If we select the Production tab, we will see a different instance of the configuration file. To change this instance, we will change the debug="true" attribute from the <compilation> section to debug="false". For the non-ASP.NET folks, this attribute is intended to be set to true for development/testing environments and false for production environments.

cfg4

We are now ready to save this file within BuildMaster by selecting Confirm & Save Changes. Now the configuration file details page will display both instances:

cfg5

Next, we will edit our previous deployment plan for the development environment to include deploying the configuration file. We will select Development in the sidebar navigation menu and choose the Transfer Files Action Group, Add New Action, then under Configuration, Deploy Config Files:

cfg6

We will use the following values for the Deploy Config Files Action and choose Save:

cfg7

Now whenever we create a new Build to my development environment, the development instance of the configuration file will be deployed to the \LunchMasterDev directory. We can test this out by selecting Create New Build in the sidebar navigation menu, and the subsequent button on the Create Build page. The results of the build are displayed on the Build Details page:

cfg9

That's all for part 2! Next up in the series, integrating with a source control management system (or more specifically, Subversion).