Monday, 1 October 2018

Azure DevOps Default Enabled Alert/Notification - Which Can be a Nightmare for an Admin

As an admin of an Azure DevOps account you may be creating sample environments to simulate production behaviors, before applying any process changes to a Team project. In this case your choice would be to create a new team project and try out a simulation first. However, you might want to do the simulation with close to production data, so you will try to find a mechanism to make a copy of work items etc. from your production to a simulation Team project. How to do this with various options available is not the discussion today (which we can discuss in another post), as this post  is to show you an alert that must be turned off, before you do any sort of work item data duplication as a bulk, to avoid spam emails to many users of your Azure DevOps account. A lesson learnt the hard way is shared with you to prevent you from falling to same pitfall.

Friday, 28 September 2018

Build and Deploy SSIS with Azure DevOps Pipelines

SQL Server Integration Services (SSIS) projects can be created to perform ETL (Extract Transform and Load) operations. As Implementing of Continuous Delivery becoming a mandatory aspect of any type of software project it is vital for SSIS projects to be able to implement CI/CD. With the availability of the extension “SSIS Build & Deploy” in Marketplace for Azure DevOps, the CI/CD implementation for SSIS has become straightforward to implement. Let’s look at a sample to understand how to get CI/CD implemented for SSIS project with Azure DevOps.

Monday, 17 September 2018

Making a Task Group Parameter Optional – Azure DevOps Pipelines

Task groups are really useful to share common actions with multiple build or release pipelines in Azure DevOps (VSTS). You can group multiple tasks ang create a task group forma build or release definition. then these task groups can be utilized in other build or release definitions in a given team project. Parameters in a task group help to pass values from build or release definition to the tasks in the task group. You can add a default value for these parameters or have to provide value from the build or release definition that is using the task group. Making a task group parameter optional is not straight forward and you need some do work around to get it working. Let’s look at how we can make a parameter optional for a task group in Azure DevOps pipelines.

Wednesday, 12 September 2018

Using Unified Agent for Executing Automated Tests Without Installing Visual Studio in Test Client–Azure DevOps/VSTS

As described in the post “Running UI Tests with Unified Agent” you can setup unified agent (same agent used for build/deployment in Azure DevOps/VSTS), in an application pool or in a deployment group to execute functional UI tests. The unified agent is really useful as it does not require to setup separate test agent using winRM based Deploy Test Agent task which is required if Run Functional Tests task is used for automated test execution.With unified agent you can use Visual Studio Test task, which is capable of running Selenium based UI tests as well, in addition to Coded UI tests. There was a dependency that you needed to have Visual Studio installed in the test client machine to get the Visual Studio Test task as it is packaged with Visual Studio. However, thanks to the NuGet package “Microsoft Test Platform”  you no longer need to install full Visual Studio in your test client machine to execute automated tests, with unified agent using Visual Studio Test task. Let’s look at how to use “Microsoft Test Platform”  and Visual Studio Test task in a test client using Azure DevOps Release Management.

Thursday, 6 September 2018

Getting Content of a File in VSTS Git Repo

GItHub has a easy way to get raw contents of a file by clicking on Raw button for any code file in GitHub, where it will redirect to url starting with ‘https://raw.githubusercontent.com/’. For example the PowerShell script here can be viewed as raw content or retrieved programmatically using PowerShell using Invoke-WebRequest with url  https://raw.githubusercontent.com/chamindac/VSTS_PS_Utils/master/CreateAzureWebApp/CreateAzureWebApp.ps1. Let’s look at possibility of retrieving raw content of a file in VSTS Git repo via VSTS REST API.

Tuesday, 28 August 2018

Check if a Build Definition Exists for a Given Repo in VSTS/TFS

In scenarios where you have many teams working in the same team project, you might have multiple TFS Git repos within a single team project. When you want to create a build definition for a given repo, you might be wondering what if there is a build definition already exists for the repo. Opening each build definition to find that out is a waste of time. Let’s look at a small utility script that can give you the information quickly using VSTS/TFS REST API.

Sunday, 26 August 2018

Values of repositoryType Parameter in VSTS REST API

VSTS REST API is really useful in achieving automations in many aspects of the software development process, and it can be used to write some handy utilities to obtain information quickly with appealing formats. However, sometimes you have to bit struggle to find out which are the correct values to pass for some parameters expected by VSTS REST API, where the documentation does not provide much of a valid information. One such parameter is ‘repositoryType’ in documentation found here for listing build definitions, which does not give any information what are the expected values for the parameter.Documentation here gives some hint on what could be the values but does not have information for REST API expected values.

Sunday, 19 August 2018

Setting VSTS Release Variable Values At the Time of Creating a Release

VSTS builds have the option to set build variable values at the time of queuing a build. You have to select option for build variable “Settable at queue time” to enable the variable to be set its value at the time of queuing  build. However, this feature was not available for VSTS Release and there was a user voice raised here requesting to allow setting release variables at the time of creating a release. As promised by MSFT, this feature is now available for VSTS Release. Let’s look at how to use it with VSTS web UI and with the VSTS REST API.

Wednesday, 8 August 2018

Developing Azure Functions in Visual Studio and Creating a Deployment Pipeline Using VSTS

Serverless computing has become a hot topic these days. It is providing you with paying only for the actual time your code is running and resources you are consuming without any worries about infrastructure. Azure functions let you build functions that can scale dynamically based on the needs, with a languages of your choice. When you install Visual Studio Azure Development workload you get templates for developing Azure Functions. Let’s look at how to create a simple Azure Function “Hello World” in Visual Studio and most importantly how to get your CI/CD pipeline ready within couple of minutes.

Thursday, 2 August 2018

Solving OutOfMemoryException and Getting NUnit Tests on Visual Studio Test Explorer

It is fun to work with latest tools and frameworks but sometimes errors are bit confusing and searching for fix is not that easy. One team worked with NUnit and .NET 471 and complaint that the when compiling they get outofmemory exception “ NUnit Adapter 3.7.0.0: Test discovery starting Exception System.OutOfMemoryException, Exception converting mytest” . Searching pointed to few links in GitHub issues as shown below but those workarounds seem to be not applicable as .NET framework change back to 462 is not an option.Fix was really simple but looking for a solution sometimes takes time. So let’s explore the problem and the simple fix.

Friday, 27 July 2018

Finding Membership Information of a User/Group/Team in VSTS/TFS

Managing permissions of a VSTS/TFS sometimes become a nightmare specially if you have many teams groups etc. created in your account and in team projects. It is important to have a way to find group membership of an individual or group, so that you can analyze where the memberships are assigned in order to make required maintenance or change permission activities. Lets look at a command which can help you find that information quickly.

Saturday, 14 July 2018

Controlling Octopus Releases with VSTS Release Management

You may be using Octopus deploy for your deployment automation pipeline needs while you are having your builds and work items managed in VSTS. It is a good idea to manage the Octopus release pipeline via VSTS release management so that you have the opportunity to use automated test execution and capturing of test results, as well as easily generate release notes using the VSTS work items, using feature rich tasks and automation test results views in VSTS release management. Let’s look at the important steps required to make VSTS release management to successfully utilize your existing Octopus deploy process steps.

Wednesday, 11 July 2018

Securing Release Definitions When Multiple Teams Work on a Single Team Project

We have explored “Securing Build Definitions When Multiple Teams Work on a Single Team Project” in a previous post. Now the folders to group release definitions and applying permissions to isolate each team’s release definitions is also a possibility in VSTS. As we discussed in the “Securing Build Definitions When Multiple Teams Work on a Single Team Project” it is important to create the Build/Release admins VSTS permission group for each of the teams in the team project. Using the same admins group and the team we can setup permissions for release definitions folders. Let’s look at the steps in detail.

Tuesday, 3 July 2018

Integrating VSTS Package Feed to Octopus

Octopus deploy is used by many organizations as their continuous deployment tool. You can send a package to Octopus deploy server via VSTS build or release step, using  “Push Packages to Octopus” task comes with VSTS Marketplace extension named Octopus integration. However, if you prefer to use VSTS Package Management to store your packages, you can now consume them in Octopus by integrating with the VSTS Package Management feed. Let’s look at how to setup Octopus to consume VSTS Package Management feed packages. (We have discussed how to use VSTS Package Management feed as artifact source in VSTS Release Management in a previous post “Using NuGet Packages as VSTS Release Artifact Source”)

Thursday, 28 June 2018

Building and Deploying Windows Services with VSTS/TFS

Generally windows services are deployed by creating an msi installer. It is possible to deploy msi via VSTS/TFS release management using the extension available in the marketplace. Packaging the windows as non msi would give opportunity to have more control on the configurations etc, when deployment and let’s see how to package a windows service and then get it deployed via VSTS/TFS release management.

Monday, 25 June 2018

Packaging "Assemblies in GAC Installed with SDKs" in Build and Getting Deployed to Target Machine GAC

