en un clic
en un clic
Load Ansible project development guidelines, testing conventions, PR review processes, and code structure reference into context
Review an Ansible PR following the project's standardized process from CLAUDE.md
| name | azp-logs |
| description | Download Azure Pipelines CI logs for analysis |
| argument-hint | <pr_number|build_id|build_url> |
| allowed-tools | ["Bash(gh pr view:*)","Bash(gh pr checks:*)","Bash(ls:*)","Read","Grep"] |
| user-invocable | true |
Download Azure Pipelines CI logs for analyzing test failures and CI issues.
IMPORTANT: Always ask the user before downloading logs. The download may take 5-10 minutes (or longer for large CI runs) depending on the number of jobs and log size.
/azp-logs <pr_number|build_id|build_url>
pr_number: GitHub PR number (will extract build ID from latest CI run)build_id: Azure Pipelines build ID (numeric)build_url: Full Azure Pipelines URL (e.g., https://dev.azure.com/ansible/ansible/_build/results?buildId=12345)This command uses the existing hacking/azp/download.py script to download CI logs.
Before running: Always confirm with the user before downloading logs. Inform them that:
Ask user for confirmation: Explain what will be downloaded and estimated time
Determine build ID:
gh pr checks <number> to get the Azure Pipelines URLDownload logs: Run hacking/azp/download.py with appropriate flags:
./hacking/azp/download.py <build_id_or_url> --console-logs -v
Analyze logs: After download completes, examine logs in <build_id>/ directory:
FAILED, ERROR, TracebackThe hacking/azp/download.py script supports:
--console-logs: Download console logs (recommended for CI failure analysis)--artifacts: Download test artifacts--run-metadata: Download run metadata JSON--all: Download everything--match-job-name <regex>: Filter to specific jobs--match-artifact-name <regex>: Filter to specific artifacts-v, --verbose: Show what is being downloaded-t, --test: Dry run (show what would be downloaded)For most CI failure analysis, use --console-logs to get the log files.
After downloading logs to <build_id>/ directory:
# Find all errors and failures
grep -r "FAILED\|ERROR\|Traceback" <build_id>/
# Find specific test failures
grep -r "FAILED test" <build_id>/
# Find sanity test failures
grep -r "The test" <build_id>/ | grep -i "failed"
# List all downloaded log files
ls -lh <build_id>/