Page 1 of 8
1. Build Variables
- a) Custom variables
$C(variable name) - b) Built-in variables
- c) Variables from PowerShell
- d) Secrets
- e) Environment variables
2. Build Triggers
- a) Continuous Integration trigger
- b) Branch filter
- c) Pull Request
3. Build Options
- a) Build Job Properties
- Expiration Time
- Project Type
- b) Demands
- Product install
- c) Build Number Format
- d) Work Items (Azure Boards)
- e) Build Retention & History
Page 2 of 8
Types of Builds
I. CI Build
- Trigger: CI trigger
- Steps: Compile/Test
II. Nightly Build
- Trigger: Schedule Trigger
- Steps:
- Compile
- Regression
- Provisioning
- Code Analysis
III. Release Build
- Trigger: Manual Trigger
- Steps:
- Compile
- Test
- Regression
- Config Management
- Archive
Flow for DOTNET Projects
dotnet restore
↓
dotnet build
↓
dotnet test → dotnet publish → Publish Artifacts
Page 3 of 8
Notes:
-
dotnet buildhas implicit restore.dotnet publishhas implicit build. Disable it using:--no-restore or --no-build -
Restore/build can also be done using NuGet & VSBuild (based on MS Build). Flow in this case:
NuGet install ↓ NuGet restore ↓ dotnet build or VSBuild etc.
Release Pipelines
- Purpose: Deployment of the artifact + Release software
- Build Phase: Automated Build Pipeline
- Release Phase: Release Management Pipeline
- Allows many builds to go into one release.
Why separate deployment from release?
- To see if it operates in a stable fashion.
- Build actions reveal features to the user.
Page 4 of 8
Steps of a Release
- Build software (Tools: Jenkins, Azure DevOps) → Artifact + Provisioning scripts.
- Deploy software → Check telemetry.
- Release the feature.
Azure Release Management
Diagram
graph TD Artifacts --> Initial_Stage Initial_Stage --> Validation_Stage Initial_Stage --> Parallel_Stage Parallel_Stage --> Validation_Stage
Details
- Stage:
- Agent
- Task
- Agentless
- Agent
- Release Variables:
- Custom
- Built-in
- Secret
- Environment Variable
- Trigger: When artifact source is changed.
Azure Pipelines & YAML
Page 5 of 8
Used for:
-
CI:
- Build
master→ corrected: main branch - Build changes in a pull request
- Build
-
CD:
- Deploy a release to test environment
- Then deploy the release to prod environment
Pipeline Structure:
Trigger
- i) Commit
- ii) Pull Request
- iii) Release Created
- iv) Manually
Pipeline
flowchart LR
Trigger --> Stage1
Stage1 --> Stage2
Stage2 --> Stage3
Steps
- Step: Script
- Step: Task
- Step: Task
Stage
- Agent → Machine
- Job
Page 6 of 8
Types of Agents:
- Cloud-hosted
- Self-hosted
Types of Tasks:
-
Built-in: Build, Test, Utility
-
Custom: Build, Test, Utility
Examples:
- MSBuild
- .NET Core CLI
- Powershell
- BBJob
- OBoe Rep
There are also some custom templates (later).
Creating a Pipeline:
-
UI:
- Easy to create
- Hard to track changes & less features
-
YAML:
- Difficult
- More advanced features
YAML Fundamentals:
-
Key-value pairs:
Key: Value -
Lists:
List: - Item1 - Item2 -
Indentation
-
Data types
Nesting can be done.
Page 7 of 8
Using YAML with ADO:
Normal Use:
trigger:
pod:
vmImage:
steps:
- task: PowerShell@2
inputs:
targetType: # see docs
Stage and Job:
stages:
- stage:
jobs:
- job:
steps:
- # continued
Page 8 of 8
Variables:
variables:
xyz: xyzValue
platform: Any CPU
Later, it can be accessed using:
$(platform)
or:
$env:PLATFORM
Easy Guidelines:
- Use
$(var)in most cases but not directly in rich script code. - Use
${variable.var}for expression input types. - Use
${{parameter.var}}inside template expressions.
Templates:
- Enable reuse of YAML
#include like
Summary:
This document outlines the core concepts of Azure Pipelines and YAML configuration. It covers CI/CD workflows, pipeline triggers, agent types, task types, and YAML fundamentals like key-value pairs, lists, and variables. YAML usage with Azure DevOps (ADO) is introduced, along with stages and jobs configuration. Finally, the flexibility of templates and variable handling is discussed.
References & Related Topics:
- Azure Pipelines Documentation
- NuGet and VSBuild Integration
- Continuous Integration (CI/CD)