fix(jenkins): E2E siempre obligatorio, URL de Keycloak derivada de a76-public-url-dev
- Eliminada credential a76-e2e-keycloak-url: la URL de KC se construye
como ${A76_URL}/kcauth desde la credential existente a76-public-url-dev
- Quitado optional: true de a76-e2e-test-user y a76-e2e-test-pass:
el stage E2E es ahora obligatorio — falla el build si no están configuradas
- Reducción de credentials nuevas requeridas: de 3 a 2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@@ -168,16 +168,14 @@ pipeline {
|
||||
steps {
|
||||
// auth.setup.ts obtiene tokens directamente de Keycloak (password grant)
|
||||
// sin pasar por el browser ni por Workspace — /login hace 303 inmediato.
|
||||
// Credenciales opcionales en Jenkins (optional: true → si no existen, el stage se salta):
|
||||
// a76-e2e-keycloak-url : URL base de KC accesible desde el agente
|
||||
// (ej. https://workspace.aduanasoft.com/kcauth)
|
||||
// Credenciales requeridas en Jenkins:
|
||||
// a76-public-url-dev : URL pública base — la URL de KC se deriva de ella ({url}/kcauth)
|
||||
// a76-e2e-test-user : usuario de prueba en KC
|
||||
// a76-e2e-test-pass : contraseña del usuario de prueba
|
||||
withCredentials([
|
||||
string(credentialsId: 'a76-public-url-dev', variable: 'A76_URL'),
|
||||
string(credentialsId: 'a76-e2e-keycloak-url', variable: 'E2E_KC_URL', optional: true),
|
||||
string(credentialsId: 'a76-e2e-test-user', variable: 'E2E_USER', optional: true),
|
||||
string(credentialsId: 'a76-e2e-test-pass', variable: 'E2E_PASS', optional: true)
|
||||
string(credentialsId: 'a76-public-url-dev', variable: 'A76_URL'),
|
||||
string(credentialsId: 'a76-e2e-test-user', variable: 'E2E_USER'),
|
||||
string(credentialsId: 'a76-e2e-test-pass', variable: 'E2E_PASS')
|
||||
]) {
|
||||
sh '''
|
||||
set -euo pipefail
|
||||
@@ -204,7 +202,7 @@ pipeline {
|
||||
-e VITE_KEYCLOAK_CLIENT_ID=anexo76-frontend \
|
||||
-e KEYCLOAK_CLIENT_ID=anexo76-frontend \
|
||||
-e ORIGIN=http://localhost:5173 \
|
||||
-e "E2E_KEYCLOAK_URL=${E2E_KC_URL}" \
|
||||
-e "E2E_KEYCLOAK_URL=${A76_URL}/kcauth" \
|
||||
-e "E2E_TEST_USER=${E2E_USER}" \
|
||||
-e "E2E_TEST_PASSWORD=${E2E_PASS}" \
|
||||
-w /workspace/frontend \
|
||||
|
||||
Reference in New Issue
Block a user