ci: set search_path during sandbox init if PGHOST is defined
This commit is contained in:
parent
f0482363ad
commit
04c46ee201
|
@ -247,7 +247,8 @@ async function main () {
|
|||
Env: [
|
||||
`LETSENCRYPT_HOST=${hostname}`,
|
||||
`VIRTUAL_HOST=${hostname}`,
|
||||
`VIRTUAL_PORT=8000`
|
||||
`VIRTUAL_PORT=8000`,
|
||||
`PGHOST=dt-db-${branch}`
|
||||
],
|
||||
Labels: {
|
||||
appversion: `${argv.appversion}` ?? '0.0.0',
|
||||
|
|
|
@ -22,8 +22,10 @@ echo "Creating data directories..."
|
|||
chmod +x ./app-create-dirs.sh
|
||||
./app-create-dirs.sh
|
||||
|
||||
echo "Altering PG search path..."
|
||||
psql -U django -h db -d ietf -v ON_ERROR_STOP=1 -c '\x' -c 'ALTER USER django set search_path=ietf_utf8,django,public;'
|
||||
if [ -n "$PGHOST" ]; then
|
||||
echo "Altering PG search path..."
|
||||
psql -U django -h $PGHOST -d ietf -v ON_ERROR_STOP=1 -c '\x' -c 'ALTER USER django set search_path=ietf_utf8,django,public;'
|
||||
fi
|
||||
|
||||
echo "Running Datatracker checks..."
|
||||
./ietf/manage.py check
|
||||
|
|
Loading…
Reference in a new issue