woodpecker/pipeline/samples/sample_8_postgres/pipeline.yml

17 lines
550 B
YAML
Raw Normal View History

steps:
2019-04-06 13:44:04 +00:00
ping:
image: postgres
commands:
- sleep 10
- psql -U postgres -d test -h database -p 5432 -c "CREATE TABLE person( NAME TEXT );"
- psql -U postgres -d test -h database -p 5432 -c "INSERT INTO person VALUES('john smith');"
- psql -U postgres -d test -h database -p 5432 -c "INSERT INTO person VALUES('jane doe');"
- psql -U postgres -d test -h database -p 5432 -c "SELECT * FROM person;"
services:
database:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=test