Move blackbox migration into CI job

This commit is contained in:
Daniel Schädler 2026-04-11 16:12:39 +02:00
parent dc60e672b8
commit 4242c1ccd0
2 changed files with 11 additions and 8 deletions

View File

@ -37,15 +37,15 @@ rails e2e spec:
alias: postgres alias: postgres
- name: $CI_REGISTRY_IMAGE/production/commits:$CI_COMMIT_SHA - name: $CI_REGISTRY_IMAGE/production/commits:$CI_COMMIT_SHA
alias: app alias: app
entrypoint:
- /bin/bash
- -lc
command: command:
- | - bundle
until getent hosts postgres >/dev/null 2>&1; do sleep 1; done - exec
until bundle exec ruby -rpg -e "PG.connect(ENV.fetch('POSTGRES_URL')).close" >/dev/null 2>&1; do sleep 1; done - rails
bundle exec rails db:migrate - s
exec bundle exec rails s -p 3000 -b 0.0.0.0 - -p
- "3000"
- -b
- 0.0.0.0
variables: variables:
POSTGRES_DB: turniere_blackbox POSTGRES_DB: turniere_blackbox
POSTGRES_USER: turniere POSTGRES_USER: turniere

View File

@ -619,6 +619,9 @@ def blackbox_service(
username=E2E_USERNAME, username=E2E_USERNAME,
): ):
"""Run blackbox HTTP E2E against an already running production app plus Postgres sidecars.""" """Run blackbox HTTP E2E against an already running production app plus Postgres sidecars."""
_print_header("Running production database migrations")
c.run("bundle exec rails db:migrate", env=_shared_production_env(), pty=True)
_print_header(f"Waiting for app healthcheck at {base_url}") _print_header(f"Waiting for app healthcheck at {base_url}")
_wait_for_http(base_url=base_url, timeout=120) _wait_for_http(base_url=base_url, timeout=120)