Move blackbox migration into CI job
This commit is contained in:
parent
dc60e672b8
commit
4242c1ccd0
|
|
@ -37,15 +37,15 @@ rails e2e spec:
|
|||
alias: postgres
|
||||
- name: $CI_REGISTRY_IMAGE/production/commits:$CI_COMMIT_SHA
|
||||
alias: app
|
||||
entrypoint:
|
||||
- /bin/bash
|
||||
- -lc
|
||||
command:
|
||||
- |
|
||||
until getent hosts postgres >/dev/null 2>&1; do sleep 1; done
|
||||
until bundle exec ruby -rpg -e "PG.connect(ENV.fetch('POSTGRES_URL')).close" >/dev/null 2>&1; do sleep 1; done
|
||||
bundle exec rails db:migrate
|
||||
exec bundle exec rails s -p 3000 -b 0.0.0.0
|
||||
- bundle
|
||||
- exec
|
||||
- rails
|
||||
- s
|
||||
- -p
|
||||
- "3000"
|
||||
- -b
|
||||
- 0.0.0.0
|
||||
variables:
|
||||
POSTGRES_DB: turniere_blackbox
|
||||
POSTGRES_USER: turniere
|
||||
|
|
|
|||
3
tasks.py
3
tasks.py
|
|
@ -619,6 +619,9 @@ def blackbox_service(
|
|||
username=E2E_USERNAME,
|
||||
):
|
||||
"""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}")
|
||||
_wait_for_http(base_url=base_url, timeout=120)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue