Move blackbox migration into CI job
This commit is contained in:
parent
dc60e672b8
commit
4242c1ccd0
|
|
@ -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
|
||||||
|
|
|
||||||
3
tasks.py
3
tasks.py
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue