forked from callistaenterprise/blog-microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
81 lines (73 loc) · 4.64 KB
/
circle.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
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
java:
version: oraclejdk8
services:
- docker
dependencies:
pre:
- sudo pip install docker-compose
post:
# gradle clean build + docker-compose build...
- docker-compose -version
- docker version
- docker info
- ./build-all.sh
# According to https://circleci.com/docs/test-metadata
test:
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
# - docker build -t magnuslarsson/ms-blog-auth-server microservices/support/auth-server/build
# - docker build -t magnuslarsson/ms-blog-config-server microservices/support/config-server/build
# - docker build -t magnuslarsson/ms-blog-discovery-server microservices/support/discovery-server/build
# - docker build -t magnuslarsson/ms-blog-edge-server microservices/support/edge-server/build
# - docker build -t magnuslarsson/ms-blog-monitor-dashboard microservices/support/monitor-dashboard/build
# - docker build -t magnuslarsson/ms-blog-turbine microservices/support/turbine/build
# - docker build -t magnuslarsson/ms-blog-product-service microservices/core/product-service/build
# - docker build -t magnuslarsson/ms-blog-recommendation-service microservices/core/recommendation-service/build
# - docker build -t magnuslarsson/ms-blog-review-service microservices/core/review-service/build
# - docker build -t magnuslarsson/ms-blog-product-composite-service microservices/composite/product-composite-service/build
- docker images
# - host=localhost ./test-all.sh
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PWD
# Push latest
# - docker push magnuslarsson/ms-blog-auth-server
# - docker push magnuslarsson/ms-blog-config-server
# - docker push magnuslarsson/ms-blog-discovery-server
# - docker push magnuslarsson/ms-blog-edge-server
# - docker push magnuslarsson/ms-blog-monitor-dashboard
# - docker push magnuslarsson/ms-blog-turbine
#
# - docker push magnuslarsson/ms-blog-product-service
# - docker push magnuslarsson/ms-blog-recommendation-service
# - docker push magnuslarsson/ms-blog-review-service
# - docker push magnuslarsson/ms-blog-product-composite-service
# Create builds tag "master.$CIRCLE_BUILD_NUM" and push it
- docker tag blogmicroservices_auth magnuslarsson/ms-blog-auth-server:master.$CIRCLE_BUILD_NUM
- docker tag blogmicroservices_config magnuslarsson/ms-blog-config-server:master.$CIRCLE_BUILD_NUM
- docker tag blogmicroservices_discovery magnuslarsson/ms-blog-discovery-server:master.$CIRCLE_BUILD_NUM
- docker tag blogmicroservices_edge magnuslarsson/ms-blog-edge-server:master.$CIRCLE_BUILD_NUM
- docker tag blogmicroservices_monitor magnuslarsson/ms-blog-monitor-dashboard:master.$CIRCLE_BUILD_NUM
- docker tag blogmicroservices_zipkin magnuslarsson/ms-blog-zipkin-server:master.$CIRCLE_BUILD_NUM
# - docker tag magnuslarsson/ms-blog-turbine magnuslarsson/ms-blog-turbine:master.$CIRCLE_BUILD_NUM
- docker tag blogmicroservices_pro magnuslarsson/ms-blog-product-service:master.$CIRCLE_BUILD_NUM
- docker tag blogmicroservices_rec magnuslarsson/ms-blog-recommendation-service:master.$CIRCLE_BUILD_NUM
- docker tag blogmicroservices_rev magnuslarsson/ms-blog-review-service:master.$CIRCLE_BUILD_NUM
- docker tag blogmicroservices_composite magnuslarsson/ms-blog-product-composite-service:master.$CIRCLE_BUILD_NUM
- docker push magnuslarsson/ms-blog-auth-server:master.$CIRCLE_BUILD_NUM
- docker push magnuslarsson/ms-blog-config-server:master.$CIRCLE_BUILD_NUM
- docker push magnuslarsson/ms-blog-discovery-server:master.$CIRCLE_BUILD_NUM
- docker push magnuslarsson/ms-blog-edge-server:master.$CIRCLE_BUILD_NUM
- docker push magnuslarsson/ms-blog-monitor-dashboard:master.$CIRCLE_BUILD_NUM
- docker push magnuslarsson/ms-blog-zipkin-server:master.$CIRCLE_BUILD_NUM
# - docker push magnuslarsson/ms-blog-turbine:master.$CIRCLE_BUILD_NUM
- docker push magnuslarsson/ms-blog-product-service:master.$CIRCLE_BUILD_NUM
- docker push magnuslarsson/ms-blog-recommendation-service:master.$CIRCLE_BUILD_NUM
- docker push magnuslarsson/ms-blog-review-service:master.$CIRCLE_BUILD_NUM
- docker push magnuslarsson/ms-blog-product-composite-service:master.$CIRCLE_BUILD_NUM