-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
76 lines (60 loc) · 2.21 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
sudo: required
services:
- docker
language: java
jdk: oraclejdk8
branches:
only:
- master
- 1.0
before_install:
- chmod +x gradlew
script:
- ./gradlew clean build image
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
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_SERVICE=sky233/config-service
- docker build -t $CONFIG_SERVICE ./config-service/build/docker
- docker tag $CONFIG_SERVICE $CONFIG_SERVICE:$TAG
- docker push $CONFIG_SERVICE
# registry-service
- export REGISTRY_SERVICE=sky233/registry-service
- docker build -t $REGISTRY_SERVICE ./registry-service/build/docker
- docker tag $REGISTRY_SERVICE $REGISTRY_SERVICE:$TAG
- docker push $REGISTRY_SERVICE
# gateway-service
- export GATEWAY_SERVICE=sky233/gateway-service
- docker build -t $GATEWAY_SERVICE ./gateway-service/build/docker
- docker tag $GATEWAY_SERVICE $GATEWAY_SERVICE:$TAG
- docker push $GATEWAY_SERVICE
# monitoring-service
- export MONITORING_SERVICE=sky233/monitoring-service
- docker build -t $MONITORING_SERVICE ./monitoring-service/build/docker
- docker tag $MONITORING_SERVICE $MONITORING_SERVICE:$TAG
- docker push $MONITORING_SERVICE
# adminserver
- export ADMIN_SERVER=sky233/adminserver
- docker build -t $ADMIN_SERVER ./adminserver/build/docker
- docker tag $ADMIN_SERVER $ADMIN_SERVER:$TAG
- docker push $ADMIN_SERVER
# users-command-service
- export USER_COMMAND_SERVICE=sky233/users-command-service
- docker build -t $USER_COMMAND_SERVICE ./users-command-service/build/docker
- docker tag $USER_COMMAND_SERVICE $USER_COMMAND_SERVICE:$TAG
- docker push $USER_COMMAND_SERVICE
# users-query-service
- export USER_QUERY_SERVICE=sky233/users-query-service
- docker build -t $USER_QUERY_SERVICE ./users-query-service/build/docker
- docker tag $USER_QUERY_SERVICE $USER_QUERY_SERVICE:$TAG
- docker push $USER_QUERY_SERVICE