Merge pull request 'fix(jenkins): corregir captura de HTTP status en verificación de Keycloak' (#416) from fix/jenkins-mejora into development

Reviewed-on: ADUANASOFT/anexo76#416
This commit is contained in:
2026-05-20 18:10:15 +00:00

4
Jenkinsfile vendored
View File

@@ -218,7 +218,9 @@ pipeline {
# (auth.setup.ts lo usa directamente — sin pasar por /login)
echo "--- Verificando Keycloak token endpoint ---"
KC_TOKEN_EP="${E2E_KEYCLOAK_URL}/realms/master/protocol/openid-connect/token"
KC_STATUS=$(curl -sf --max-time 10 -o /dev/null -w "%{http_code}" \
# -s sin -f: curl no falla en HTTP 4xx/5xx, devuelve el código real
# || echo "000" solo se activa si curl no puede conectar (timeout, DNS, etc.)
KC_STATUS=$(curl -s --max-time 10 -o /dev/null -w "%{http_code}" \
-X POST "$KC_TOKEN_EP" \
-d "grant_type=password&client_id=anexo76-frontend&username=${E2E_TEST_USER}&password=${E2E_TEST_PASSWORD}&scope=openid" \
2>/dev/null || echo "000")