Skip to content

A simple CLI helper tool that registers fake offline Azure DevOps Pipelines Agents

Notifications You must be signed in to change notification settings

MShekow/azure-pipelines-agent-registrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure DevOps Pipelines Agent Registrator

This is a simple CLI helper tool that registers fake/offline Azure Pipelines Agents against the Azure Pipelines API (see https://learn.microsoft.com/en-us/rest/api/azure/devops/distributedtask/agents/add?view=azure-devops-rest-7.0). It sets the agent's system capability to any capabilities you define as CLI argument.

It was created as a companion tool for https://github.com/MShekow/azure-pipelines-k8s-agent-scaler to register fake agents, so that a follow-up job (that demands specific capabilities) has the chance to start. This works around the Azure DevOps Pipelines limitation that jobs with demands for which there is no registered agent will immediately be cancelled.

Usage

Example for Linux/UNIX:

./agent-registrator \
  -organization-url https://dev.azure.com/foobar \
  -pool-name your-azure-devops-pool-name \
  -pat <Azure DevOps Personal Access Token with 'Agent Pools Read&Manage' permission> \
  -agent-name-prefix dummy-agent \
  -capabilities 'buildkit=1;ExtraAgentContainers=ubuntu,registry.hub.docker.com/library/ubuntu:22.04,250m,64Mi'

You can download the release from the GitHub Releases page of this project.

About

A simple CLI helper tool that registers fake offline Azure DevOps Pipelines Agents

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages