72
72
--retry-max-time 120 \
73
73
'http://localhost:9000/minio/health/live'
74
74
75
+ - name : Setup redis service
76
+ run : |
77
+ docker run -d -p 6379:6379 --name redis \
78
+ --health-cmd "redis-cli ping" \
79
+ --health-interval 10s \
80
+ --health-timeout 5s \
81
+ --health-retries 5 \
82
+ redis:7.4.2
83
+
75
84
- name : Create minio bucket
76
85
run : |
77
86
python3 - <<'EOF'
@@ -101,12 +110,15 @@ jobs:
101
110
cp test/cluster/config-minio.json test/cluster/config-minio1.json
102
111
sed -i 's/8081/8081/g' test/cluster/config-minio1.json
103
112
sed -i 's/\/tmp\/zot/\/tmp\/zot1/g' test/cluster/config-minio1.json
113
+ sed -i 's/\/dev\/null/\/tmp\/zot1.log/g' test/cluster/config-minio1.json
104
114
cp test/cluster/config-minio.json test/cluster/config-minio2.json
105
115
sed -i 's/8081/8082/g' test/cluster/config-minio2.json
106
116
sed -i 's/\/tmp\/zot/\/tmp\/zot2/g' test/cluster/config-minio2.json
117
+ sed -i 's/\/dev\/null/\/tmp\/zot2.log/g' test/cluster/config-minio2.json
107
118
cp test/cluster/config-minio.json test/cluster/config-minio3.json
108
119
sed -i 's/8081/8083/g' test/cluster/config-minio3.json
109
120
sed -i 's/\/tmp\/zot/\/tmp\/zot3/g' test/cluster/config-minio3.json
121
+ sed -i 's/\/dev\/null/\/tmp\/zot3.log/g' test/cluster/config-minio3.json
110
122
111
123
- name : Free up disk space
112
124
uses : jlumbroso/free-disk-space@main
@@ -126,6 +138,12 @@ jobs:
126
138
./bin/zot-linux-amd64 serve test/cluster/config-minio2.json &
127
139
./bin/zot-linux-amd64 serve test/cluster/config-minio3.json &
128
140
sleep 20
141
+
142
+ # ensure the instances are online
143
+ curl --connect-timeout 3 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 --retry-connrefused http://localhost:8081/v2/
144
+ curl --connect-timeout 3 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 --retry-connrefused http://localhost:8082/v2/
145
+ curl --connect-timeout 3 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 --retry-connrefused http://localhost:8082/v2/
146
+
129
147
# run tests
130
148
skopeo --debug copy --format=oci --dest-tls-verify=false docker://ghcr.io/project-zot/golang:1.20 docker://localhost:8080/golang:1.20
131
149
skopeo --debug copy --src-tls-verify=false docker://localhost:8080/golang:1.20 oci:golang:1.20
@@ -139,46 +157,102 @@ jobs:
139
157
oras pull --plain-http localhost:8080/hello-artifact:v2 -d -v
140
158
grep -q "hello world" artifact.txt # should print "hello world"
141
159
if [ $? -ne 0 ]; then \
142
- killall -r zot-*; \
160
+ killall --wait - r zot-*; \
143
161
exit 1; \
144
162
fi
145
163
146
- killall -r zot-*
164
+ killall --wait -r zot-*
165
+
166
+ # archive logs
167
+ zip logs-push-pull.zip /tmp/*.log -r
168
+
169
+ # clean zot storage
170
+ sudo rm -rf /tmp/data/zot-storage/zot
171
+ # clean zot cache and metadb
172
+ docker exec redis redis-cli FLUSHDB
173
+ # clean zot logs
174
+ rm /tmp/*.log
147
175
env :
148
176
AWS_ACCESS_KEY_ID : minioadmin
149
177
AWS_SECRET_ACCESS_KEY : minioadmin
150
178
179
+ - name : Upload zot logs for push-pull tests
180
+ uses : actions/upload-artifact@v4
181
+ if : always()
182
+ with :
183
+ name : logs-push-pull.zip
184
+ path : logs-push-pull.zip
185
+ if-no-files-found : error
186
+
151
187
- name : Run benchmark with --src-cidr arg
152
188
run : |
153
189
./bin/zot-linux-amd64 serve test/cluster/config-minio1.json &
154
190
./bin/zot-linux-amd64 serve test/cluster/config-minio2.json &
155
191
./bin/zot-linux-amd64 serve test/cluster/config-minio3.json &
156
192
sleep 20
193
+
194
+ # ensure the instances are online
195
+ curl --connect-timeout 3 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 --retry-connrefused http://localhost:8081/v2/
196
+ curl --connect-timeout 3 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 --retry-connrefused http://localhost:8082/v2/
197
+ curl --connect-timeout 3 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 --retry-connrefused http://localhost:8082/v2/
198
+
157
199
# run zb with --src-cidr
158
200
bin/zb-linux-amd64 -c 10 -n 50 -o ci-cd --src-cidr 127.0.0.0/8 http://localhost:8080
159
201
160
- killall -r zot-*
202
+ killall --wait -r zot-*
203
+
204
+ # archive logs
205
+ zip logs-src-cidr.zip /tmp/*.log -r
161
206
162
207
# clean zot storage
163
208
sudo rm -rf /tmp/data/zot-storage/zot
209
+ # clean zot cache and metadb
210
+ docker exec redis redis-cli FLUSHDB
211
+ # clean zot logs
212
+ rm /tmp/*.log
164
213
env :
165
214
AWS_ACCESS_KEY_ID : minioadmin
166
215
AWS_SECRET_ACCESS_KEY : minioadmin
167
216
217
+ - name : Upload zot logs for cidr tests
218
+ uses : actions/upload-artifact@v4
219
+ if : always()
220
+ with :
221
+ name : logs-src-cidr.zip
222
+ path : logs-src-cidr.zip
223
+ if-no-files-found : error
224
+
168
225
- name : Run benchmark with --src-ips arg
169
226
run : |
170
227
./bin/zot-linux-amd64 serve test/cluster/config-minio1.json &
171
228
./bin/zot-linux-amd64 serve test/cluster/config-minio2.json &
172
229
./bin/zot-linux-amd64 serve test/cluster/config-minio3.json &
173
230
sleep 20
231
+
232
+ # ensure the instances are online
233
+ curl --connect-timeout 3 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 --retry-connrefused http://localhost:8081/v2/
234
+ curl --connect-timeout 3 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 --retry-connrefused http://localhost:8082/v2/
235
+ curl --connect-timeout 3 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 --retry-connrefused http://localhost:8082/v2/
236
+
174
237
# run zb with --src-ips
175
238
bin/zb-linux-amd64 -c 10 -n 50 -o ci-cd --src-ips 127.0.0.2,127.0.0.3,127.0.0.4,127.0.0.5,127.0.0.6,127.0.12.5,127.0.12.6 http://localhost:8080
176
239
177
- killall -r zot-*
240
+ killall --wait -r zot-*
241
+
242
+ # archive logs
243
+ zip logs-src-ips.zip /tmp/*.log -r
178
244
env :
179
245
AWS_ACCESS_KEY_ID : minioadmin
180
246
AWS_SECRET_ACCESS_KEY : minioadmin
181
247
248
+ - name : Upload zot logs for src-ips tests
249
+ uses : actions/upload-artifact@v4
250
+ if : always()
251
+ with :
252
+ name : logs-src-ips.zip
253
+ path : logs-src-ips.zip
254
+ if-no-files-found : error
255
+
182
256
# Download previous benchmark result from cache (if exists)
183
257
- name : Download previous benchmark data
184
258
uses : actions/cache@v4
0 commit comments