How to setup a build with Visual Studio Team Services, for building ASP.Net 5 (ASP.Net Core 1.0 now) is explained in here. Let’s look at steps necessary to create a release pipeline to deploy, ASP.Net 5 website to Azure, with VS Team Service Release.
First requirement is to develop a poweshell script, whcih is capable of deploying, the built ASP.Net package to Azure. Information on how to write such script is available here.
Add this script to version control.
Modify our release build in previous blog to copy deploy script to build output.
Let’s create Azure Web Application as the target.
Site created and ready.
In Visual Studio Team Services, Release tab create a new empty Release Definition.
To link the release definition to the build created earlier, click on Link to a build definition.
Select the build definition and link it to release definition.
Rename the Default Environment to DevInt(Or what ever name you prefer).
In the DevInt environment create a configuratoin varibale to hold the Azure web site name.
It is possible to set approvers to the stage. So that an approval requires to get the build deploy to the stage/environment DevInt. Let’s set it to autimated and after deployment set a manual approval, to allo get it approved before deploying to next stage/enviornment in the pipeline.
In the release definition add a Azure Powershell task to execute the deployment script. Azure subscription how to link to VS Team Services account can be found here. Set the deployment script to Azure Powershell release task in Dev Int
For Web Site Name environment variable can be used in the cript arguments.
-websiteName $(WebSiteName) -packOutput $(System.DefaultWorkingDirectory)\Event.Rel\EventRelOutput\
Eventhough trigger can be set to continuous deployment like below.
Let’s leave trigger to manua for the time being.
Now you can trigger a release with the any successful build output you have using the release definition.
Build get deloyed to DevInt environment and wait for the post deployment approval.
DevInt environment site is running now.
An Improvement to the build number can be made like following.
Release name format also can be set to use build number for it to be more meaningful.
Release No $(Build.DefinitionName)-$(Build.BuildNumber)-R-$(rev:r)
Multiple environements in the pipeline can be configured.
Deployement logs in the pipeline. You can view these logs, while a release is happening.
Release history can be viewed.
Release definition change history is available as well t diagnose any issue which might have ocuured with a change to the definition.
Difference between two defnitions.
New release managment services with VS Team Services is awsome, and let’s explore more in the coming posts.
Resolve MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found or Unable to start the process. No executable found matching command "dotnet-projectmodel-server"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...
It is great if the latest updates to TFS can be applied as and when they are released. But for a large organization it might not be sometime...
TFS 2018 RC1 is now available and you can download it from https://www.visualstudio.com/downloads/ . Release note here explains the new fea...
This extension “ Chamindac.vsts.release.task.download-artifacts ” for VSTS and TFS 2015.2.1 upwards, can be used to filter for build artifac...
You needed to setup dedicated machines for testing when using Run Functional Tests and you had to execute, Deploy Test Agent step and Copy...