@@ -9,6 +9,8 @@ RUN apt update -y && \
99WORKDIR /build-env
1010RUN echo "$(uname | awk '{print tolower($0)}')" > /build-env/os
1111RUN echo "$(arch)" > /build-env/arch
12+ RUN echo "$(rustc --version)" > /build-env/rustc-version
13+ RUN echo "$(cargo --version)" > /build-env/cargo-version
1214
1315# ---------------------------------------------
1416# Docker Stage: Temporary stage to help dependency caching
@@ -22,16 +24,18 @@ WORKDIR /parsec-service
2224# download them each time the builder runs.
2325RUN cargo fetch
2426
25- # Save the current parsec version as defined by cargo
26- RUN echo "$(cargo metadata --format-version=1 --no-deps --offline | jq -r '.packages[0].version')" > /build-env/parsec-version
27-
2827# ---------------------------------------------
2928# Docker Stage: Executes the build of the Parsec Service
3029FROM parsec_service_scratch AS parsec_service_builder
3130
3231# # Run the actual build
3332RUN cargo build --release --features mbed-crypto-provider
3433
34+ # Save the current parsec version and dependencies as defined by cargo and the current git commit hash
35+ RUN echo "$(cargo metadata --format-version=1 --no-deps --offline | jq -r '.packages[0].version')" > /build-env/parsec-version
36+ RUN echo "$(cargo tree)" > /build-env/parsec-dependencies
37+ RUN echo "$(git rev-parse HEAD)" > /build-env/parsec-commit
38+
3539# ---------------------------------------------
3640# Docker Stage: Executes the build of the Parsec Tool
3741FROM base_builder AS parsec_tool_builder
@@ -59,6 +63,14 @@ WORKDIR /parsec/quickstart
5963COPY quickstart/config.toml /parsec/quickstart/config.toml
6064COPY --from=parsec_tool_builder /parsec-tool/tests/parsec-cli-tests.sh /parsec/quickstart/parsec-cli-tests.sh
6165
66+ # # Grab all the build-env values
67+ COPY --from=parsec_service_builder /build-env/* /build-env/
68+ COPY --from=parsec_tool_builder /build-env/* /build-env/
69+
70+ # # Generate the build details file
71+ COPY quickstart/construct-build-details.sh /build-env/
72+ RUN chmod +x /build-env/construct-build-details.sh && /build-env/construct-build-details.sh > /parsec/quickstart/build.txt
73+
6274# ---------------------------------------------
6375# Docker Stage: Constructs an appropriate tarball containing all binaries and files
6476FROM ubuntu:latest AS tarball_builder
0 commit comments