TFS 2010 and "build once, deploy many"

I did a lot of research on this, but could not find a solution at the end to implement “build once and deploy many” using TFS 2010.

Basically, I think this is an assembly definition that will build a solution with several projects to be deployed (web application + database project + web services + reports), put the output in the drag and drop folder and from there based on quality and version manually decide to deploy all projects in different environments (qa, ua, staging, production).

I know that I can change the build process template to deploy several projects right after build, something like “Build Main and Deploy to QA”, “Build Main and Deploy to UA”, etc., based on probably on changeet # or labels, but that means you need to build it every time. What I would like is more like a dashboard that will allow the deployment team to deploy the exact assembly that was tested in QA, in the UA environment and after receiving green light for its deployment in production. Of course, this means that configuration files must be updated accordingly during deployment.

I am also considering the possibility of defining definitions of constructions that will not actually build anything, instead he will deploy the existing assembly (based on the version) in a specific environment, but it looks a little strange, to say the least.

+6
source share
3 answers

This is almost what we use, we have built-in templates for performing real assemblies and deploying templates that deploy output to various machines (they can either be launched on schedule, for example, night drops to QA, etc., or such like UAT / live). Templates are greatly changed from the standard ones, we just push parts from the assemblers (or in some cases you can use the latest assemblies, such as the smoke test environment), for example, the place of departure.

You will need an agent on the computer on which you are deploying that can handle the deployment, but you can install as many agents as you want.

As an example, you might have an assembly that creates your application in exe and a template that takes exe and runs it on your target (using InvokeProcess). If you need to deploy the same thing in a different environment, you just use the same location, viola!

What you have does not seem strange at all, it makes sense to handle it that way.

+2
source

I know this is a late answer, but the situation has changed since 2012. Microsoft now offers Release Management , which is designed from the ground up to include build once, deploy many. Changing build templates is always a pain.

+1
source

Daniel's answer is a pretty standard way to get a build system like TeamBuild to handle deployments. This is a little strange because you are bending the tool to another target. It can definitely work.

Another approach is to get a clean deployment tool that integrates with TFS / TeamBuild. Deploying in different environments would be natural, but then you have two management tools.

0
source

Source: https://habr.com/ru/post/905741/


All Articles