-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (22 loc) · 860 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
sudo: required
services:
- docker
env:
- DOCKER_TAG=latest
before_script:
- docker run -d -p 5433:5432 --name postgres postgres
- docker run -d --name ubuntu ubuntu bash -c "sleep 60"
#env:
#- HOST=$(/sbin/ip route|awk '/default/ { print $3 }')
#- CONTAINER=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postgres)
script:
- sudo ss -lntp
- sudo iptables -L
- sudo iptables-save
- sudo docker ps
# - docker exec ubuntu bash -c "apt-get -y update && apt -y install curl && curl -v $HOST:5433"
- export CONTAINER=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postgres)
- docker exec ubuntu bash -c "apt-get -y update && apt -y install curl && curl -v $CONTAINER:5433"
- docker exec ubuntu bash -c "curl -v $CONTAINER:5432"
after_success:
- echo "Test complete"