From d55f00e7d3bd87e9f61cb1e18bce8cffbd38960b Mon Sep 17 00:00:00 2001 From: Bryan Brancotte <bryan.brancotte@pasteur.fr> Date: Mon, 8 Mar 2021 15:38:19 +0100 Subject: [PATCH] put PGPASSWORD in variables --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff653012..5be3538b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,10 +76,10 @@ connect: image: postgres:10.15 needs: ["db-ready"] variables: - GIT_STRATEGY: none # important to not checkout source when branch is deleted + GIT_STRATEGY: none + PGPASSWORD: $POSTGRES_PASSWORD script: # official way to provide password to psql: http://www.postgresql.org/docs/9.3/static/libpq-envars.html - - export PGPASSWORD=$POSTGRES_PASSWORD - psql -h "${POSTGRES_HOST}" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "SELECT 'OK' AS status;" @@ -88,10 +88,10 @@ connectp: image: postgres:10.15 needs: [] variables: - GIT_STRATEGY: none # important to not checkout source when branch is deleted + GIT_STRATEGY: none + PGPASSWORD: $POSTGRES_PASSWORD script: # official way to provide password to psql: http://www.postgresql.org/docs/9.3/static/libpq-envars.html - - export PGPASSWORD=$POSTGRES_PASSWORD - psql -h "postgres" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "SELECT 'OK' AS status;" -- GitLab