@@ -13,10 +13,11 @@ jobs:
13
13
fail-fast : false # let other jobs try to complete if one fails
14
14
matrix :
15
15
include :
16
- - { id: "default-amd64", extraDockerOpts: "", runner: "ubuntu-22.04" }
17
- - { id: "default-arm64", extraDockerOpts: "", runner: "ubuntu-22.04-arm" }
18
- - { id: "manifest-cache", extraDockerOpts: "-e ENABLE_MANIFEST_CACHE=true", runner: "ubuntu-22.04" }
19
- - { id: "disable-ipv6", extraDockerOpts: "-e DISABLE_IPV6=true", runner: "ubuntu-22.04" }
16
+ - { id: "default-amd64", extraDockerOpts: "", extraImageToPull: "", runner: "ubuntu-22.04" }
17
+ - { id: "default-arm64", extraDockerOpts: "", extraImageToPull: "", runner: "ubuntu-22.04-arm" }
18
+ - { id: "manifest-cache", extraDockerOpts: "-e ENABLE_MANIFEST_CACHE=true", extraImageToPull: "", runner: "ubuntu-22.04" }
19
+ - { id: "disable-ipv6", extraDockerOpts: "-e DISABLE_IPV6=true", extraImageToPull: "", runner: "ubuntu-22.04" }
20
+ - { id: "manifest-noipv6-arm64-ghcr", extraDockerOpts: "-e ENABLE_MANIFEST_CACHE=true -e DISABLE_IPV6=true", extraImageToPull: "ghcr.io/rpardini/ansi-hastebin:0.0.8-node20", runner: "ubuntu-22.04-arm" }
20
21
21
22
runs-on : " ${{ matrix.runner }}"
22
23
name : " ${{ matrix.id }} (${{ matrix.extraDockerOpts }})"
@@ -146,13 +147,17 @@ jobs:
146
147
- name : Initial prune of all unused images from docker cache (slow)
147
148
timeout-minutes : 2
148
149
run : |
149
- docker image prune --all --force
150
+ time docker image prune --all --force
151
+ time sync
150
152
151
153
- name : First round of pulls
152
154
timeout-minutes : 2
153
155
run : |
154
- docker pull alpine:3.20
155
- docker pull registry.k8s.io/pause:3.6
156
+ time docker pull alpine:3.20
157
+ time docker pull registry.k8s.io/pause:3.6
158
+ if [[ "a${{ matrix.extraImageToPull }}" != "a" ]]; then
159
+ time docker pull ${{ matrix.extraImageToPull }}
160
+ fi
156
161
157
162
- name : Get the cold cache logs for the container into a file
158
163
run : |
@@ -173,7 +178,8 @@ jobs:
173
178
- name : prune all unused images from docker cache again
174
179
timeout-minutes : 1
175
180
run : |
176
- docker image prune --all --force
181
+ time docker image prune --all --force
182
+ time sync
177
183
178
184
- name : sleep 2s to allow cache to stale a bit
179
185
run : |
@@ -182,12 +188,19 @@ jobs:
182
188
- name : Second round of pulls
183
189
timeout-minutes : 2
184
190
run : |
185
- docker pull alpine:3.20
186
- docker pull registry.k8s.io/pause:3.6
191
+ time docker pull alpine:3.20
192
+ time docker pull registry.k8s.io/pause:3.6
193
+ if [[ "a${{ matrix.extraImageToPull }}" != "a" ]]; then
194
+ time docker pull ${{ matrix.extraImageToPull }}
195
+ fi
187
196
188
197
- name : Get the warm cache docker logs for the container into a file
189
198
run : |
190
- docker logs docker_registry_proxy &> warm_cache.txt
199
+ docker logs docker_registry_proxy &> warm_cache_all.txt
200
+ # Get a count of lines in cold_cache.txt
201
+ declare -i COLD_CACHE_LINES=$(wc -l < cold_cache.txt)
202
+ # Skip the first COLD_CACHE_LINES lines of warm_cache_all.txt and output warm_cache.txt
203
+ tail -n +$((COLD_CACHE_LINES+1)) warm_cache_all.txt > warm_cache.txt
191
204
192
205
- name : " LOG: warm_cache.txt"
193
206
run : |
0 commit comments