ci: clear stale qBittorrent container in e2e
ci / web (pull_request) Successful in 23s
e2e / e2e (pull_request) Failing after 1m18s
ci / rust (pull_request) Successful in 1m30s
ci / image (pull_request) Skipped

The e2e job never removed its fixed-name qBittorrent container, so every
run since late August failed on the name conflict. Remove a leftover
first, tear down on any outcome, and serialise runs. The config is now
copied in rather than bind-mounted, since the bind path is resolved on
the runner host, not in the job container.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Miguel Palhas
2026-11-10 22:05:39 +00:00
co-authored by Claude Opus 5.5
parent 15f4b4a7cb
commit 4bfd3ba7ad
+23 -3
View File
@@ -18,6 +18,12 @@ on:
- 'crates/arr-daemon/**'
- '.gitea/workflows/e2e.yml'
# The qBittorrent container below has a fixed name and binds the runner host's
# port 8080, so two runs at once would trip over each other.
concurrency:
group: arr-e2e
cancel-in-progress: false
env:
CARGO_TERM_COLOR: always
CARGO_PROFILE_DEV_DEBUG: "0"
@@ -77,7 +83,13 @@ jobs:
# variable for the WebUI password and prints a random one per boot,
# so the only scriptable login is a config seeded before first start,
# which a service container cannot be given.
#
# `docker` here talks to the runner host's daemon, so a bind mount
# would name a host path this job never wrote. The config is copied
# in instead. A container left by a run that died before teardown is
# removed first; the name is fixed, so it would block every run after.
run: |
docker rm -f arr-e2e-qbittorrent >/dev/null 2>&1 || true
mkdir -p /tmp/qbt/config/qBittorrent
cat > /tmp/qbt/config/qBittorrent/qBittorrent.conf <<'CONF'
[Preferences]
@@ -88,14 +100,18 @@ jobs:
WebUI\HostHeaderValidation=false
Downloads\SavePath=/downloads
CONF
docker run -d --name arr-e2e-qbittorrent --network host \
docker create --name arr-e2e-qbittorrent --network host \
-e PUID=1000 -e PGID=1000 -e WEBUI_PORT=8080 \
-v /tmp/qbt/config:/config \
linuxserver/qbittorrent:latest
docker cp /tmp/qbt/config/. arr-e2e-qbittorrent:/config/
docker start arr-e2e-qbittorrent
for _ in $(seq 1 60); do
curl -sf http://127.0.0.1:8080/api/v2/app/version && break
curl -sf http://127.0.0.1:8080/api/v2/app/version && exit 0
sleep 2
done
echo "qBittorrent never answered" >&2
docker logs arr-e2e-qbittorrent >&2 || true
exit 1
- name: build daemon
# The harness spawns this binary; building it here keeps the compile
@@ -107,3 +123,7 @@ jobs:
env:
QBITTORRENT_URL: http://127.0.0.1:8080
run: cargo nextest run -p arr-e2e
- name: stop qBittorrent
if: always()
run: docker rm -f arr-e2e-qbittorrent >/dev/null 2>&1 || true