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.
This commit is contained in:
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user