Support local environment variables
Closed this issue · 0 comments
fljdin commented
Inspired by named connections for psql
tasks, it should be nice to defined dedicated variables per task
---
environments:
- name: remote
variables:
PGHOST: remote
PGDATABASE: db
- name: default
variables:
PGDATABASE: postgresql://localhost/?service=local
tasks:
- id: 1
command: vacuumdb
env: remote
- id: 2
command: vacuumdb --analyze-only
variables:
PGHOST: localhost
PGUSER: postgres
- id: 3
type: psql
env: remote
loaded:
from: psql
variables:
PGHOST: remote
command: |
SELECT format('sleep .0%s', i) FROM generate_series(1, 2) AS i