From 661dac307c3218f2d47b59638dd652ed0d77c8b7 Mon Sep 17 00:00:00 2001 From: "M. Scott Ford" Date: Mon, 25 Sep 2023 09:47:20 -0400 Subject: [PATCH] Writes platform metadata to the file system This permits examining the settings that were used for building the DotNet executables. --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index d4eeb474..8c4bb7e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,8 @@ FROM dotnet_build_${TARGETARCH} as dotnet_build_platform_specific COPY . /app/freshli WORKDIR /app/freshli +RUN echo "TARGETARCH=${TARGETARCH}\nDOTNET_RUNTIME_ID=${DOTNET_RUNTIME_ID}" | tee /app/.buildinfo + RUN dotnet tool restore RUN dotnet gitversion /config GitVersion.yml /showconfig RUN dotnet gitversion /config GitVersion.yml /output json /output buildserver @@ -119,6 +121,9 @@ RUN cd /root/bootstrap && \ mvn org.cyclonedx:cyclonedx-maven-plugin:makeAggregateBom && \ mvn com.corgibytes:versions-maven-plugin:resolve-ranges-historical +# Copy buildinfo metadata +COPY --from=dotnet_build_platform_specific /app/.buildinfo /app/.buildinfo + # Copy `freshli` executable from the `dotnet_build_platform_specific` image RUN mkdir -p /usr/local/share/freshli COPY --from=dotnet_build_platform_specific /app/freshli/exe/ /usr/local/share/freshli/