ci: probe system packages before building
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed

A failure anywhere in the chain currently looks the same from outside, so there
is no way to tell a package mirror problem from a compile error.

- run the fontconfig install as the first step
- split restore, build and test into named steps
- point the package cache at the shared pipeline volume
This commit is contained in:
2026-09-12 00:35:03 +10:00
parent b6f7732f13
commit e235673f12
+45 -18
View File
@@ -2,28 +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 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
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
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "1"
# libSkiaSharp needs fontconfig to load and the SDK image does not ship it.
# Probed first so a package-mirror problem is not reported as a build failure.
- name: sysdeps
image: *sdk_image
commands:
- apt-get update
- apt-get install -y --no-install-recommends libfontconfig1
backend_options: *k8s_resources
- name: restore
image: *sdk_image
environment: *dotnet_env
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
# libSkiaSharp needs fontconfig to load, and the SDK image does not ship it.
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: 8Gi
cpu: 4
backend_options: *k8s_resources