forked from hazelcast/hazelcast-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
42 lines (35 loc) · 1.11 KB
/
.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
31
32
33
34
35
36
37
38
39
40
41
42
language: minimal
arch:
- amd64
- arm64
- ppc64le
- s390x
os: linux
services:
- docker
env:
- HAZELCAST_IMAGE=hazelcast-enterprise
- HAZELCAST_IMAGE=hazelcast-oss
install:
- docker build -t $HAZELCAST_IMAGE $HAZELCAST_IMAGE
script:
- docker images
- |
PROMETHEUS_PORT=8080
if [ "$HAZELCAST_IMAGE" = "hazelcast-oss" -o -n "$HZ_LICENSE_KEY" ]; then
docker run --name ${HAZELCAST_IMAGE}-container -e HZ_LICENSEKEY=$HZ_LICENSE_KEY -e PROMETHEUS_PORT=$PROMETHEUS_PORT -d --rm $HAZELCAST_IMAGE
sleep 10
HZ_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${HAZELCAST_IMAGE}-container)
nc -z $HZ_IP 5701
else
# license key is not available in PRs (to avoid leaking the secret value), lets just check we really run the EE
docker run --name ${HAZELCAST_IMAGE}-container -e PROMETHEUS_PORT=$PROMETHEUS_PORT --rm $HAZELCAST_IMAGE 2>&1 | grep -q "Hazelcast Enterprise"
fi
notifications:
email:
recipients:
on_success: never
on_failure: always