From 43b4f143eb186e563da05eef553978d22e97c954 Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sat, 12 Sep 2026 00:24:26 +1000 Subject: [PATCH] ci: split the pipeline into restore, build and test steps A single step reports every failure the same way, so a mirror, compiler or test failure all look identical from the outside. - split restore, build and test into separate named steps - probe the fontconfig package install in its own step - share the NuGet cache through the workspace and raise the memory limit --- .woodpecker/ci.yaml | 62 +++++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/.woodpecker/ci.yaml b/.woodpecker/ci.yaml index 2883fb1049..ac0386561a 100644 --- a/.woodpecker/ci.yaml +++ b/.woodpecker/ci.yaml @@ -2,25 +2,55 @@ 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 in the shared + # workspace instead of the per-container home directory. + - &dotnet_env + NUGET_PACKAGES: ${CI_WORKSPACE}/.nuget + DOTNET_CLI_TELEMETRY_OPTOUT: "1" + DOTNET_NOLOGO: "1" + - &k8s_resources + kubernetes: + serviceAccountName: jellyfin-ha-src + resources: + requests: + memory: 2Gi + cpu: 2 + limits: + memory: 8Gi + cpu: 4 + steps: - # Restore, build and test the full solution. global.json pins the .NET 10 - # SDK (10.0.0, rollForward latestMinor), so build on the 10.0 SDK image. - - name: build-test - image: mcr.microsoft.com/dotnet/sdk:10.0 + - name: restore + image: *sdk_image + environment: *dotnet_env commands: - # libSkiaSharp in the SDK image needs fontconfig to load. - - apt-get update && apt-get install -y --no-install-recommends libfontconfig1 - 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 + + # libSkiaSharp needs fontconfig to load, and the SDK image does not ship it. + # Kept as its own step so a package-mirror problem is not reported as a test failure. + - name: sysdeps + image: *sdk_image + commands: + - apt-get update + - apt-get install -y --no-install-recommends libfontconfig1 + backend_options: *k8s_resources + + - name: test + image: *sdk_image + environment: *dotnet_env + commands: + - apt-get update && apt-get install -y --no-install-recommends libfontconfig1 - dotnet test Jellyfin.sln -c Release --no-build --verbosity minimal --filter "Category!=RequiresDocker&FullyQualifiedName!~Integration" - backend_options: - kubernetes: - serviceAccountName: jellyfin-ha-src - resources: - requests: - memory: 2Gi - cpu: 2 - limits: - memory: 6Gi - cpu: 4 + backend_options: *k8s_resources