From 1ee499c8c934a79202134131a03096727cc4ba5e Mon Sep 17 00:00:00 2001 From: "maxime.rocher" Date: Fri, 10 Jan 2025 11:27:48 +0100 Subject: [PATCH] test drone 5 --- .drone.yml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3759bcf..9695a73 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,19 +17,17 @@ steps: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: from_secret: db_database - - name: init-database - image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest - environment: - PGPASSWORD: - from_secret: db_password - PGUSER: - from_secret: db_user - 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 +- name: init-database + image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest + environment: + PGPASSWORD: + from_secret: db_password + PGUSER: + from_secret: db_user + PGDATABASE: + from_secret: db_database + commands: + - 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 +