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:
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user