Skip to content

Commit

Permalink
Writes platform metadata to the file system
Browse files Browse the repository at this point in the history
This permits examining the settings that were used for building the DotNet executables.
  • Loading branch information
mscottford committed Sep 25, 2023
1 parent c9d2b36 commit 661dac3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand Down

0 comments on commit 661dac3

Please sign in to comment.