Sign inSign up

btnguyen2k/azpagent-base

By btnguyen2k

•Updated about 6 years ago

Pre-built image to deploy self-hosted Azure Pipelines agents

Image
0

100K+

btnguyen2k/azpagent-base repository overview

⁠Introduction

This repo provides pre-built images to run self-hosted Azure Pipelines agents.

GitHub repo: https://github.com/btnguyen2k/azp-k8s-agents⁠

⁠Prerequisites

Azure DevOps personal access token: A personal access token (PAT) is used as an alternate password to authenticate into Azure DevOps. Use PAT instead of your password to register the agent with Azure DevOps Agent Pool. Create one by following these instructions⁠.

The PAT must have at least Agent Pools (Read & manage) scope.

Azure Pipelines agent pool: The Azure Pipelines agent will join an agent pool⁠ so that it can be used. You can create a new agent pool or use an existing one.

⁠Deploy the agent to Docker

The Azure Pipelines agent can be deployed as Docker container using the following command:

docker run -d -e AZP_URL=<your-azuredepops-instance> -e AZP_TOKEN=<pat> -e AZP_POOL=<azp-agentpool-name> -e AZP_AGENT_NAME=<agent-name> --name myazpagent btnguyen2k/azpagent-base:latest

Environment variables⁠

Env variableDescriptionDefault value
AZP_URLThe URL of the Azure DevOps or Azure DevOps Server instance.
Example https://dev.azure.com/myaccount/
AZP_TOKENPersonal access token (PAT)⁠ with Agent Pools (read, manage) scope.
AZP_AGENT_NAMEAgent namethe container hostname
AZP_POOLAgent pool nameDefault
AZP_WORKWork directory_work

Mount volumn to persist data in work directory

docker run -d -e AZP_URL=... -e AZP_TOKEN=... -e AZP_POOL=... -e AZP_AGENT_NAME=... -e AZP_WORK=/workspace -v /home/workspace/azp:/workspace --name mycontainer myazpagent:ubuntu-18.04

Tag summary

Content type

Image

Digest

Size

88.5 MB

Last updated

about 6 years ago

docker pull btnguyen2k/azpagent-base