HockeyApp and VSTS – #nothinbutnet.1 Creating a publish build task

It’s been a while between posts but the latest focal point for my attention has been HockeyApp. In this multi-part series I will detail my exposure to the framework and identify the solutions to any challenges I faced along the way. As HockeyApp currently doesn’t quite have the coverage across all application types (Android, IOS, Win81, WinRT, UWP, etc) there are some unique obstacles that need to be overcome depending on your application architecture.

In this series of posts we will be addressing the deployment and the collection of telemetry from a WinForms application. If we quickly jump over to the HockeySDK we will rapidly discover that there currently isn’t much support for WinForms as shown in the following feature matrix:

Fortunately Don Kackman is hard at work at implementing the missing components in the HockeySDK as illustrated by the this pull request. We’ll have a look at utilising these changes in upcoming articles.

Let’s start with a little bit about HockeyApp. In 2014, Microsoft acquired the company and positioned the tool as a core part of their solution framework for application distribution, crash reporting, user metrics and feedback collection. Up until that time there had been support for device apps in Application Insights but this year Microsoft announced their plans to transition all mobile and desktop applications to HockeyApp. This was met with some concerns in regards to feature parity between the two platforms and was addressed in this update from Microsoft. As of August, the HockeyApp Bridge was also delivered which allowed integration back to Application Insights and this is when I started to get excited.

Motivated by that excitement I attempted to use HockeyApp with a WinForms application that is a core product delivered by the company I work for. The steps required to get the application from a build on VSTS to a customer deployment (with telemetry collection) are the backbone of this story. I have currently achieved the first four and I’m rolling the dice on being able to deliver the last one by the time I need to write the blog post. The steps are as follows:

Create a VSTS build task to publish an MSI to a HockeyApp application.

Use the HockeyApp REST services to download and install the published MSI via Powershell.

Integrate the new WinForm support if available or update the SDK ourselves to publish custom events (telemetry) to HockeyApp.

Demonstrate the HockeyApp to Application Insights bridge for surfacing telemetry retrieved from all installations of the application.

Finally we will attempt to incorporate the application distribution functionality into the WinForms application itself.

Let’s get into it…

Create a VSTS build task to publish an MSI to a HockeyApp application.

So I’ve got this wizz bang ALM tool and I want to release my application to HockeyApp. First stop, the Visual Studio Marketplace. Boom!! There’s a HockeyApp extension. Buckle up…

Not so fast… As I quickly find out, its really cool if you want to deploy mobile apps but its not the silver bullet in my case:

[blockquote source=”support.hockeyapp.net”]You can integrate HockeyApp directly in Visual Studio Team Services (VSTS) and in Team Foundation Server (TFS) to upload your Android, iOS, and Mac OS X builds as well as Windows Phone apps. Support file types are .ipa, .apk, .app.zip, .appx, .appxbundle, .zip (if it contains an .appx or .appxbundle), .dSYM.zip, and mapping.txt for Android symbols. If you need support for Windows builds that are packaged as a .zip file, please check out this 3rd-party task.[/blockquote]

Alright, not quite the solution I was looking for but my app is a “Windows Build” and I could just ship a zip file as mentioned in the introduction. I then checked out the aformentioned 3rd-party task and was presented with the following project description:

[blockquote source=”github.com”]

vso-hockeyapp-windows-task

VSO Build vNext Script for pushing AppX Packages to HockeyApp

[/blockquote]

Looking at the description it says AppX pretty clearly but if we look at the Powershell script, it basically just puts the location into an archive and sends it up:

The published version will also have a download page that will allow manual distribution of the release.

With this process in place we have been able to automatically release a version for testing using the QA application on HockeyApp whenever a build is performed on our integration branch. After validation of the QA build the same set of artifacts can be released to the production application on HockeyApp for distribution to our customers.

In further posts in this series I’ll show how we deployed the release we just published and how we can instrument the application to collect metrics from the deployed applications.

Search

Search for:

Text Widget

This is a text widget, which allows you to add text or HTML to your sidebar. You can use them to display text, links, images, HTML, or a combination of these. Edit them in the Widget section of the Customizer.