Release Management is a service in VSTS Azure pipelines and TFS on-premise and an essential element of DevOps that helps you continuously deliver software. We can fully automate the testing and delivery of your software in multiple environments all the way to production, or set up semi-automated processes with approvals and on-demand deployments.
Release definition defines the end-to-end release process for an application to be deployed across various environments.
You define the release process using environments, and restrict deployments into or out of an environment using approvals. You define the automation in each environment using phases and tasks. You use variables to generalize your automation and triggers to control when the deployments should be kicked off automatically.
You can create a deployment model on the basis of how you manually deliver the builds using build definition for different environments.
The below Release Definition shows different steps using PowerShell scripts that are modeled basis the manual process created for deployment.
Creating a Release definition
Configure your environment:
- Give the environment a meaningful name by clicking into the Default Environment name provided and enter one of your own e.g. DEV, QA, PRODUCTION.
- Click on the ellipsis next to the environment name and select Deployment conditions…
Deployment Conditions
This is where we set up how we want our deployment to be triggered. It is here that we define what triggers the deployment of our release.
- No automated deployment– deployment of the build artifacts will need to be undertaken manually with no automation
- After release creation– this will deploy the build artifacts to the specified environment every time a new release is created i.e. Continuous Delivery.
- After successful deployment on another environment– this will deploy the build artefacts to an environment after they have been deployed to another environment e.g. after every successful deployment to the STAGING environment deploy the build artefacts immediately to the QA environment
Use the first option if you are deploying to a production environment i.e. make the deployments to your production environment a manual exercise. Use the second option if you are deploying to a development testing environment as part of a Continuous Delivery pipeline. Use the last option if you want to push your deployments between different testing environments.
Approvals
You may setup Approvals before the deployment to a particular environment using the Approvals Tab.
Configure a Queue and set demands
The demands may be System defined like “DotNetFramework” or you can set yourself like selecting Agent name.
General Tab
After configuring your environment, the next step would be to add task(s) which will be invoked when we want to deploy our build artifacts to the specified environment. The deployment task is the action that we want to happen when we invoke a deployment e.g. running a PowerShell script to start/stop App Pool, running database scripts, deploy the build on to a Virtual Machine or Azure instance.
Create Release
Create Release and select the build for which you would like to create a release in Dev environment and click on Create as shown below:
The successful build selected above will trigger the Automated Deployments based on the selections made for each environment.
One thought on “Release Management with TFS”