You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "🔍 Creating annotations for build results..."
726
+
727
+
# Overall build status annotation
728
+
if [ "$OVERALL_STATUS" = "✅ SUCCESS" ]; then
729
+
echo "::notice title=Build Success::EngineScript Nginx build completed successfully for $EVENT_NAME event. All components built and configured correctly."
730
+
else
731
+
echo "::warning title=Build Failed::EngineScript Nginx build failed for $EVENT_NAME event. Check job summary for detailed error information."
732
+
fi
733
+
734
+
# Component-specific annotations
735
+
if [ "$NGINX_STATUS" = "✅ Success" ]; then
736
+
echo "::notice title=Nginx Build Success::Nginx compiled and installed successfully with custom optimizations."
737
+
else
738
+
echo "::error title=Nginx Build Failed::Nginx build or installation failed. Review nginx.log for compilation errors."
739
+
fi
740
+
741
+
# Check for specific issues in build logs and create targeted annotations
742
+
if [ -f /tmp/ci-logs/nginx.log ]; then
743
+
# Check for compilation errors
744
+
if grep -qi "error:\|fatal error:\|compilation terminated" /tmp/ci-logs/nginx.log 2>/dev/null; then
echo "::notice title=AI Analysis Complete::EngineScript LEMP automation analysis completed for $EVENT_NAME event. Check job summary for detailed results."
366
+
367
+
# Parse analysis results for security issues and create annotations
368
+
if grep -qi "security\|vulnerability\|exploit\|injection\|privilege escalation\|unsafe\|hardening" ai_analysis_result.txt 2>/dev/null; then
369
+
echo "::warning title=Security Review Required::AI analysis detected potential security concerns in bash scripts or server configuration. Review analysis details in job summary."
370
+
fi
371
+
372
+
# Check for bash scripting best practices
373
+
if grep -qi "bash\|shell\|script\|quoting\|variable expansion\|error handling\|set -e" ai_analysis_result.txt 2>/dev/null; then
374
+
echo "::notice title=Bash Scripting Standards::AI analysis found bash scripting recommendations. Check job summary for best practices."
375
+
fi
376
+
377
+
# Check for nginx configuration issues
378
+
if grep -qi "nginx\|configuration\|directive\|server block\|location block\|ssl\|tls" ai_analysis_result.txt 2>/dev/null; then
379
+
echo "::notice title=Nginx Configuration::AI analysis found nginx configuration recommendations. Check job summary for details."
380
+
fi
381
+
382
+
# Check for performance and optimization issues
383
+
if grep -qi "performance\|optimization\|slow\|inefficient\|caching\|redis\|opcache" ai_analysis_result.txt 2>/dev/null; then
384
+
echo "::notice title=Performance Optimization::AI analysis found LEMP stack performance optimization opportunities. Check job summary for details."
385
+
fi
386
+
387
+
# Check for PHP configuration issues
388
+
if grep -qi "php\|php-fpm\|php.ini\|memory_limit\|upload_max\|post_max" ai_analysis_result.txt 2>/dev/null; then
389
+
echo "::notice title=PHP Configuration::AI analysis found PHP/PHP-FPM configuration recommendations. Check job summary for details."
390
+
fi
391
+
392
+
# Check for MariaDB/MySQL issues
393
+
if grep -qi "mariadb\|mysql\|database\|sql\|innodb\|query" ai_analysis_result.txt 2>/dev/null; then
394
+
echo "::notice title=Database Configuration::AI analysis found MariaDB configuration recommendations. Check job summary for details."
395
+
fi
396
+
397
+
# Check for Cloudflare integration issues
398
+
if grep -qi "cloudflare\|cdn\|dns\|real.*ip\|proxy" ai_analysis_result.txt 2>/dev/null; then
399
+
echo "::notice title=Cloudflare Integration::AI analysis found Cloudflare integration recommendations. Check job summary for details."
400
+
fi
401
+
402
+
# Check for system administration best practices
403
+
if grep -qi "systemd\|service\|permissions\|ownership\|chmod\|chown\|directory structure" ai_analysis_result.txt 2>/dev/null; then
404
+
echo "::notice title=System Administration::AI analysis found system administration recommendations. Check job summary for details."
405
+
fi
406
+
407
+
# Extract specific line-by-line feedback if available
408
+
if grep -E "line [0-9]+|:[0-9]+:" ai_analysis_result.txt 2>/dev/null; then
409
+
echo "::notice title=Line-Specific Feedback::AI analysis provided line-specific recommendations for bash scripts. See job summary for details."
410
+
fi
411
+
412
+
# Check analysis length and create appropriate annotation
413
+
ANALYSIS_SIZE=$(wc -c < ai_analysis_result.txt)
414
+
if [ "$ANALYSIS_SIZE" -gt 1000 ]; then
415
+
echo "::notice title=Detailed Analysis Available::Comprehensive AI analysis completed ($ANALYSIS_SIZE characters). Full results available in job summary."
416
+
else
417
+
echo "::notice title=Quick Analysis Complete::AI analysis completed with brief feedback. See job summary for details."
0 commit comments