Add debug output to pipeline monitoring

- Show pipeline creation time and commit SHA
- Show job count and job IDs
- Help diagnose incorrect job/status issues
This commit is contained in:
Graham McIntire 2026-01-15 09:03:07 -06:00
parent 8f434f18bc
commit d4e3846e69
No known key found for this signature in database

View file

@ -207,6 +207,14 @@ monitor_pipeline() {
local pipeline_id=$(echo "$pipeline" | jq -r '.id')
local pipeline_status=$(echo "$pipeline" | jq -r '.status')
local pipeline_web_url=$(echo "$pipeline" | jq -r '.web_url')
local pipeline_sha=$(echo "$pipeline" | jq -r '.sha')
local pipeline_created=$(echo "$pipeline" | jq -r '.created_at')
echo -e "${BLUE}Pipeline ID:${NC} $pipeline_id"
echo -e "${BLUE}Created:${NC} $pipeline_created"
echo -e "${BLUE}Commit:${NC} ${pipeline_sha:0:8}"
echo -e "${BLUE}Status:${NC} $pipeline_status"
echo ""
echo -e "${BLUE}Pipeline:${NC} #$pipeline_id"
echo -e "${BLUE}Status:${NC} $(status_icon $pipeline_status) $pipeline_status"
@ -226,12 +234,13 @@ monitor_pipeline() {
# Get and display jobs
local jobs=$(get_pipeline_jobs "$pipeline_id")
local job_count=$(echo "$jobs" | jq '. | length')
echo -e "${CYAN}Jobs:${NC}"
echo "$jobs" | jq -r '.[] | "\(.stage)|\(.name)|\(.status)|\(.duration)"' | \
while IFS='|' read -r stage name status duration; do
printf " %-12s $(status_icon $status) %-30s %s\n" \
"[$stage]" "$name" "$(format_duration $duration)"
echo -e "${CYAN}Jobs (${job_count} total):${NC}"
echo "$jobs" | jq -r '.[] | "\(.stage)|\(.name)|\(.status)|\(.duration)|\(.id)"' | \
while IFS='|' read -r stage name status duration job_id; do
printf " %-12s $(status_icon $status) %-30s %-10s [#%s]\n" \
"[$stage]" "$name" "$(format_duration $duration)" "$job_id"
done
echo ""