mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 06:50:40 +02:00
ci(e2e): switch FUSE Mount build to Azure Ubuntu mirror, persist buildx cache
archive.ubuntu.com from GitHub-hosted runners has been Ign:/retrying for ~60s per package, eating the Start SeaweedFS step's 10-min budget before apt-get install finishes. The host already uses azure.archive.ubuntu.com; do the same inside Dockerfile.e2e and drop the Retries=5 amplifier. Also rotate /tmp/.buildx-cache-new over /tmp/.buildx-cache so the apt layer actually survives across runs, and bump the step to 15 minutes as a safety margin.
This commit is contained in:
1 parent
4ded97a321
commit
22ebe9feb0
2 files changed
+16
-6
No files matched your search
@@ -57,12 +57,12 @@ jobs:
|
|||||||
echo "FUSE device: $(ls -la /dev/fuse 2>&1 || echo '/dev/fuse not found')"
|
echo "FUSE device: $(ls -la /dev/fuse 2>&1 || echo '/dev/fuse not found')"
|
||||||
|
|
||||||
- name: Start SeaweedFS
|
- name: Start SeaweedFS
|
||||||
timeout-minutes: 10
|
timeout-minutes: 15
|
||||||
run: |
|
run: |
|
||||||
# Enable Docker buildkit for better caching
|
# Enable Docker buildkit for better caching
|
||||||
export DOCKER_BUILDKIT=1
|
export DOCKER_BUILDKIT=1
|
||||||
export COMPOSE_DOCKER_CLI_BUILD=1
|
export COMPOSE_DOCKER_CLI_BUILD=1
|
||||||
|
|
||||||
# Build with retry logic
|
# Build with retry logic
|
||||||
for i in {1..3}; do
|
for i in {1..3}; do
|
||||||
echo "Build attempt $i/3"
|
echo "Build attempt $i/3"
|
||||||
@@ -77,10 +77,18 @@ jobs:
|
|||||||
sleep 30
|
sleep 30
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Start services with wait
|
# Start services with wait
|
||||||
docker compose -f ./compose/e2e-mount.yml up --wait
|
docker compose -f ./compose/e2e-mount.yml up --wait
|
||||||
|
|
||||||
|
- name: Rotate buildx cache
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# Without this, --cache-to writes to .buildx-cache-new but actions/cache only
|
||||||
|
# uploads .buildx-cache, so layers (notably the slow apt RUN) never persist.
|
||||||
|
rm -rf /tmp/.buildx-cache
|
||||||
|
if [ -d /tmp/.buildx-cache-new ]; then mv /tmp/.buildx-cache-new /tmp/.buildx-cache; fi
|
||||||
|
|
||||||
- name: Run FIO 4k
|
- name: Run FIO 4k
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -2,13 +2,15 @@ FROM ubuntu:22.04
|
|||||||
|
|
||||||
LABEL author="Chris Lu"
|
LABEL author="Chris Lu"
|
||||||
|
|
||||||
# Use faster mirrors and optimize package installation
|
# Use Azure's Ubuntu mirror — much faster than archive.ubuntu.com from GitHub-hosted runners,
|
||||||
|
# which have been hanging long enough on Ign:/retry to trip the 10-min step timeout.
|
||||||
# Note: This e2e test image intentionally runs as root for simplicity and compatibility.
|
# Note: This e2e test image intentionally runs as root for simplicity and compatibility.
|
||||||
# Production images (Dockerfile.go_build) use proper user isolation with su-exec.
|
# Production images (Dockerfile.go_build) use proper user isolation with su-exec.
|
||||||
# For testing purposes, running as root avoids permission complexities and dependency
|
# For testing purposes, running as root avoids permission complexities and dependency
|
||||||
# on Alpine-specific tools like su-exec (not available in Ubuntu repos).
|
# on Alpine-specific tools like su-exec (not available in Ubuntu repos).
|
||||||
RUN apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=30 update && \
|
RUN sed -i 's|http://archive.ubuntu.com/ubuntu|http://azure.archive.ubuntu.com/ubuntu|g; s|http://security.ubuntu.com/ubuntu|http://azure.archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=30 install -y \
|
apt-get -o Acquire::http::Timeout=15 update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::http::Timeout=15 install -y \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
--no-install-suggests \
|
--no-install-suggests \
|
||||||
curl \
|
curl \
|
||||||
|
|||||||
Reference in new issue
Block a user