Deployment groups are used in Azure DevOps classic release pipelines to define groups of targets an application should be deployed. We may sometime need to create these deployment groups dyamically based on the stage we are running in release pipeline. Let's look at the sample PowerShell code to use for creating depployment group dynamically, using Azure DevOps REST API, and how to use it in a pipeline.
Friday, 11 November 2022
Saturday, 3 June 2017
Deployment Groups in VS Team Services
Deployment groups provide robust out-of-the-box multi-machine deployment with team services release management. It allows you to run deployments across multiple machines. You can install agent on each of your target servers directly and run rolling deployment to those servers, unlike agent based deployments where you install build/deployment agents on proxy servers in an agent pool. You can use all tasks in task catalog on your target machines.
Deployment group allows you to create target deployment machine groups, without requiring you to register machines in agent pools or queues. Machine in a deployment group will have an agent registered with the named deployment group, within the team project providing required isolation for target environment (such as DevInt, QA, UAT, Demo, Production etc.), for a given product or project.
Logical group of targets (machines) having an agent installed on each of them is a deployment group. It represents your physical environments. It can be single-box, multi-machine or a farm of machines. You can specify the security context for your physical environments by using the deployment groups.
Let’s look at how to create a Deployment Group in Team Services.
Thursday, 31 October 2013
TFS - Lab Build - Deployment Script - Copy Build Output Zip to Lab Env. Machine and Extract
1. First I am going to create a batch file and a PS script. My PS script will do all the work. Batch file (.bat) will be used to initiate the powershell script from Lab Workflow. To get this to work I need to make sure my batch file and the PS script is copied to build output folder, since it is the place that I can execute a deployment script from Lab Work Flow.
I have added my .bat file and the PS script file under a VS project that is under a solution I am building, and set the Copy to Output as always.
2. This will copy my .bat and PS script to Build Drop folder.
3. This is what I have in my .bat file. It is simply executing the PS script making sure execution policy is not blocking anything. Build location here is passed as an argument from the Lab Workflow.
4. In my Lab Build in the deployment steps I specify the .bat file to run as below. For more information and how to use xcopy to copy build out put have a look at "Creating Deployment Scripts for Build-Deploy-Test Workflows". I used a poweshell script since I am going to do lot more than just copying files, like adding dlls to GAC, etc which I will explain in a next post.
$BuildLocation is giving the build output location of the build that is queued/used by Lab workflow.
5. In my poweshell script I am copying zip to my lab environment machine. The path C:\ ..refers to the path in the lab environment machine, since the deployment script get executed in the context of given lab environment machine as specified in the above screenshot.
After copying this script will extract contents to the copied location and remove the zip file from the Build Drop folder. Build Location is passed to the poweshell script from the above .bat file as a parameter.
6. I queue a build and I can see my zip file copying actions get executed in the Build Log as below.
7. In my lab environment machine I see the extracted files .
Popular Posts
-
The hosts file in /etc/hosts is allowing the WSL distros to map IP addresses to domain names before going to domain name servers, similar...
-
Can a Coded UI test executed with a Console Application? Yes it is possible. I am going to explain how it can be done. I am going to exec...
-
Pull Request are the controlled way to bring in the changes to your stable branches in your Azure Git repos, or for that matter all Git prov...
-
The new Azure Managed Redis can be deployed with balanced compute and memory with high availability, and useful modules such as RedisJson a...
-
You might encounter compilation error in Visual Studio 2015 when a new .NET Core 1 web app is created, if you have installed Visual Studio 2...





