ci: pin Linux build RIDs across stages and retry runtime fetches [CI]
ci/woodpecker/push/web-build Pipeline was successful
ci/woodpecker/push/dev-image Pipeline failed
ci/woodpecker/push/verify Pipeline failed

This commit is contained in:
justme committed 2026-10-21 13:40:21 +08:00
1 parent 806493567b
commit a867c9f7f6
3 files changed
+17 -3

No files matched your search

@@ -8,6 +8,8 @@ ARG NODE_RID=linux-musl-arm64
ARG STATIC_MSQUIC=true
ENV NUGET_PACKAGES=/root/.nuget/packages
FROM restore AS managed
ARG NODE_RID=linux-musl-arm64
ARG STATIC_MSQUIC=true
ARG APP_VERSION=0.0.0-dev
ARG MOSHIRO_TAG=
ARG MOSHIRO_COMMIT=
@@ -15,13 +17,19 @@ ARG MOSHIRO_BUILT_AT=
ENV MOSHIRO_TAG=$MOSHIRO_TAG MOSHIRO_COMMIT=$MOSHIRO_COMMIT MOSHIRO_BUILT_AT=$MOSHIRO_BUILT_AT
# Build the project graph once; both native publishes reuse these managed outputs.
RUN --mount=type=cache,id=moshiro-nuget,target=/root/.nuget/packages,ro \
dotnet build Agent.Native.proj -m:3 -c Release -r "$NODE_RID" --no-restore \
test -n "$NODE_RID" \
&& echo "building managed outputs for $NODE_RID" \
&& dotnet build Agent.Native.proj -m:3 -c Release -r "$NODE_RID" --no-restore \
-p:PublishAot=true -p:UseAotAnywhere=true -p:SelfContained=true -p:Version="$APP_VERSION" \
-p:RuntimeIdentifier="$NODE_RID" \
-p:StaticMsQuic="$STATIC_MSQUIC" -p:StaticExecutable="$STATIC_MSQUIC" \
-p:RuntimeFrameworkVersion=10.0.12 -p:InvariantGlobalization=true \
-p:UseAppHost=true -p:StripSymbols=true -p:DebugType=none -p:DebugSymbols=false --artifacts-path /artifacts
FROM managed AS build-agent
ARG NODE_RID=linux-musl-arm64
ARG STATIC_MSQUIC=true
ARG APP_VERSION=0.0.0-dev
RUN --mount=type=cache,id=moshiro-nuget,target=/root/.nuget/packages,ro \
dotnet publish agent/src/MoShiro.Agent -m:3 -c Release -r "$NODE_RID" \
--self-contained true --no-build --no-restore -p:PublishAot=true -p:UseAotAnywhere=true \
@@ -36,6 +44,9 @@ RUN --mount=type=cache,id=moshiro-nuget,target=/root/.nuget/packages,ro \
fi
FROM managed AS build-enroll
ARG NODE_RID=linux-musl-arm64
ARG STATIC_MSQUIC=true
ARG APP_VERSION=0.0.0-dev
RUN --mount=type=cache,id=moshiro-nuget,target=/root/.nuget/packages,ro \
dotnet publish fleet/tools/fleet-enroll -m:3 -c Release -r "$NODE_RID" \
--self-contained true --no-build --no-restore -p:PublishAot=true -p:UseAotAnywhere=true \