There can be projects depending on assemblies in Global Assembly Cache installed with may be a internal company SDK, which would even be installed in developer machines and in build servers. These assemblies should be packaged with the project and deployed to the GAC of target machines such as QA,staging and Production etc.  as well. Since the code repo does not include such assemblies in the build server it may be required to extract those assemblies from GAC and packaged with the builds. Let’s see how we can get the assemblies in GAC packaged and get deployed to targets, using VSTS build and release management.

Friday, 22 June 2018

Using NuGet Packages as VSTS Release Artifact Source

If you are used to deploy your solutions with Octopus deploy which a re built with VSTS/TFS, you are used to package your build output as a NuGet package and use it in Octopus. Now you can use the NuGet packages with VSTS release management as well for deployment. For this you have to have the package management feature in VSTS enabled. As VSTS builds and their artifacts are discarded in a configured time period and the maximum time and  number of builds is limited, keeping artifacts as NuGet packages would be useful you to keep your deployed artifacts for a longer period. Let’s explore how to use NuGet packages for deployment in VSTS release management.

Monday, 28 May 2018

VSTS Build, node-sass and HTTP 404

When you are building node js projects with VSTS you may encounter some strange errors which are very hard to diagnose due to misleading error messages. node-sass and Http 404 error is one such error making it really hard to fix the issue misleading error message.

2018-05-28T02:44:19.0012193Z npm info lifecycle node-sass@3.13.1~install: node-sass@3.13.1
2018-05-28T02:44:19.0012339Z Cannot download "
https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node":
2018-05-28T02:44:19.0012428Z
2018-05-28T02:44:19.0012528Z HTTP error 404 Not Found

Tuesday, 22 May 2018

Securing Build Definitions When Multiple Teams Work on a Single Team Project

Securing a build definition is quite straight forward when an organization uses multiple team projects in VSTS/TFS to handle different applications they develop. Each team project build administration can be assigned to different individuals easily. There are organizations using a single team project to manage all of their applications, dividing them into teams inside a single team project. Let's look at possibilities of securing each application teams' builds in single team project for organization scenario.

Sunday, 29 April 2018

Visual Source Safe (VSS) to TFS Migration

In modern software development usage of only a source control mechanism would not add value to the software delivery process. However, some organizations still using Visual Source Safe (VSS) to manage their source code, but it is unsupported tool as of now and they should consider moving their code bases to a different tool. As a fully DevOps capable ALM tool TFS is a good choice to move the code from VSS. Let’s look at the steps required to perform such a migration of VSS code, including history.

Thursday, 12 April 2018

Finding Active Team Projects Based on Code CheckIns/Commits

When you have many team projects in your TFS instance or in your team services account (VSTS), manually finding out what are the active projects is not going to be an easy task, by looking at each code repository in each of the projects to determine whether project is getting updated with code changes. TFS/VSTS REST API can be used in this scenario to obtain the projects that have any code commits/checkins from a given date using the script available here.

Tuesday, 27 February 2018

Cloning TFS 2018

How to clone TFS before TSF 2018 is explained in posts, Backing Up and Restoring Databases, Prepare Restored Databases and Configuring the AT. Out of these steps Backing Up and Restoring Databases is valid for TFS 2018. But you do not have to perform the Prepare Restored Databases as it can be done while configuring the Application Tier of the cloned TFS instance. Let’s look at valid steps for cloning TFS 2018.

Thursday, 8 February 2018

Resolving “The SDK 'Microsoft.NET.Sdk.Web' specified could not be found”

While using .NET Core 2.0 you may run into errors which may not be clear. “The SDK 'Microsoft.NET.Sdk.Web' specified could not be found.” is one such error which appears, when trying to load .NET Core 2.0 Web projects, and Let’s understand the reason behind this error to get it resolved.

Monday, 8 January 2018

Wednesday, 3 January 2018

Trigger Build Based on Label/Tag – VSTS/TFS

You might want to trigger a build for a team foundation version control (TFVC) Label applied previously or if you are using Git version control for a Tag. Git tags are quite nicely supported in TFS/VSTS web Interface, but Label in TFVC is still only manageable with the  Source Control explorer of Visual Studio. There is a user voice request to enable web experience for TFVC Labels, which you can also vote for Smile. Let’s explore how to trigger build based on Tag or Label with VSTS/TFS.

Monday, 1 January 2018

Configure Search Service for TFS 2018 in a Separate Server to Enable Work Item & Code Search

Work Item Search & Code Search allow TFS users to do advanced and dynamic way of quick searching on code or work items, with drill down etc. To enable Code Search in VSTS you have to install the Marketplace extension for code search, work item search is default enabled for VSTS. You can configure search for on-premises TFS in TFS AT (described here), itself. But if you want to setup search service in a separate box from your TFS AT, you can follow the steps described in this post.

Popular Posts