pipeline-debug
Skill1 starsChanged 7 months agoMITView on GitHub
Debug and understand Azure DevOps pipeline configurations. Use when a pipeline fails, when setting up CI/CD for a new repo, or when tracing variable resolution across templates.
- Reads credentials
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-contract-checkSkill
- architecture-designSkill
- context-scaffoldSkill
- context-service-guideSkill
- cpp-test-authoringSkill
- dependency-auditSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- review-prSkill
- springboot-api-from-templateSkill
- springboot-service-from-templateSkill
- terraform-validateSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Read the repo's azure-pipelines.yml (or azure-pipelines.yaml).
- Very specific: line 40
Read the template file from cpp-azure-devops-templates/
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pipeline Debug
Helps debug, understand, and configure Azure DevOps pipelines across CP repositories by tracing template references, variable resolution, and pipeline structure.
When to Use
- User asks "why did my pipeline fail", "debug this pipeline", "trace this variable"
- User wants to set up CI/CD for a new repo
- User needs to understand how shared templates work
- User wants to find which template defines a specific step or variable
Process
Step 1: Identify the Pipeline
Read the repo's azure-pipelines.yml (or azure-pipelines.yaml). This is the entry point.
Step 2: Trace Template References
CP pipelines use shared templates from cpp-azure-devops-templates. Template references look like:
resources:
repositories:
- repository: cppAzureDevOpsTemplates
type: github
name: hmcts/cpp-azure-devops-templates
ref: refs/heads/main
stages:
- template: pipelines/context-verify.yaml@cppAzureDevOpsTemplatesFor each template reference:
- Read the template file from
cpp-azure-devops-templates/ - Map the parameters passed from the calling pipeline to the template's parameter definitions
- Recursively follow any nested template references (stages → steps → tasks)
Step 3: Trace Variable Resolution
Variables are resolved in this order (later overrides earlier):
- Pipeline-level variables — defined in
azure-pipelines.yml - Variable groups — referenced by name, stored in Azure DevOps
- Template parameters — passed explicitly to templates
- Runtime expressions —
${{ variables.xxx }},$[ variables.xxx ] - Macro syntax —
$(variableName)resolved at runtime
Step 4: Identify Common Pipeline Types
| Repo Type | PR Template | Merge Template | Key Steps |
| Context services | context-verify.yaml | context-validation.yaml | Maven build, SonarQube, JaCoCo |
| UI apps | ui-verify.yaml | ui-validation.yaml | npm install, lint, test, build |
| Terraform modules | terratest.yaml | — | terraform init, validate, plan, test |
| Docker images | image-publish.yaml | — | Docker build, ACR push |
| Helm charts | Custom in cpp-helm-chart | — | Helm lint, package, ACR push |
UI E2E tests (cpp-ui-e2e-serenity) | azure-pipelines.yml (PR) | azure-pipelines-dev01_regression.yml, *_BPO_regression.yml, *_migration.yml, *_migration_EDT.yml, *_migration-nows.yml, *_migration-ts.yml, azure-pipeline-cdci-dlrm.yml | Maven verify, Serenity profiles, WebDriver browser provisioning, Serenity HTML reports |
API integration tests (cpp-apitests) | azure-pipelines.yaml (PR) | apitests-pipeline.yaml | Maven verify (Failsafe runs *IT.java), REST Assured + JUnit 5 |
For test-authoring guidance in either of the two test repos above, see cpp-test-authoring.
Step 5: Common Failure Patterns
| Symptom | Likely Cause | Where to Look |
settings.xml not found | Secure file download failed | Check DownloadSecureFile task and file name |
SonarQube analysis failed | Wrong project key or missing token | Check sonarQubeProjectKey parameter |
mvn: command not found | Wrong agent pool or missing tool | Check pool and task: Maven@4 config |
npm ERR! 403 | .npmrc not configured for private registry | Check secure file .npmrc download |
docker push failed | ACR login failed or wrong registry | Check containerRegistry service connection |
terraform plan failed | Backend config mismatch or missing vars | Check backend-config parameters |
Helm lint failed | Chart.yaml version mismatch or missing deps | Check helm dependency update step |
| Serenity report empty / no scenarios ran | Wrong tag filter or glue package missing | Check TestRunner.java @CucumberOptions + the profile's -Dcucumber.filter.tags |
cpp-apitests build green but no tests executed | Class named *Test.java instead of *IT.java | Failsafe only picks up *IT.java; rename |
| WebDriver session creation failed | Browser/driver mismatch in agent pool | Check WebDriverManager config + agent pool image |
Step 6: Generate Debugging Report
## Pipeline Analysis: [repo-name]
### Pipeline Type
[context-verify / ui-verify / custom]
### Template Chain
1. azure-pipelines.yml
└─ pipelines/context-verify.yaml@cppAzureDevOpsTemplates
├─ stages/build.yaml
│ └─ steps/maven-build.yaml
└─ stages/quality.yaml
└─ steps/sonarqube-scan.yaml
### Variables Resolved
| Variable | Value | Source |
|----------|-------|--------|
| sonarQubeProjectKey | uk.gov.moj.cpp... | pipeline parameter |
| mavenGoals | clean verify | template default |
### Issues Found
- [description of any problems]
### Recommended Fix
- [specific fix with file and line references]Key Files in cpp-azure-devops-templates
cpp-azure-devops-templates/
├── pipelines/
│ ├── context-verify.yaml # Context service PR validation
│ ├── context-validation.yaml # Context service merge build
│ ├── ui-verify.yaml # UI app PR validation
│ ├── ui-validation.yaml # UI app merge build
│ ├── terratest.yaml # Terraform module testing
│ └── image-publish.yaml # Docker image publishing
├── stages/ # Reusable stage definitions
├── steps/ # Reusable step definitions
└── variables/ # Shared variable filesDeployment Pipelines
For deployment-related issues, also check:
cpp-aks-deploy/aks-deploy.yaml— main AKS deployment pipelinecpp-aks-deploy/helmsman.toml— Helmsman deployment configurationcpp-aks-deploy/helmsman_vars/*.env— environment-specific variables- Approval gates: non-live auto-resumes on timeout; live requires CP DevOps SC approval
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

