From 607d3841f66cda75b04e50e514dfa44cf0631eea Mon Sep 17 00:00:00 2001 From: AlexeerCT Date: Fri, 24 Apr 2026 13:57:17 -0500 Subject: [PATCH] Refactor Jenkinsfile to improve Alembic upgrade command execution - Updated the Alembic upgrade command in the Jenkinsfile to specify the entrypoint correctly, ensuring the command executes in the intended context. - Added a comment to clarify the change regarding the entrypoint behavior in the Docker environment, enhancing maintainability and understanding of the script. --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e26dc21f..727e93d2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -284,7 +284,8 @@ pipeline { e2e_compose_fail_logs exit 1 fi - if ! e2e_compose run --rm --no-deps --entrypoint "" backend sh -c "set -eux; cd /app; alembic upgrade head"; then + # --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 echo "ERROR: falló alembic upgrade head (job previo al stack completo)" e2e_compose_fail_logs exit 1