Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: preserve git info for docker image in +source #501

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ setup:
source:
FROM +setup
ARG CRATES=$(tomlq -r .workspace.members[] Cargo.toml)
COPY .git .git
COPY .gitignore .gitignore
FOR crate IN $CRATES
COPY --dir $crate $crate
END
Expand All @@ -92,7 +94,7 @@ build:
#CACHE --sharing shared --id cargo-build-$CACHE_KEY target
CACHE --sharing shared --id cargo $CARGO_HOME
RUN cargo build --locked --profile=$PROFILE --features=$FEATURES
#SAVE ARTIFACT target
RUN ./target/*/partner-chains-node --version
SAVE ARTIFACT target/*/partner-chains-node AS LOCAL partner-chains-node
SAVE ARTIFACT target/*/partner-chains-node AS LOCAL partner-chains-node-artifact

Expand Down Expand Up @@ -139,6 +141,7 @@ docker:
&& ln -s /data /substrate/.local/share/partner-chains-node

COPY +build/partner-chains-node /usr/local/bin/
RUN /usr/local/bin/partner-chains-node --version
RUN chown substrate:substrate /usr/local/bin/partner-chains-node && chmod +x /usr/local/bin/partner-chains-node

USER substrate
Expand Down
Loading