77 - master
88
99jobs :
10- sanity-check :
11- runs-on : ubuntu-latest
10+
11+ sanity-check-matrix :
12+ strategy :
13+ fail-fast : false # let other jobs try to complete if one fails
14+ matrix :
15+ include :
16+ - { id: "default-amd64", extraDockerOpts: "-e ENABLE_MANIFEST_CACHE=false", runner: "ubuntu-22.04" }
17+ - { id: "default-arm64", extraDockerOpts: "-e ENABLE_MANIFEST_CACHE=false", runner: "ubuntu-22.04-arm" }
18+
19+
20+ runs-on : " ${{ matrix.runner }}"
21+ name : " ${{ matrix.id }} (${{ matrix.extraDockerOpts }})"
1222 steps :
1323
24+ - name : Install pipetty and ccze
25+ run : |
26+ sudo apt-get install -y colorized-logs ccze
27+
1428 - name : Get machine's first IPv4 address for eth0
1529 id : ip
1630 run : |
@@ -23,12 +37,11 @@ jobs:
2337 - name : Checkout
2438 uses : actions/checkout@v4
2539
26- # We use buildx instead of regular build so we can take advantage of Docker layer cache via Github Actions' cache
2740 - name : Set up Docker Buildx
2841 id : buildx
2942 uses : docker/setup-buildx-action@v3
3043
31- - name : Build amd64 release image locally to Docker
44+ - name : Build image locally to Docker
3245 uses : docker/build-push-action@v6
3346 with :
3447 build-args : |
@@ -37,15 +50,14 @@ jobs:
3750 builder : ${{ steps.buildx.outputs.name }}
3851 context : .
3952 file : ./Dockerfile
40- platforms : linux/amd64
4153 tags : sanity-check/docker-registry-proxy:latest
4254 push : false
4355 load : true
4456
4557 - name : Start foreground instance for first-contact sanity checking
4658 run : |
47- timeout --signal=9 --verbose 10 docker run --name docker_registry_proxy_fg \
48- -e ENABLE_MANIFEST_CACHE=false \
59+ timeout --signal=9 --verbose 10 docker run \
60+ --name docker_registry_proxy_fg ${{ matrix.extraDockerOpts }} \
4961 sanity-check/docker-registry-proxy:latest || true
5062 sleep 3
5163 docker stop docker_registry_proxy_fg || true
5466 - name : Start proxy instance in docker (ENABLE_MANIFEST_CACHE=false)
5567 run : |
5668 docker run -d --rm --name docker_registry_proxy \
57- -p 0.0.0.0:3128:3128 -e ENABLE_MANIFEST_CACHE=false \
69+ -p 0.0.0.0:3128:3128 ${{ matrix.extraDockerOpts }} \
5870 -v $(pwd)/docker_mirror_cache:/docker_mirror_cache \
5971 -v $(pwd)/docker_mirror_certs:/ca \
6072 sanity-check/docker-registry-proxy:latest
6577 sleep 10
6678 docker logs docker_registry_proxy > initial_logs.txt
6779
68- - name : Upload artifact initial_logs
69- uses : actions/upload-artifact@v4
70- with :
71- name : initial_logs
72- path : initial_logs.txt
80+ - name : " LOG: initial_logs.txt"
81+ run : pipetty ccze -A < initial_logs.txt
7382
7483 - name : Wait for container to be up
7584 timeout-minutes : 1
@@ -113,10 +122,10 @@ jobs:
113122 run : |
114123 sudo systemctl restart docker.service
115124
116- - name : Start proxy instance in docker again (ENABLE_MANIFEST_CACHE=true)
125+ - name : Start proxy instance in docker again
117126 run : |
118127 docker run -d --rm --name docker_registry_proxy \
119- -p 0.0.0.0:3128:3128 -e ENABLE_MANIFEST_CACHE=true \
128+ -p 0.0.0.0:3128:3128 ${{ matrix.extraDockerOpts }} \
120129 -v $(pwd)/docker_mirror_cache:/docker_mirror_cache \
121130 -v $(pwd)/docker_mirror_certs:/ca \
122131 sanity-check/docker-registry-proxy:latest
@@ -148,11 +157,8 @@ jobs:
148157 run : |
149158 docker logs docker_registry_proxy > cold_cache.txt
150159
151- - name : Upload artifact cold_cache
152- uses : actions/upload-artifact@v4
153- with :
154- name : cold_cache
155- path : cold_cache.txt
160+ - name : " LOG: cold_cache.txt"
161+ run : pipetty ccze -A < cold_cache.txt
156162
157163 - name : prune all unused images from docker cache again
158164 timeout-minutes : 1
@@ -173,9 +179,6 @@ jobs:
173179 run : |
174180 docker logs docker_registry_proxy > warm_cache.txt
175181
176- - name : Upload artifact warm_cache
177- uses : actions/upload-artifact@v4
178- with :
179- name : warm_cache
180- path : warm_cache.txt
182+ - name : " LOG: warm_cache.txt"
183+ run : pipetty ccze -A < warm_cache.txt
181184
0 commit comments