test drone 5
continuous-integration/drone/push Build was killed Details

master
Maxime ROCHER 3 months ago
parent 046794ddf2
commit 42b02222c3

@ -7,7 +7,7 @@ steps:
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment: environment:
IMAGENAME: postgres:13 IMAGENAME: postgres:13
CONTAINERNAME: mypostgres CONTAINERNAME: dbWikiFantasy
COMMAND: create COMMAND: create
PRIVATE: true PRIVATE: true
CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD:
@ -18,7 +18,7 @@ steps:
from_secret: db_database from_secret: db_database
- name: init-database - name: init-database
image: postgres:13 image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment: environment:
PGPASSWORD: PGPASSWORD:
from_secret: db_password from_secret: db_password
@ -27,5 +27,9 @@ steps:
PGDATABASE: PGDATABASE:
from_secret: db_database from_secret: db_database
commands: commands:
- until pg_isready -h mypostgres -U postgres; do sleep 1; done # Installer le client PostgreSQL
- psql -h mypostgres -U postgres -d wikifantasy -f scripts/init.sql - 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

Loading…
Cancel
Save