-
-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathconfig.yml.disabled
More file actions
277 lines (237 loc) · 7.87 KB
/
config.yml.disabled
File metadata and controls
277 lines (237 loc) · 7.87 KB
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# Java Gradle CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2.1
aliases:
attach_workspace: &attach_workspace
attach_workspace:
at: .
environment: &environment
environment:
SPRING_BOOT_VERSION: 2.2.0.RELEASE
SPRING_VERSION: 5.2.0.RELEASE
SPRING_DATA_VERSION: 2.2.0.RELEASE
MICROMETER_VERSION: 1.3.2
RQUEUE_REACTIVE_ENABLED: "false"
environment_v0: &environment_v0
environment:
SPRING_BOOT_VERSION: 2.0.6.RELEASE
SPRING_VERSION: 5.0.10.RELEASE
SPRING_DATA_VERSION: 2.0.6.RELEASE
MICROMETER_VERSION: 1.1.0
RQUEUE_REACTIVE_ENABLED: "false"
reactive_environment: &reactive_environment
environment:
SPRING_BOOT_VERSION: 2.2.0.RELEASE
SPRING_VERSION: 5.2.0.RELEASE
SPRING_DATA_VERSION: 2.2.0.RELEASE
MICROMETER_VERSION: 1.3.2
RQUEUE_REACTIVE_ENABLED: "true"
persist_to_workspace: &persist_to_workspace
persist_to_workspace:
root: .
paths:
- .
redis_dep: &redis_dep
run:
name: Install Dependencies
command: |
sudo apt -y install redis-server
redis-cli --version
redis_cluster_setup: &redis_cluster_setup
run:
name: Setup Redis Cluster
background: true
command: |
mkdir 9000 9001 9002 9003 9004 9005
printf "port 9000 \ncluster-enabled yes \ncluster-config-file nodes.conf \ncluster-node-timeout 5000 \nappendonly yes" >> 9000/redis.conf
printf "port 9001 \ncluster-enabled yes \ncluster-config-file nodes.conf \ncluster-node-timeout 5000 \nappendonly yes" >> 9001/redis.conf
printf "port 9002 \ncluster-enabled yes \ncluster-config-file nodes.conf \ncluster-node-timeout 5000 \nappendonly yes" >> 9002/redis.conf
printf "port 9003 \ncluster-enabled yes \ncluster-config-file nodes.conf \ncluster-node-timeout 5000 \nappendonly yes" >> 9003/redis.conf
printf "port 9004 \ncluster-enabled yes \ncluster-config-file nodes.conf \ncluster-node-timeout 5000 \nappendonly yes" >> 9004/redis.conf
printf "port 9005 \ncluster-enabled yes \ncluster-config-file nodes.conf \ncluster-node-timeout 5000 \nappendonly yes" >> 9005/redis.conf
cd 9000 && redis-server ./redis.conf &
cd 9001 && redis-server ./redis.conf &
cd 9002 && redis-server ./redis.conf &
cd 9003 && redis-server ./redis.conf &
cd 9004 && redis-server ./redis.conf &
cd 9005 && redis-server ./redis.conf &
sleep 30
redis-cli --cluster create 127.0.0.1:9000 127.0.0.1:9001 127.0.0.1:9002 127.0.0.1:9003 127.0.0.1:9004 127.0.0.1:9005 --cluster-replicas 1 --cluster-yes
copy_logs: ©_logs
run:
name: Copy Log Files
when: always
command: |
mkdir log || true
test -f rqueue-core/log/monitor.log && cp rqueue-core/log/monitor.log log/core-monitor.log
test -f rqueue-core/log/test.log && cp rqueue-core/log/test.log log/core-test.log
test -f rqueue-spring-boot-starter/log/monitor.log && cp rqueue-spring-boot-starter/log/monitor.log log/boot-monitor.log
test -f rqueue-spring-boot-starter/log/test.log && cp rqueue-spring-boot-starter/log/test.log log/boot-test.log
test -f rqueue-spring/log/monitor.log && cp rqueue-spring/log/monitor.log log/spring-monitor.log
test -f rqueue-spring/log/test.log && cp rqueue-spring/log/test.log log/spring-test.log
copy_test_results: ©_test_results
run:
name: Copy Test Result Files
when: always
command: |
mkdir test-results || true
test -d rqueue-spring-boot-starter/build/reports/junit/xml && cp -r rqueue-spring-boot-starter/build/reports/junit/xml test-results
test -d rqueue-spring/build/reports/junit/xml && cp -r rqueue-spring/build/reports/junit/xml test-results
test -d rqueue-core/build/reports/junit/xml && cp -r rqueue-core/build/reports/junit/xml test-results
store_logs: &store_logs
store_artifacts:
path: log/
store_test_results: &store_test_results
store_test_results:
path: test-results
default: &default
executor: rqueue-executor
<<: *environment
default_v0: &default_vo
executor: rqueue-executor
<<: *environment_v0
reactive: &reactive
executor: rqueue-executor
<<: *reactive_environment
executors:
rqueue-executor:
machine:
image: ubuntu-2204:2022.10.2
resource_class: large
working_directory: ~/repo
environment:
# Customize the JVM maximum heap limit
JVM_OPTS: -Xmx6400m
TERM: dumb
ORG_GRADLE_PROJECT_mavenCentralUsername: xxx
ORG_GRADLE_PROJECT_mavenCentralPassword: xxx
USER_NAME: rqueue
REDIS_RUNNING: "true"
build_steps: &build_steps
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: ./gradlew dependencies
- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}
- run: ./gradlew compileJava
- run: ./gradlew compileTestJava
- *persist_to_workspace
unit_test_steps: &unit_test_steps
steps:
- *attach_workspace
- run: ./gradlew codeCoverageReport -DincludeTags=unit
- *persist_to_workspace
- *copy_logs
- *copy_test_results
- *store_logs
- *store_test_results
producer_test_steps: &producer_test_steps
steps:
- *attach_workspace
- *redis_dep
- run: ./gradlew codeCoverageReport -DincludeTags=producerOnly
- *persist_to_workspace
- *copy_logs
- *copy_test_results
- *store_logs
- *store_test_results
integration_test_steps: &integration_test_steps
steps:
- *attach_workspace
- *redis_dep
- run: ./gradlew codeCoverageReport -DincludeTags=integration -DexcludeTags=redisCluster,producerOnly,local
- *persist_to_workspace
- *copy_logs
- *copy_test_results
- *store_logs
- *store_test_results
redis_custer_test_steps: &redis_cluster_test_steps
steps:
- *attach_workspace
- *redis_dep
- *redis_cluster_setup
- run: ./gradlew codeCoverageReport -DincludeTags=redisCluster
- *persist_to_workspace
- *copy_logs
- *copy_test_results
- *store_logs
- *store_test_results
report_code_coverage_steps: &report_code_coverage_steps
steps:
- *attach_workspace
- run: ./gradlew coveralls
- *copy_logs
- *copy_test_results
- *store_logs
- *store_test_results
jobs:
build:
<<: *default
<<: *build_steps
build_v0:
<<: *default_vo
<<: *build_steps
unit_test:
<<: *default
<<: *unit_test_steps
unit_test_v0:
<<: *default_vo
<<: *unit_test_steps
producer_only_test:
<<: *default
<<: *producer_test_steps
producer_only_test_v0:
<<: *default_vo
<<: *producer_test_steps
integration_test:
<<: *default
<<: *integration_test_steps
reactive_integration_test:
<<: *reactive
<<: *integration_test_steps
integration_test_v0:
<<: *default_vo
<<: *integration_test_steps
redis_custer_test:
<<: *default
<<: *redis_cluster_test_steps
redis_custer_test_v0:
<<: *default_vo
<<: *redis_cluster_test_steps
report_code_coverage:
<<: *default
<<: *report_code_coverage_steps
report_code_coverage_v0:
<<: *default_vo
<<: *report_code_coverage_steps
workflows:
main:
jobs:
- build
- unit_test:
requires:
- build
- producer_only_test:
requires:
- unit_test
- integration_test:
requires:
- producer_only_test
- redis_custer_test:
requires:
- integration_test
- reactive_integration_test:
requires:
- redis_custer_test
- report_code_coverage:
requires:
- reactive_integration_test