File tree Expand file tree Collapse file tree 3 files changed +417
-48
lines changed
Expand file tree Collapse file tree 3 files changed +417
-48
lines changed Original file line number Diff line number Diff line change @@ -155,8 +155,27 @@ integration_tests:
155155 LOG_STREAM_NAME="${BUILD_ID#*:}"
156156 echo "Log Stream: $LOG_STREAM_NAME"
157157 echo ""
158- echo "=== CODEBUILD LOGS ==="
159- aws logs get-log-events --log-group-name "/aws/codebuild/app-sdlc" --log-stream-name "$LOG_STREAM_NAME" --start-from-head --query 'events[].message' --output text 2>/dev/null || echo "Could not retrieve CodeBuild logs"
158+ echo "=== DEPLOYMENT SUMMARY ==="
159+ # Wait for CloudWatch Logs to flush all events
160+ echo "Waiting 30 seconds for logs to flush..."
161+ sleep 30
162+ FULL_LOGS=$(aws logs get-log-events --log-group-name "/aws/codebuild/app-sdlc" --log-stream-name "$LOG_STREAM_NAME" --start-from-head --query 'events[].message' --output text 2>/dev/null || echo "Could not retrieve CodeBuild logs")
163+
164+ # Save full logs to artifact
165+ echo "$FULL_LOGS" > codebuild_logs.txt
166+ echo "📁 Full deployment logs saved to: codebuild_logs.txt"
167+
168+ # Extract and show deployment summary (AI or manual)
169+ echo ""
170+ SUMMARY=$(echo "$FULL_LOGS" | grep -A 100 "🤖 Generating deployment summary with Bedrock..." | head -100)
171+
172+ if [ -n "$SUMMARY" ]; then
173+ echo "🤖 Deployment Analysis:"
174+ echo "$SUMMARY"
175+ else
176+ echo "⚠️ No deployment summary found - check codebuild_logs.txt for details"
177+ fi
178+ fi
160179 else
161180 echo "Could not find CodeBuild execution"
162181 fi
@@ -168,4 +187,5 @@ integration_tests:
168187 when : always
169188 paths :
170189 - pipeline_execution_id.txt
190+ - codebuild_logs.txt
171191 expire_in : 1 week
You can’t perform that action at this time.
0 commit comments