In today's episode of "what crazy niche has Dave gotten sucked into this time?" I announce a new test logger for the Visual Studio Test Platform designed to publish your test results in real-time to Azure Pipelines. This means that you can run
dotnet test from your build script on Azure Pipelines and feed your test results directly to the test summary for your build without having to rely on post-processing like the
PublishTestResults Azure Pipelines task.
This is a short post about using Cake to publish packages from Azure Pipelines to Azure Artifacts that took me the better part of a day to figure out. For completness I'll walk through my entire process but if you just want to know how to do it, skip to the end.
In the last post we set up a document database for our application using Azure Cosmos DB. In this post we'll continue setting up our application using Azure Functions for hosting our API endpoints and Azure App Service for hosting our static HTML interface. When we're done with this stage, we'll be ready to start implementing our API and interface in the next part.
It seems like it's impossible to stay away from the hype surrounding cloud services recently. All the major providers are shipping updates at what seems like an insane pace and buzzwords like serverless and NoSQL are everywhere. It's been a while since I've done any major work on a public cloud with the last time being four or five years ago on AWS. While I've done a little hosting here and there on Azure, I figured I was overdue for a real deep-dive. Since I was starting from scratch with everything else, both implementation and knowledge-wise, it also seemed like a good opportunity to learn Vue.js, which I've had my eye on for a while. This blog series is my experience setting up a completely cloud-based web application using nothing but Azure services and open source libraries. In this first part, I'll introduce the project and we'll get the database set up. In the next post we'll set up the Azure services for the API and front-end, and then in following posts we'll build out the UI.
Azure has a really cool service called Application Insights. It lets you instrument both the server and the client for all kinds of metrics and data. Unfortunately, all the documentation about how to enable it makes a lot of assumptions, like having Visual Studio as part of your tooling. I wanted to turn on Application Insights for a static site that I was hosting on Azure App Server and literally could not find a single guide on how to do so. I finally got it working through trial and error and came up with this set of hacks. Keep in mind, this really is a bit of a hack - I'm sure there's a better way, I just don't know what it is. That said, maybe this will help someone else in the same situation.
As you may know, I am a big fan of static sites and am always interested in new ways to manage and deploy them. I previously blogged about using FTP to synchronize files with Azure and this post explores an alternate way to do something similar using Web Deploy.
I've recently been experimenting with Azure for static site hosting. While there are lots of great static site hosts (my personal favorite still remains Netlify), Azure Web Apps offer some attractive features to enterprises or organizations already invested in Azure. One would think that easily deploying a static site to Azure would be relatively straightforward. Unfortunately, I found that this wasn't the case at all. While Azure Web Apps have some advanced deployment options like Kudu for git deployments and Web Deploy for deployments from Visual Studio, both require some setup and configuration, are designed with "application" scenarios in mind, and aren't as straightforward as a simple FTP upload. Unfortunately, even FTP uploads to Azure Web Apps have some issues that I'll discuss below. To address this scenario, I ended up writing a little bit of code to automatically synchronize a local static site with an Azure Web App FTP server that ignores unchanged files.