Skip to content

Containing scripts & logic to run Azure DevOps build agents

License

Notifications You must be signed in to change notification settings

Jandev/aci-build-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This repository contains the scripts to create a Docker image that can act as an Azure DevOps agent.
It also contains scripts to create an Azure Container Instance environment & Azure Container Registry.

The Azure Function project acts as an orchestrator to start and stop the ACI based on the information it can retrieve from Azure DevOps.

Some useful URLs

Azure DevOps

Builds by build status

https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds/list?view=azure-devops-rest-6.0#buildstatus

Request:

{{baseUrl}}/build/builds?statusFilter=notStarted&api-version=6.0

Response:

{
    "count": 0,
    "value": []
}

Releases list with environment statuses

https://vsrm.{{instance}}/{{teamproject}}/_apis/release/releases?$expand=environments&api-version=6.1-preview.8

{
    "environments": [
        {
            "id": 70,
            "deploySteps": [
                {
                    // https://docs.microsoft.com/en-us/rest/api/azure/devops/release/releases/list?view=azure-devops-rest-6.0#deploymentoperationstatus
                    "status": "succeeded", // "queued", "queuedForAgent", "queuedForPipeline"
                    "hasStarted": true,
                }
            ]
}

GitHub

Opened

Blogposts

Scaling isn't possible in ACI.
Tom Kerkhove has an interesting post on this: https://blog.tomkerkhove.be/2021/01/02/autoscaling-azure-container-instances-with-azure-serverless/

Related blogposts of myself:

About

Containing scripts & logic to run Azure DevOps build agents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published