diff --git a/Jenkinsfile b/Jenkinsfile index f24f7ace..e5ae79e0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,6 +22,9 @@ pipeline { // Debe coincidir con @playwright/test del frontend (ver frontend/pnpm-lock.yaml) PLAYWRIGHT_IMAGE = 'mcr.microsoft.com/playwright:v1.56.1-noble' DEPLOY_PATH = '~/projects/anexo76' + // URL de Keycloak/Workspace accesible desde el agente Jenkins. + // Difiere de A76_URL/kcauth porque Keycloak vive en Workspace, no en el servidor de Anexo76. + KC_URL = 'https://workspace.aduanasoft.com/kcauth' } options { @@ -204,7 +207,7 @@ pipeline { -e VITE_KEYCLOAK_CLIENT_ID=anexo76-frontend \ -e KEYCLOAK_CLIENT_ID=anexo76-frontend \ -e ORIGIN=http://localhost:5173 \ - -e "E2E_KEYCLOAK_URL=${A76_URL}/kcauth" \ + -e "E2E_KEYCLOAK_URL=${KC_URL}" \ -e "E2E_TEST_USER=${E2E_USER}" \ -e "E2E_TEST_PASSWORD=${E2E_PASS}" \ -w /workspace/frontend \ @@ -217,7 +220,7 @@ pipeline { # Verificar que Keycloak acepta el password grant # (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_TOKEN_EP="${KC_URL}/realms/master/protocol/openid-connect/token" # -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}" \