From dbff6c65214c8d8bd5c5292475589ec5cb5d944c Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Mon, 16 Aug 2021 13:40:51 +0100 Subject: [PATCH] Use su in lieu of sudo --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3d63927..5f9756e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,14 +30,14 @@ steps: image: rust:1.54.0-slim-bullseye commands: - apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential libsqlite3-dev python3.9 python3.9-venv postgresql postgresql-client - - sudo -u postgres createuser root - - sudo -u postgres createdb -O root testsuitedb + - su -u postgres -c 'createuser root' + - su -u postgres -c 'createdb -O root testsuitedb' - psql testsuitedb -c 'CREATE TABLE testsuitetable ();' - cargo install -q --path yama - cargo install -q --path datman - python3.9 -m venv testsuite/.venv - ./testsuite/.venv/bin/pip install -e testsuite -e datman-helper-postgres - - cd testsuite && ./.venv/bin/green + - cd testsuite && TEST_POSTGRES=$(hostname),testsuitedb,root ./.venv/bin/green - name: deploy manual image: rust:1.54.0-slim