diff --git a/Jenkinsfile b/Jenkinsfile index 727e93d2..8e19a84d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -284,8 +284,10 @@ pipeline { e2e_compose_fail_logs exit 1 fi - # --entrypoint "" se pierde en sh/Jenkins (Docker toma "backend" como entrypoint, rompe o ignora CWD/ini) - if ! e2e_compose run --rm --no-deps --entrypoint /bin/sh backend -c "set -eux; test -f /app/alembic.ini; cd /app; exec alembic -c /app/alembic.ini upgrade head"; then + # Cuerpo de -c en variable: las comillas dobles inline en "if ! e2e_compose run ..." se colaban en + # el shell de Jenkins y -c quedaba solo con "set"; el resto se ejecutaba en el host (no existe /app) + E2E_ALEMBIC_CMD='set -eux; test -f /app/alembic.ini; cd /app; exec alembic -c /app/alembic.ini upgrade head' + if ! e2e_compose run --rm --no-deps --entrypoint /bin/sh backend -c "$E2E_ALEMBIC_CMD"; then echo "ERROR: falló alembic upgrade head (job previo al stack completo)" e2e_compose_fail_logs exit 1