forked from clkao/docker-postgres-plv8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
30 lines (23 loc) · 938 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
after_script:
- docker images
before_script:
- IMAGE="postgres-plv8:$POSTGRES_VERSION-$PLV8"
env:
- POSTGRES=9.5 POSTGRES_VERSION=9.5.10 PLV8=1.4.4
- POSTGRES=9.5 POSTGRES_VERSION=9.5.12 PLV8=2.1.0
- POSTGRES=9.6 POSTGRES_VERSION=9.6.8 PLV8=2.1.0
language: bash
script:
- docker build -t "${IMAGE}" "${POSTGRES}/${PLV8}"
- docker run -d --name postgres "${IMAGE}"
- sleep 3
- while ! docker exec -it postgres pg_isready -U postgres -h 127.0.0.1; do echo "$(date) - waiting for database to start"; sleep 1; done
- docker exec -it postgres psql -U postgres -c 'CREATE EXTENSION plv8; DO $$ plv8.elog(WARNING, plv8.version) $$ LANGUAGE plv8' | grep "${VERSION#????}"
after_success:
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- export REPO=unidays/postgres-plv8
- export TAG=$POSTGRES_VERSION-$PLV8
- docker build -t $TAG $POSTGRES
- docker tag $TAG $REPO:$TAG
- docker push $REPO
services: docker