fix(ci): pasar credenciales SITAR al backend del stack E2E

Sin SITAR_API_URL/USER/PASSWORD, el botón "Consultar DOF" del dialog
ExchangeRateGuard nunca llena el input (el backend no tiene cómo pedir
el TC) y auth.setup.ts:72 falla con timeout. En el E2E viejo no salía
porque apuntaba a dev en vivo, donde ya había TC para hoy y el dialog
ni se abría.

Cambios:
- docker-compose.e2e.yml: backend recibe SITAR_API_URL/USER/PASSWORD
  por env var passthrough con defaults vacíos.
- Jenkinsfile: lee a76-sitar-api-url (string) y a76-sitar-credentials
  (usernamePassword) vía withCredentials y los inyecta.
- Cleanup ahora dumpea las últimas 200 líneas del backend cuando el
  stack está arriba, para diagnosticar fallas opacas (auth, SITAR,
  migraciones, etc.) sin tener que repetir el build.

Requiere en Jenkins:
- a76-sitar-api-url       (Secret Text)
- a76-sitar-credentials   (Username with password)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-22 14:02:09 -05:00
parent fad8bd7b84
commit 5a4bbfd739
2 changed files with 20 additions and 0 deletions

View File

@@ -80,6 +80,12 @@ services:
- VALKEY_URL=redis://valkey:6379/0
- HUB_URL=https://workspace.aduanasoft.com
- APP_PUBLIC_URL=http://localhost:5173
# SITAR — proveedor del tipo de cambio (botón "Consultar DOF" del dialog
# de ExchangeRateGuard). Sin estas vars el dialog nunca llena el input
# y auth.setup.ts falla. Las credenciales se inyectan desde Jenkins.
- SITAR_API_URL=${SITAR_API_URL:-}
- SITAR_API_USER=${SITAR_API_USER:-}
- SITAR_API_PASSWORD=${SITAR_API_PASSWORD:-}
- CSV_IMPORT_STORAGE=minio
- S3_ENDPOINT_URL=http://minio:9000
- S3_ACCESS_KEY=minioadmin