Refactor Alembic command in Jenkinsfile for clarity and correctness

- Updated the Alembic upgrade command to use the `--config` option instead of `-c`, addressing ambiguity in configuration handling.
- Revised comments to enhance understanding of the command's context and implications during E2E testing.
This commit is contained in:
2026-04-24 14:10:30 -05:00
parent 1bc9c69347
commit 835eb51eaf

4
Jenkinsfile vendored
View File

@@ -284,8 +284,8 @@ pipeline {
e2e_compose_fail_logs
exit 1
fi
# Sin sh -c ni .sh bajo /app: sin comillas frágiles y sin depender de un fichero no montado aún (push)
if ! e2e_compose run --rm --no-deps --entrypoint python3 backend -m alembic -c /app/alembic.ini upgrade head; then
# 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
echo "ERROR: falló alembic upgrade head (job previo al stack completo)"
e2e_compose_fail_logs
exit 1