Saturday, 21 July 2012

Team Build Nuggets: Automatic publishing of Web Applications with Team Build

As we’ve seen in the previous post, we can automate the creation of a deployment package to automate deployment of web applications.

What we’ve seen until now is just the beginning: in this post we’re going to cover the fully automated deployment workflow.

But before of that, we need a prerequisite: the Web Deployment Tool.

It’s downloadable from the Web PI Installer, and the only configuration needed is this (on the target server).

After that, do you remember the MSBuild Argument to pass inside the Build Definition? It was:

/p:DeployOnPublish=true

Instead right now we need a little more verbose one:

/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True /p:MSDeployPublishMethod=InProc /p:MSDeployServiceUrl=<server> /p:DeployIisAppPath="Default Web Site/<mypath>" /p:UserName=<domain>\user /p:Password=<password>

It creates a package which gets pushed to the server running the WDT, and automatically executed. Smile

Monday, 16 July 2012

Team Build Nuggets: XCopy Deployment

What’s needed to perform an XCopy Deployment with Team Build?

Just that as a MSBuild Argument:

/p:DeployOnBuild=true /p:DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempRootDir=\\<server>\folder

Thursday, 12 July 2012

Team Build Nuggets: Deployment Package

A great feature inside Team Build is the capability of creating deployment packages from the server in order to automatically deploy the application to the target server.

It’s really easy, you only have to create a Build Definition:

b0

and adding the /p:DeployOnBuild=true switch to the MSBuild Arguments.

b1

After building you’re going to find a <Project>_Package folder…

b2

…which contains the package itself.

b3

How to deploy it? Well…run the .deploy script or wait for another Team Build Nuggets postWinking smile

Friday, 6 July 2012

Baseless Merge 101

A Baseless Merge is a not-that-known feature of the TFS’ Version Control System.

It’s a merge made with two branches of a root with no relationship between them. For instance, two parallel ‘release’ branches.

The suggested way of performing a merge with two branches like those lying around is to reverse integrate the first one into the root and then to remerge inside the other child. But this approach is not always feasible, so you can perform a baseless merge.

It’s a rather risky operation: the Visual Studio ALM Rangers strongly recommend to avoid it, because of the inner troubles inside it: no propagation for deletions, and no auto-solving of conflicts.

Up to Visual Studio ALM 2010, the baseless merge was there! But it was not integrated inside the IDE, and then the only option was to use tf.exe (tf merge /baseless …).

Nowadays we have this feature inside Visual Studio 2012, so no more command line playing.

For instance, in this scenario I’d want to merge Feature1 and Feature2…

image

…I can do it by calling the Merge Wizard.

image

It’s explicitly warning me I’m doing something risky: the baseless merge has no relationship with its siblings.

Moreover, if you try to drag and drop from the Hierarchy Viewer, you won’t be able to do a baseless merge. As of its nature, it must be done just purposefully and not ‘by error’.