From d4e3846e695723e6aff334e46c05101045f13a8e Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 15 Jan 2026 09:03:07 -0600 Subject: [PATCH] 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 --- scripts/monitor-deploy.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/monitor-deploy.sh b/scripts/monitor-deploy.sh index 1eb3f891..4abda970 100755 --- a/scripts/monitor-deploy.sh +++ b/scripts/monitor-deploy.sh @@ -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 ""