fix(ci): retry frontend buildx build on EOF failures
This commit is contained in:
parent
6a5cd11b2f
commit
9a21b7859f
1 changed files with 23 additions and 5 deletions
|
|
@ -39,8 +39,26 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
export DOCKER_HOST=unix:///var/run/docker.sock
|
export DOCKER_HOST=unix:///var/run/docker.sock
|
||||||
docker buildx build --push \
|
|
||||||
-f Dockerfile \
|
build_and_push() {
|
||||||
-t "$REGISTRY_HOSTPORT/nxtgauge-frontend-solid:${{ gitea.sha }}" \
|
docker buildx build --push \
|
||||||
-t "$REGISTRY_HOSTPORT/nxtgauge-frontend-solid:high-performance-latest" \
|
-f Dockerfile \
|
||||||
.
|
-t "$REGISTRY_HOSTPORT/nxtgauge-frontend-solid:${{ gitea.sha }}" \
|
||||||
|
-t "$REGISTRY_HOSTPORT/nxtgauge-frontend-solid:high-performance-latest" \
|
||||||
|
.
|
||||||
|
}
|
||||||
|
|
||||||
|
for attempt in 1 2 3; do
|
||||||
|
echo "Build attempt $attempt"
|
||||||
|
if build_and_push; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Build attempt $attempt failed; recreating builder and retrying"
|
||||||
|
docker buildx rm --all-inactive --force || true
|
||||||
|
docker buildx create --use || true
|
||||||
|
docker buildx inspect --bootstrap
|
||||||
|
sleep $((attempt * 10))
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Build failed after retries"
|
||||||
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue