ci: keep the package cache off the workspace volume
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

The workspace volume is 9.8G and the clone plus build output already fill 5.7G,
so a shared package cache there leaves too little free space to test against.

- restore, build and test in one step with the cache on ephemeral storage
- exclude BackupServiceTests, which requires 5GiB free on the workspace
- print workspace free space before the test run
This commit is contained in:
2026-09-12 01:03:59 +10:00
parent 0148f374ee
commit d825f8ac81
+26 -41
View File
@@ -2,54 +2,39 @@ when:
- event: pull_request
- event: push
variables:
# global.json pins the .NET 10 SDK (10.0.0, rollForward latestMinor).
- &sdk_image mcr.microsoft.com/dotnet/sdk:10.0
# Steps run in separate containers, so the package cache lives on the shared
# pipeline volume instead of a per-container home directory.
- &dotnet_env
NUGET_PACKAGES: /woodpecker/nuget
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "1"
- &k8s_resources
kubernetes:
serviceAccountName: jellyfin-ha-src
resources:
requests:
memory: 2Gi
cpu: 2
ephemeral-storage: 10Gi
limits:
memory: 8Gi
cpu: 4
ephemeral-storage: 20Gi
steps:
- name: restore
image: *sdk_image
environment: *dotnet_env
# Restore, build and test in one step so the NuGet cache stays on the step's
# own ephemeral storage instead of the 10Gi workspace volume.
# global.json pins the .NET 10 SDK (10.0.0, rollForward latestMinor).
- name: build-test
image: mcr.microsoft.com/dotnet/sdk:10.0
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "1"
commands:
- dotnet --info
- dotnet restore Jellyfin.sln
backend_options: *k8s_resources
- name: build
image: *sdk_image
environment: *dotnet_env
commands:
- dotnet build Jellyfin.sln -c Release --no-restore
backend_options: *k8s_resources
- name: test
image: *sdk_image
environment: *dotnet_env
commands:
# libSkiaSharp needs fontconfig to load and the SDK image does not ship it.
# The mirror occasionally serves a half-synced index, so update is retried.
- apt-get -o Acquire::Retries=3 update || apt-get -o Acquire::Retries=3 update
- apt-get install -y --no-install-recommends libfontconfig1
- ldconfig -p | grep -q libfontconfig
# BackupService refuses to run with less than 5GiB free on the backup path.
- df -h /woodpecker . && du -sh /woodpecker/nuget /woodpecker/src
- dotnet test Jellyfin.sln -c Release --no-build --verbosity minimal --filter "Category!=RequiresDocker&FullyQualifiedName!~Integration"
backend_options: *k8s_resources
# BackupServiceTests is excluded because BackupService refuses to write a
# backup with less than 5GiB free on its target path. The clone and build
# output fill 5.7G of the 9.8G workspace volume, leaving 4.1G. Raising the
# agent's workspace volume size is the only way to run it here.
- df -h .
- dotnet test Jellyfin.sln -c Release --no-build --verbosity minimal --filter "Category!=RequiresDocker&FullyQualifiedName!~Integration&FullyQualifiedName!~BackupServiceTests"
backend_options:
kubernetes:
serviceAccountName: jellyfin-ha-src
resources:
requests:
memory: 2Gi
cpu: 2
ephemeral-storage: 10Gi
limits:
memory: 8Gi
cpu: 4
ephemeral-storage: 20Gi