-
Notifications
You must be signed in to change notification settings - Fork 141
175 lines (163 loc) · 6.91 KB
/
development.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Development
on:
push:
branches-ignore:
- master
- main
jobs:
test_default:
name: Test default TeaStore
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- run: |
mvn clean install
cd tools/ && ./build_docker.sh && cd ..
sed -i 's/descartesresearch\///g' examples/docker/docker-compose_default.yaml
docker-compose -f examples/docker/docker-compose_default.yaml up -d
echo "Waiting 2 minutes for TeaStore to start." ; sleep 120
./tools/test_webui.sh localhost http 8080
docker-compose -f examples/docker/docker-compose_default.yaml down
test_https:
name: Test HTTPS TeaStore
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- run: |
mvn clean install
cd tools/ && ./build_docker.sh && cd ..
sed -i 's/descartesresearch\///g' examples/docker/docker-compose_https.yaml
docker-compose -f examples/docker/docker-compose_https.yaml up -d
echo "Waiting 2 minutes for TeaStore to start." ; sleep 120
./tools/test_webui.sh localhost https 8443
docker-compose -f examples/docker/docker-compose_https.yaml down
test_kieker:
name: Test TeaStore with Kieker monitoring
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- run: |
mvn clean install
cd tools/ && ./build_docker.sh && cd ..
sed -i 's/descartesresearch\///g' examples/docker/docker-compose_kieker.yaml
sed -i 's/descartesresearch\///g' examples/docker/docker-compose_rabbitmq.yaml
docker-compose -f examples/docker/docker-compose_rabbitmq.yaml up -d
echo "Waiting 2 minutes for RabbitMQ to start." ; sleep 120
docker-compose -f examples/docker/docker-compose_kieker.yaml up -d
echo "Waiting 2 minutes for TeaStore to start." ; sleep 120
./tools/test_webui.sh localhost http 8080
./tools/test_kieker.sh localhost 8081
docker-compose -f examples/docker/docker-compose_kieker.yaml down
docker-compose -f examples/docker/docker-compose_rabbitmq.yaml down
cypress-run:
name: Cypress run
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- run: |
mvn clean install
cd tools/ && ./build_docker.sh && cd ..
sed -i 's/descartesresearch\///g' examples/docker/docker-compose_default.yaml
docker-compose -f examples/docker/docker-compose_default.yaml up -d
- name: Cypress run
uses: cypress-io/github-action@v2
with:
working-directory: e2e-tests
wait-on: http://localhost:8080
wait-on-timeout: 120
- name: Cleanup docker
run: docker-compose -f examples/docker/docker-compose_default.yaml down --volumes --remove-orphans
if: ${{ always() }}
build:
name: Build and publish Docker images of TeaStore
runs-on: ubuntu-latest
if: success() && github.ref == 'refs/heads/development'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- run: |
mvn clean install -DskipTests
GIT_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
echo "GIT_BRANCH=${GIT_BRANCH}"
echo "GIT_BRANCH=${GIT_BRANCH}" >> ${GITHUB_ENV}
sed -i "s/teastore-base:latest/teastore-base:${GIT_BRANCH}/g" services/tools.descartes.teastore.auth/Dockerfile
sed -i "s/teastore-base:latest/teastore-base:${GIT_BRANCH}/g" services/tools.descartes.teastore.image/Dockerfile
sed -i "s/teastore-base:latest/teastore-base:${GIT_BRANCH}/g" services/tools.descartes.teastore.persistence/Dockerfile
sed -i "s/teastore-base:latest/teastore-base:${GIT_BRANCH}/g" services/tools.descartes.teastore.recommender/Dockerfile
sed -i "s/teastore-base:latest/teastore-base:${GIT_BRANCH}/g" services/tools.descartes.teastore.registry/Dockerfile
sed -i "s/teastore-base:latest/teastore-base:${GIT_BRANCH}/g" services/tools.descartes.teastore.webui/Dockerfile
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push teastore-base
uses: docker/build-push-action@v2
with:
context: ./utilities/tools.descartes.teastore.dockerbase
push: true
tags: descartesresearch/teastore-base:${{env.GIT_BRANCH}}
- name: Build and push teastore-recommender
uses: docker/build-push-action@v2
with:
context: ./services/tools.descartes.teastore.recommender
push: true
tags: descartesresearch/teastore-recommender:${{env.GIT_BRANCH}}
- name: Build and push teastore-webui
uses: docker/build-push-action@v2
with:
context: ./services/tools.descartes.teastore.webui
push: true
tags: descartesresearch/teastore-webui:${{env.GIT_BRANCH}}
- name: Build and push teastore-image
uses: docker/build-push-action@v2
with:
context: ./services/tools.descartes.teastore.image
push: true
tags: descartesresearch/teastore-image:${{env.GIT_BRANCH}}
- name: Build and push teastore-auth
uses: docker/build-push-action@v2
with:
context: ./services/tools.descartes.teastore.auth
push: true
tags: descartesresearch/teastore-auth:${{env.GIT_BRANCH}}
- name: Build and push teastore-persistence
uses: docker/build-push-action@v2
with:
context: ./services/tools.descartes.teastore.persistence
push: true
tags: descartesresearch/teastore-persistence:${{env.GIT_BRANCH}}
- name: Build and push teastore-registry
uses: docker/build-push-action@v2
with:
context: ./services/tools.descartes.teastore.registry
push: true
tags: descartesresearch/teastore-registry:${{env.GIT_BRANCH}}
- name: Build and push teastore-db
uses: docker/build-push-action@v2
with:
context: ./utilities/tools.descartes.teastore.database
push: true
tags: descartesresearch/teastore-db:${{env.GIT_BRANCH}}
- name: Build and push teastore-kieker-rabbitmq
uses: docker/build-push-action@v2
with:
context: ./utilities/tools.descartes.teastore.kieker.rabbitmq
push: true
tags: descartesresearch/teastore-kieker-rabbitmq:${{env.GIT_BRANCH}}