Serverless Azure DevOps (VSTS) Build Agents Using Heroku





Azure DevOps, formerly VSTS, out of the box provides you with hosted build agents. Initially, these seem fine, however as time goes on you will soon notice some of the pain points that I did which are detailed below.


  • Unpredictable Agent Queues
  • Agent available but job still waiting to run
  • Costly concurrent build/release pipelines (not really, but it’s money nonetheless)
  • Missing dependencies

  • Due to the above pain points I started to think about how to solve these issues in the most effective way. I actually came up with two different solutions. This is solution 1. Solution 2 will follow as it is a bit more in depth and requires a little more effort to setup and maintain.

    This solution will detail how to run a free!! Azure DevOps agent in Heroku that will overcome the 30 minute sleep time that heroku has on their free tier. I do not actually use this solution myself as I needed to have a lot more than just 1 agent readily available and I also needed my agents to be inside my Azure vNets. I will be detialing this process in the coming months — but this iteration seemed like the sort of thing a lot of people might need or want in their early days of using Azure DevOps/VSTS due to the limitations of the hosted agents.

    Continue reading on Medium

    Let's discuss your project

    If you're looking for a Proefessional UK Based Hashicorp Terraform consultant please complete the form below and I will be in touch!