Pipelines: Stages, Jobs, Steps & Agents
The Integrated Suite
Azure DevOps bundles Repos (Git hosting), Pipelines (CI/CD), Boards (work tracking, like Jira), Artifacts (package feeds), and Test Plans (manual test management) — an integrated platform rather than a single narrow tool. Despite being Microsoft's product, Pipelines is language-agnostic (Node, Python, Java...) and can deploy to AWS/GCP, not just Azure.
azure-pipelines.yml
trigger:
branches:
include: [main]
stages:
- stage: Build
jobs:
- job: BuildAndTest
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '20.x'
- script: npm ci
- script: npm test
- stage: Deploy
dependsOn: Build
jobs:
- deployment: DeployProd
environment: production # can require manual approval hereHierarchy: pipeline → stages (Build, Deploy) → jobs (can run in parallel) → steps (run in order within a job). Keeping stages separate lets deploy gate on Build succeeding, with an environment approval pausing for manual sign-off before production.
Agents
Microsoft-hosted agents are pre-configured, ephemeral VMs — convenient, minimal setup. Self-hosted agents run on infrastructure you maintain — needed for internal network access, specific hardware, or tighter control over the build environment/caching.
Tasks & Triggers
Tasks (NodeTool@0, PublishBuildArtifacts@1) are pre-built, reusable step implementations from Microsoft/community catalogs — similar to GitHub Actions' marketplace. trigger configures what starts a run: branch pushes, PR triggers, or schedules.
Keep your own version of these notes — editable, searchable, and organised by your stack.
Start free