@@ -13,10 +13,11 @@ jobs:
1313 fail-fast : false # let other jobs try to complete if one fails
1414 matrix :
1515 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" }
2021
2122 runs-on : " ${{ matrix.runner }}"
2223 name : " ${{ matrix.id }} (${{ matrix.extraDockerOpts }})"
@@ -146,13 +147,17 @@ jobs:
146147 - name : Initial prune of all unused images from docker cache (slow)
147148 timeout-minutes : 2
148149 run : |
149- docker image prune --all --force
150+ time docker image prune --all --force
151+ time sync
150152
151153 - name : First round of pulls
152154 timeout-minutes : 2
153155 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
156161
157162 - name : Get the cold cache logs for the container into a file
158163 run : |
@@ -173,7 +178,8 @@ jobs:
173178 - name : prune all unused images from docker cache again
174179 timeout-minutes : 1
175180 run : |
176- docker image prune --all --force
181+ time docker image prune --all --force
182+ time sync
177183
178184 - name : sleep 2s to allow cache to stale a bit
179185 run : |
@@ -182,12 +188,19 @@ jobs:
182188 - name : Second round of pulls
183189 timeout-minutes : 2
184190 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
187196
188197 - name : Get the warm cache docker logs for the container into a file
189198 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
191204
192205 - name : " LOG: warm_cache.txt"
193206 run : |
0 commit comments