delete database
This commit is contained in:
parent
8c7681581c
commit
f4769c2e55
1 changed files with 10 additions and 0 deletions
|
|
@ -33,3 +33,13 @@ steps:
|
|||
|
||||
psql -h $POSTGRES_HOST -U $POSTGRES_USER -d postgres -c "CREATE DATABASE ci_${BUILD_SOURCEBRANCH#refs/heads/}"
|
||||
displayName: 'Create branch dedicated database'
|
||||
|
||||
- script: |
|
||||
cp ~/dbt-ci/.env .
|
||||
echo "POSTGRES_DATABASE=${BUILD_SOURCEBRANCH#refs/heads/}" >> .env
|
||||
set -a && source .env && set +a
|
||||
|
||||
psql -h $POSTGRES_HOST -U $POSTGRES_USER -d postgres -c "DROP DATABASE ci_${BUILD_SOURCEBRANCH#refs/heads/}"
|
||||
condition: always()
|
||||
displayName: 'Delete branch dedicated database'
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue