Requirement Service
service
mypg
. This will be the service hostnamepostgres:9.5.3
. This is the name of Docker image to link to current jobPOSTGRES_USER=myuser
POSTGRES_PASSWORD=mypassword
And a requirement model which allow you to execute apt-get install -y postgresql-client
, see HowTo
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
Execute Pipeline
See output: