Refactor Alembic upgrade command in Jenkinsfile for improved execution
- Updated the Alembic upgrade command to use a Python script for execution, addressing issues with configuration handling in Docker. - Enhanced comments to clarify the purpose of the changes and their implications for E2E testing.
This commit is contained in:
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@@ -284,9 +284,8 @@ pipeline {
|
||||
e2e_compose_fail_logs
|
||||
exit 1
|
||||
fi
|
||||
# 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
|
||||
# e2e_alembic_upgrade.py: carga /app/alembic.ini en la API; la CLI a veces queda con config vacío bajo compose (No 'script_location')
|
||||
if ! e2e_compose run --rm --no-deps --entrypoint /usr/local/bin/python3 backend /app/e2e_alembic_upgrade.py; 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