Member-only story

Azure DevOps HandBook !

Arun Kumar Singh
4 min readSep 9, 2020

--

DevOps

Azure DevOps is an offering from Microsoft which accelerate and simplify the DevOps process. This service comes with version control, reporting, requirements management, project management, automated builds, testing and release management capabilities. It covers the entire application life-cycle, and enables DevOps capabilities. In this post I am trying to cover some important points which can help you while working on pipelines. Before you start reading further I must warn you that this post expects basic knowledge of Azure DevOps pipeline.

Important Predefined variables -

Agent.BuildDirectory [Pipeline.Workspace] — The location on the agent pool machine where all folders for a given build pipeline are created.

Agent.TempDirectory — A temporary folder that is cleaned after each pipeline job. You can use to create some secure file and clean it up after that

Build.ArtifactStagingDirectory — Use it for publishing artifacts, This directory is purged before each new build

System.DefaultWorkingDirectory — As the name says default working dir

Build.BuildId or Build.BuildNumber choice is yours !

Container Jobs -

Sometimes it’s important to run Jobs on container. It will help you to reduce dependency on agent pool nodes. Containers offer a lightweight abstraction over the host operating system.

container:
image: xyz
options: --hostname xyz-host --ip 192.168.0.1
steps:
- script: echo hello
###############################################################container: xyz:tag
steps:
- script: echo hello

Agent Node Pool

In some cases you may need to select specific node from node pool. This is helpful in those cases when you need to identify node issues or specific node has some package which is required for your Job.

pool:
name: MY-WIN
demands: 'Agent.Name -equals myhost-01'
steps:
- script: echo hello world
#https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml

Run time Parameters

--

--

Arun Kumar Singh
Arun Kumar Singh

Written by Arun Kumar Singh

In quest of understanding How Systems Work !

No responses yet