← Back to Portal

Quick Reference Cheatsheet

Everything you need to recall cold on exam day — YAML, strategies, secrets, SRE, KQL, and the 13-rule answer hierarchy.

13 sections All 7 domains Code samples Decision tables

Section 1 — Azure Pipelines YAML Structure

trigger:
  branches:
    include: [main, release/*]

pr:
  branches:
    include: [main]

pool:
  vmImage: ubuntu-latest          # Microsoft-hosted
  # name: MyAgentPool             # Self-hosted

variables:
  - group: MyKeyVaultGroup        # Variable group (Key Vault linked)
  - name: buildConfiguration
    value: Release

stages:
  - stage: Build
    jobs:
      - job: BuildAndTest
        steps:
          - template: templates/build-steps.yml@SharedPipelines
            parameters:
              project: src/MyApp

  - stage: Deploy_Staging
    dependsOn: Build
    jobs:
      - deployment: Deploy
        environment: staging
        strategy:
          runOnce:
            deploy:
              steps:
                - script: echo "deploy"

Trigger Types

KeyWhen it firesUse for
trigger:Code pushed to branchMain CI build → produce artefacts
pr:PR opened/updated targeting branchBuild validation gate before merge
schedules:Cron expression (UTC)Nightly scans, weekly reports
resources.pipelines:Another pipeline completesCD triggered by upstream CI
Exam Traptrigger: fires on push to a branch. pr: fires when a PR targets a branch. They are different events for different purposes.

Section 2 — Template Types

Template typeWhen to useExample
Step templateShare a list of steps across multiple jobsSecurity scans, test steps, publish steps
Job templateShare an entire job definitionStandard build job used by 10 services
Stage templateShare an entire deployment stageDeploy-to-environment stage reused per env
Variable templateShare variable definitionsCommon registry URL, image name prefix

Cross-Repository Template Reference

resources:
  repositories:
    - repository: SharedPipelines
      type: git
      name: MyOrg/SharedPipelines
      ref: refs/tags/v2.1.0      # Pin to a tag, not refs/heads/main

stages:
  - template: templates/deploy-stage.yml@SharedPipelines
    parameters:
      environment: production
      serviceConnection: prod-sc
Exam RulePin template references to a tag or commit SHA, not a branch, for stability. If the question asks how to prevent template changes from breaking consumers — tag pinning is the answer.

Section 3 — Agents

FactorMicrosoft-HostedSelf-Hosted
Private network accessNoYes
Setup overheadZeroYou manage
Custom pre-installed toolsNo (install each run)Yes
Ephemeral (fresh each run)YesNo (unless configured)
CostFree minutes + per-minute chargeInfrastructure cost
Decision RulePrivate database / corporate firewall / on-premises endpoint → self-hosted. Standard open-source build → Microsoft-hosted.

Section 4 — Deployment Strategies

StrategyRollback speedBest for
Blue/GreenInstant (re-switch)Critical services, instant rollback needed
CanaryAutomatic on threshold breachGradual risk, data-driven release
RingPer-ring rollbackSaaS with distinct user populations
RollingSlow (redeploy)Stateless services, backward-compatible changes
Feature FlagInstant (flip flag)Decouple deploy from release; A/B testing
Big BangSlow (full redeploy)Avoid — highest blast radius
Key Distinctions "Instant rollback without redeployment" → Blue/Green (or Feature Flag)
"Gradual rollout with health-gate progression" → Canary
"Turn off feature without deploying" → Feature Flag
"Maintain v1, v2, v3 simultaneously" → NOT deployment strategy — this is GitFlow branching

Section 5 — Secret Management

The Correct Chain

# Pipeline route
Secret → Azure Key Vault → Variable Group (Key Vault linked)
       → Pipeline variable (masked) → App

# Application runtime route  
Secret → Azure Key Vault → Managed Identity
       → Application code (runtime retrieval) → No credential in code

Key Vault + Pipeline Variable Groups

variables:
  - group: ProductionSecrets    # Variable group linked to Key Vault

steps:
  - script: echo "$(DatabasePassword)"   # Value masked in logs

Managed Identity (application runtime)

// No credential in code — identity authenticates automatically
var client = new SecretClient(
    new Uri("https://myvault.vault.azure.net/"),
    new DefaultAzureCredential()   // Uses managed identity in Azure
);
var secret = await client.GetSecretAsync("DatabasePassword");

Key Vault Reference (App Service / Function)

@Microsoft.KeyVault(VaultName=myVault;SecretName=ConnectionString)

Wrong Patterns (Exam Traps)

Wrong patternWhy wrong
Store secret in YAML fileIn source control — readable by anyone with repo access
Base64-encode secret in YAMLBase64 is encoding, not encryption — trivially reversed
Store in plain pipeline variableStored in Azure DevOps without Key Vault protection
Hardcode in source codeIn history forever even after removal
Pass as command-line argumentVisible in process list and logs

Section 6 — Security Scan Reference

Scan typeAcronymRequires running appEarliest stageTools
Static Application Security TestingSASTNoPR validationSonarQube, Checkmarx, GitHub SAST
Software Composition AnalysisSCANoPR validationMend, Snyk, OWASP Dependency-Check
Infrastructure as Code ScanningIaC scanNoPR validationCheckov, tfsec, Azure Policy
Secret ScanningNoPre-commit hookdetect-secrets, gitleaks, GitHub secret scanning
Container Image ScanningNoBefore registry pushTrivy, Aqua, Defender for Containers
Dynamic Application Security TestingDASTYesPost-deploy to test envOWASP ZAP, Burp Suite Enterprise
Exam RuleSAST + SCA + IaC scan → PR validation build. DAST → deployed test environment. Critical CVE found = fail the pipeline immediately. Not warn, not quarantine.

Section 7 — Branching Strategies

FactorTrunk-BasedGitFlow
Main branchAlways deployableRepresents production
Feature branchesVery short-lived (hours to 2 days)Can live for weeks
Release branchesNot requiredrelease/x.x per release
Large featuresFeature flagsLong-lived branches
Best forHigh-frequency delivery, CI/CDVersioned releases, multi-version support
Decision Rule "Deploys multiple times per day/week" → Trunk-based
"Maintains v1.x, v2.x, v3.x simultaneously" → GitFlow
"Teams want speed and CI but governance" → Trunk-based + strict PR policies

Section 8 — Pull Request Policy Stack

PolicySettingWhy required
Minimum reviewer count≥ 2 (preferably)Human code review
Build validationRequired (blocking)Automated quality gate
Linked work itemsRequiredTraceability to requirements
Comment resolutionRequiredNothing unaddressed in review
No force pushEnforcedImmutable history
Delete source branchAutomatic on mergeRepository hygiene
CODEOWNERS / required reviewersConfigured per pathOwnership for sensitive files

Section 9 — SRE Formulae and Definitions

SLI → what you measure (e.g., "request success rate") SLO → what you target (e.g., "99.9% over 28 days") SLA → what you promise (always ≤ SLO — never above)

Error Budget Calculation

Error budget = (1 − SLO) × measurement period

Examples:
99.0% SLO, 30 days → 0.010 × 43,200 min = 432 min  (7.2 hours)
99.5% SLO, 30 days → 0.005 × 43,200 min = 216 min  (3.6 hours)
99.9% SLO, 30 days → 0.001 × 43,200 min =  43 min
99.95% SLO, 30 days →                        21.6 min
99.99% SLO, 30 days →                         4.3 min

Burn Rate

Burn rate = current consumption rate / sustainable rate

Burn rate 1×  → budget exhausted exactly at period end (normal)
Burn rate 2×  → budget exhausted in half the period
Burn rate 6×  → budget exhausted in 1/6th of the period (~5 days monthly)

High burn rate → freeze risky releases → prioritise reliability work
Low burn rate  → safe to increase release velocity

DORA Metrics

MetricWhat it measuresElite performer
Deployment frequencyHow often deployed to productionMultiple per day
Lead time for changesCommit → productionLess than 1 hour
MTTRIncident detection → service restorationLess than 1 hour
Change failure rate% of deployments causing incidentsLess than 15%

Toil Characteristics

Toil isManual + repetitive + triggered by service events + scales with service load + provides no enduring value. SRE target: ≤ 50% of time on toil. Toil above 50% must be actively reduced.

Section 10 — Azure Boards Reference

Work Item Hierarchy

Epic → Strategic initiative, spans quarters / multiple teams └── Feature → Product capability, spans multiple sprints └── User Story → User-facing increment, fits within one sprint └── Task → Implementation step, estimated in hours └── Bug → Defect, tracked as first-class work item

Process Templates

TemplateWork item typesBest for
AgileEpic, Feature, User Story, Task, Bug, IssueMost teams
ScrumEpic, Feature, PBI, Task, Bug, ImpedimentStrict Scrum teams
CMMIEpic, Feature, Requirement, Task, Bug, Change RequestRegulated/CMMI process

Work Item State Flow (Agile)

New → Active → Resolved → Closed ↓ (test fails) → Active

Section 11 — Scrum Ceremonies Reference

CeremonyDurationAttendeesOutput
Sprint Planning2 hr per sprint weekDev + PO + SMSprint goal + sprint backlog
Daily Scrum15 min (strict)Dev teamCoordination, blocker surfacing
Sprint Review1 hr per sprint weekDev + PO + StakeholdersDemo, backlog feedback, backlog update
Sprint Retrospective45–90 minDev + SM (no stakeholders)1–3 process improvement actions
Backlog Refinement1–2 hr per sprintDev + POItems estimated, acceptance criteria defined
Most Common Exam TrapSprint Review = show stakeholders what was built, update backlog. Sprint Retrospective = internal team process improvement, no stakeholders. These are always tested.

Section 12 — KQL Reference

-- Filter rows
requests
| where resultCode == "500"
| where timestamp > ago(24h)

-- Count by status code
requests
| summarize count() by resultCode
| order by count_ desc

-- Average duration by hour
requests
| summarize avg(duration) by bin(timestamp, 1h)

-- 99th percentile latency
requests
| summarize percentile(duration, 99) by bin(timestamp, 1h)

-- Error rate as percentage
requests
| summarize
    total = count(),
    failures = countif(success == false)
  by bin(timestamp, 1h)
| extend errorRate = (failures * 100.0) / total

-- Failed requests with details
requests
| where success == false
| project timestamp, name, resultCode, duration, url
| order by timestamp desc
| take 50

-- Join requests with exceptions
requests
| where success == false
| join kind=leftouter (exceptions | project operation_Id, type, outerMessage)
    on operation_Id
| project timestamp, name, type, outerMessage

Key Fields in the requests Table

FieldTypeDescription
timestampdatetimeWhen the request was received
resultCodestringHTTP status code as string
durationrealDuration in milliseconds
successboolTrue if 2xx/3xx
operation_IdstringCorrelation ID for distributed tracing
cloud_RoleNamestringService name (for multi-service apps)

Section 13 — The Answer Selection Hierarchy

When choosing between two plausible answers, apply these preferences in order:

1Automated > manual — automated wins almost every time
2Earlier scan > later — shift-left always beats scan-at-deploy
3Build once > rebuild per env — immutable artefact promotion always wins
4Key Vault > any other secret storage
5Managed identity > service principal with secret
6Lower blast radius > higher — canary/blue-green beats big bang
7Fail pipeline > warn — for security findings
8SLO-linked alert > volume-based alert
9Trunk-based for speed — GitFlow only when question mentions multiple concurrent versions
10Sprint Retrospective = process, Review = demo — never mix these