Service Requirement PostgreSQL

Add the service requirement

Requirement Service

POSTGRES_USER=myuser
POSTGRES_PASSWORD=mypassword

And a requirement model which allow you to execute apt-get install -y postgresql-client, see HowTo

Requirement

Add a step of type script

Docker image postgres:9.5.3 start a PostgreSQL at startup. So, it’s now available on mypg

#!/bin/bash

set -ex

apt-get update
apt-get install -y postgresql-client

PGPASSWORD=mypassword psql -U myuser -h mypg <<EOF
\x
SELECT version();
EOF

Step

Execute Pipeline

See output:

Log