From f9ae9d418078310f94cece20d225863549254e7f Mon Sep 17 00:00:00 2001 From: AlexeerCT Date: Fri, 24 Apr 2026 14:16:02 -0500 Subject: [PATCH] Refactor Alembic command in Jenkinsfile for improved execution - Updated the Alembic upgrade command to use the direct binary path instead of Python, addressing issues with command parsing in Docker. - Enhanced comments to clarify the reasoning behind the changes and their implications for E2E testing. --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1fa5a442..8315282e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -284,8 +284,9 @@ pipeline { e2e_compose_fail_logs exit 1 fi - # Nunca usar "python3 -m alembic -c": el -c es ambigüo; Alembic recibe un config vacío (No 'script_location') - if ! e2e_compose run --rm --no-deps --entrypoint python3 backend -m alembic --config /app/alembic.ini upgrade head; then + # Binario /usr/local/bin/alembic: sin python3 -m (el -c rompe; log con -c = build sin el último commit) + # --config=/ruta evita un token que empiece con - (algunos compose run lo mezclan con sus flags) + if ! e2e_compose run --rm --no-deps --entrypoint /usr/local/bin/alembic backend --config=/app/alembic.ini upgrade head; then echo "ERROR: falló alembic upgrade head (job previo al stack completo)" e2e_compose_fail_logs exit 1