forked from sqshq/piggymetrics
-
Notifications
You must be signed in to change notification settings - Fork 83
/
.travis.yml
81 lines (66 loc) · 4.53 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
sudo: required
services:
- docker
language: java
jdk: oraclejdk8
env:
global:
- secure: "GeONVsTD48Y88CKoqupo/FC1Gy0eCrT1UNylvMzz5VYcLhWcUcu/d4870ZJznBqslGHbFaRc6VCXFLnbKNyR5Chgg127ouWOv/NFubJ5cO0UjHlBwoAxQ/SIrxG9W4B6Y2VeWRO0SIPHF6wUVeELiaPmIIe/jF15/SWJA926G2dF0+zTbn1KNWoVRi9pxZ0bIbEvVcVfHjWHsPtho916KRZ7ToV27f5E9DPLVMraK2HROOplJlXKNLuUor9xSmtOB/787yNrZmdsUaQDMHVfru9yEubfg4tF5ydoluB+JPzeUqIK2PrDgAiwmkEdoJFfbAOqwdy8vZkgpYd/t5vkhbOn3yA0QO1pnyhidx1YgyoJN3HwfMeVNQwUVg8jw7bltVe/DxsNo/AW11Tu7jKteuxewRHCxORzaUSmy5rnLq3AKIXT6h8Kq5VxP5tGbQypa7/z+Zu4vfOBdKGMiLllQ0vhhU0osgYzk/jT4KknuWQtOkX+QTS9iViIUwQgcn3kIMlz4eO83Mbt+IkNvgjF0DyE64mfV2ThTjXDV6959g3Nl/Fl95VMSTg95xtl0tbf733Lj+9HCIfLetlBz4ZzOqaDgD5fRL5HA8jR3FFHVdMd+dx/JELjSRHxO6ZFrCVG/2hBldIakO31/FbpODnDIkKO+86Oqz9DPKVnLJlmZp4=" # DOCKER_EMAIL
- secure: "Gl6a03cI88dKHV4rjP1IkYqCdVe7IM0XNcEzFDCxmvXHWSpqlotntOYtgvtRKsYOzb0cfdQwgFuwj80glU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eQNCXJoMolx9PPdfWZtQfBCWIlYA6GrWPeYWZganfU/1/zVb60gBmuXBl1sFRHAfY2uTGGocYGBcS7P13vPuXC9zSekSvMKI9PKQh+HEakXSlTPYsXqEtGBh/2xv99egk7fynChWiXJ5gML/5WsYA+cFp+mkd24fXEIK2H/3jqFc+UTKw+74q0t0KeBHmSf1bgoXiomhhXqGxx5w5eAHi6a6aWPSQIruhTKGaXuBvztU=" # DOCKER_PASS
- COMMIT=${TRAVIS_COMMIT::7}
after_success:
- bash <(curl -s https://codecov.io/bash)
- docker login -u $DOCKER_USER -p $DOCKER_PASS
#TAG
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
# CONFIG SERVICE
- export CONFIG=sqshq/piggymetrics-config
- docker build -t $CONFIG:$COMMIT ./config
- docker tag $CONFIG:$COMMIT $CONFIG:$TAG
- docker push $CONFIG
# REGISTRY
- export REGISTRY=sqshq/piggymetrics-registry
- docker build -t $REGISTRY:$COMMIT ./registry
- docker tag $REGISTRY:$COMMIT $REGISTRY:$TAG
- docker push $REGISTRY
# GATEWAY
- export GATEWAY=sqshq/piggymetrics-gateway
- docker build -t $GATEWAY:$COMMIT ./gateway
- docker tag $GATEWAY:$COMMIT $GATEWAY:$TAG
- docker push $GATEWAY
# AUTH SERVICE
- export AUTH_SERVICE=sqshq/piggymetrics-auth-service
- docker build -t $AUTH_SERVICE:$COMMIT ./auth-service
- docker tag $AUTH_SERVICE:$COMMIT $AUTH_SERVICE:$TAG
- docker push $AUTH_SERVICE
# ACCOUNT SERVICE
- export ACCOUNT_SERVICE=sqshq/piggymetrics-account-service
- docker build -t $ACCOUNT_SERVICE:$COMMIT ./account-service
- docker tag $ACCOUNT_SERVICE:$COMMIT $ACCOUNT_SERVICE:$TAG
- docker push $ACCOUNT_SERVICE
# STATISTICS SERVICE
- export STATISTICS_SERVICE=sqshq/piggymetrics-statistics-service
- docker build -t $STATISTICS_SERVICE:$COMMIT ./statistics-service
- docker tag $STATISTICS_SERVICE:$COMMIT $STATISTICS_SERVICE:$TAG
- docker push $STATISTICS_SERVICE
# NOTIFICATION_SERVICE
- export NOTIFICATION_SERVICE=sqshq/piggymetrics-notification-service
- docker build -t $NOTIFICATION_SERVICE:$COMMIT ./notification-service
- docker tag $NOTIFICATION_SERVICE:$COMMIT $NOTIFICATION_SERVICE:$TAG
- docker push $NOTIFICATION_SERVICE
# MONITORING
- export MONITORING=sqshq/piggymetrics-monitoring
- docker build -t $MONITORING:$COMMIT ./monitoring
- docker tag $MONITORING:$COMMIT $MONITORING:$TAG
- docker push $MONITORING
# TURBINE STREAM SERVICE
- export TURBINE=sqshq/piggymetrics-turbine-stream-service
- docker build -t $TURBINE:$COMMIT ./turbine-stream-service
- docker tag $TURBINE:$COMMIT $TURBINE:$TAG
- docker push $TURBINE
# MONGO DB
- export MONGO_DB=sqshq/piggymetrics-mongodb
- docker build -t $MONGO_DB:$COMMIT ./mongodb
- docker tag $MONGO_DB:$COMMIT $MONGO_DB:$TAG
- docker push $MONGO_DB