Test: Pipeline proyectosacc para laboratorio local

This commit is contained in:
Test
2026-06-03 03:55:02 +00:00
parent 68ab139d77
commit 61549be0f1
4 changed files with 254 additions and 43 deletions
+49
View File
@@ -0,0 +1,49 @@
#!/bin/bash
set -euo pipefail
ENV="${1:-dev}"
EC2_HOST="172.16.20.100"
echo "╔══════════════════════════════════════════╗"
echo "║ DEPLOY LOCAL - SACC SIMULATION ║"
echo "╚══════════════════════════════════════════╝"
echo ""
echo "Ambiente: ${ENV}"
echo "Servidor: ${EC2_HOST}"
echo "Fecha: $(date)"
echo ""
echo "=== PASO 1: Verificar contenedores ==="
docker ps --format "table {{.Names}}\t{{.Status}}"
echo ""
echo "=== PASO 2: Simular subida de artefactos ==="
echo "✓ JARs compilados (simulado)"
echo "✓ Frontend build (simulado)"
echo ""
echo "=== PASO 3: Verificar servicios ==="
echo "Servicios que se desplegarían:"
echo " - api-sacc4-authentication (puerto 8080)"
echo " - api-sacc4-users (puerto 8081)"
echo " - api-sacc4-tickets (puerto 8082)"
echo ""
echo "=== PASO 4: Health Check Local ==="
# Verificar si hay algo escuchando en los puertos
for port in 8080 8081 8082 8083 8084 8085; do
if nc -zv ${EC2_HOST} ${port} 2>/dev/null; then
echo " ✓ Puerto ${port} - ACTIVO"
else
echo " ⚠ Puerto ${port} - No responde (esperado en laboratorio)"
fi
done
echo ""
echo "✅ DEPLOY LOCAL SIMULADO COMPLETADO"
echo ""
echo "En producción este paso:"
echo " 1. Subiría JARs a EC2"
echo " 2. Reiniciaría servicios systemd"
echo " 3. Verificaría health checks"
echo ""