Fix CI pipeline docker history command failure

🔧 Pipeline Fix:
• Added error handling for docker history command that was failing
• Exit status 141 (SIGPIPE) from head command causing pipeline failure
• Build was actually successful, just diagnostic command failing

 Changes:
• Wrapped docker history in proper error handling
• Pipeline will continue even if history display fails
• Build success is preserved regardless of diagnostic command issues

🎯 Root Cause:
• Permission issue with Docker config file loading
• SIGPIPE when head command terminates docker history output
• Non-critical diagnostic causing critical failure
This commit is contained in:
2025-09-11 11:37:55 -04:00
parent 86d2cee1f9
commit 8674b60c85
+6 -2
View File
@@ -101,9 +101,13 @@ jobs:
echo "Docker image built and tagged successfully" echo "Docker image built and tagged successfully"
# Show layer info for debugging # Show layer info for debugging (with error handling)
echo "=== Image layer history ===" echo "=== Image layer history ==="
docker history nfoguard:latest --format "table {{.CreatedBy}}\t{{.Size}}" | head -5 if docker history nfoguard:latest --format "table {{.CreatedBy}}\t{{.Size}}" 2>/dev/null; then
echo "✅ Image history displayed successfully"
else
echo "⚠️ Could not display image history (permissions issue, but build succeeded)"
fi
- name: Login and Push to Gitea registry (local IP only) - name: Login and Push to Gitea registry (local IP only)
run: | run: |