test drone 5
continuous-integration/drone/push Build encountered an error Details

master
Maxime ROCHER 3 months ago
parent 42b02222c3
commit 1ee499c8c9

@ -17,7 +17,7 @@ steps:
CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB:
from_secret: db_database
- name: init-database
- name: init-database
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment:
PGPASSWORD:
@ -27,9 +27,7 @@ steps:
PGDATABASE:
from_secret: db_database
commands:
# Installer le client PostgreSQL
- apk update && apk add postgresql-client
# Attendre que PostgreSQL soit prêt
- until pg_isready -h dbWikiFantasy -U postgres; do sleep 1; done
# Exécuter le script d'initialisation
- psql -h dbWikiFantasy -U postgres -d wikifantasy -f script/init.sql
- apt-get update && apt-get install -y postgresql-client
- until pg_isready -h dbWikiFantasy -U "$PGUSER"; do sleep 1; done
- psql -h dbWikiFantasy -U "$PGUSER" -d "$PGDATABASE" -f script/init.sql

Loading…
Cancel
Save