Refactor Alembic command execution in Jenkinsfile to use script
- Updated the Alembic upgrade command to execute a script instead of using a variable, addressing issues with command execution in the Docker environment. - Revised comments to clarify the changes and their implications for the command context during E2E testing.
This commit is contained in:
7
backend/scripts/jenkins-alembic-e2e.sh
Executable file
7
backend/scripts/jenkins-alembic-e2e.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Ejecutado solo desde Jenkins E2E: docker compose run --entrypoint /bin/sh … backend /app/scripts/jenkins-alembic-e2e.sh
|
||||
# (evita pasar cadenas con ';' a -c: Groovy/CI rompe comillas y parte el comando)
|
||||
set -eux
|
||||
test -f /app/alembic.ini
|
||||
cd /app
|
||||
exec alembic -c /app/alembic.ini upgrade head
|
||||
Reference in New Issue
Block a user