From d825f8ac8128a1daae7dfee63caad7bfb1ce2f0e Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sat, 12 Sep 2026 01:03:59 +1000 Subject: [PATCH] ci: keep the package cache off the workspace volume 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 --- .woodpecker/ci.yaml | 67 ++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 41 deletions(-) diff --git a/.woodpecker/ci.yaml b/.woodpecker/ci.yaml index 4716b43f58..f523258e10 100644 --- a/.woodpecker/ci.yaml +++ b/.woodpecker/ci.yaml @@ -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