Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #172 from grapl-security/Hotfix-debug-dobi
Browse files Browse the repository at this point in the history
Fix debug builds
  • Loading branch information
colin-grapl authored Jul 21, 2020
2 parents 7355396 + fd6aee5 commit a0567c3
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ COPY --from=grapl-rust-deps-build --chown=grapl /home/grapl/vendor vendor
# copy in the target directory from grapl-rust-deps-build
COPY --from=grapl-rust-deps-build --chown=grapl /home/grapl/target target
# "invalidate" all the grapl services, we want to rebuild them here
RUN rm -rf target/x86_64-unknown-linux-musl/*/.fingerprint/analyzer-dispatcher*
RUN rm -rf target/x86_64-unknown-linux-musl/*/.fingerprint/derive-dynamic-node*
RUN rm -rf target/x86_64-unknown-linux-musl/*/.fingerprint/generic-subgraph-generator*
RUN rm -rf target/x86_64-unknown-linux-musl/*/.fingerprint/grapl-graph-descriptions*
RUN rm -rf target/x86_64-unknown-linux-musl/*/.fingerprint/graph-generator-lib*
RUN rm -rf target/x86_64-unknown-linux-musl/*/.fingerprint/grapl-config*
RUN rm -rf target/x86_64-unknown-linux-musl/*/.fingerprint/graph-merger*
RUN rm -rf target/x86_64-unknown-linux-musl/*/.fingerprint/node-identifier*
RUN rm -rf target/x86_64-unknown-linux-musl/*/.fingerprint/sysmon-subgraph-generator*
RUN rm -rf target/*/*/.fingerprint/analyzer-dispatcher*
RUN rm -rf target/*/*/.fingerprint/derive-dynamic-node*
RUN rm -rf target/*/*/.fingerprint/generic-subgraph-generator*
RUN rm -rf target/*/*/.fingerprint/grapl-graph-descriptions*
RUN rm -rf target/*/*/.fingerprint/graph-generator-lib*
RUN rm -rf target/*/*/.fingerprint/grapl-config*
RUN rm -rf target/*/*/.fingerprint/graph-merger*
RUN rm -rf target/*/*/.fingerprint/node-identifier*
RUN rm -rf target/*/*/.fingerprint/sysmon-subgraph-generator*
# copy in the sources
COPY --chown=grapl ./analyzer-dispatcher analyzer-dispatcher
COPY --chown=grapl ./derive-dynamic-node derive-dynamic-node
Expand All @@ -124,13 +124,16 @@ COPY --chown=grapl ./sysmon-subgraph-generator sysmon-subgraph-generator
# copy in the top-level Cargo.toml and Cargo.lock
COPY --chown=grapl Cargo.lock .
COPY --chown=grapl Cargo.toml .
# build everything
RUN cargo test --target=x86_64-unknown-linux-musl
# Now do a clean release build

# Now do a clean build
RUN if test "${release_target}" = "release"; then \
cargo clean; \
cargo build --target=x86_64-unknown-linux-musl --release; \
fi
RUN if test "${release_target}" = "debug"; then \
cargo clean; \
cargo build --target=x86_64-unknown-linux-musl; \
fi
# copy artifacts to dist mount
RUN mkdir -p /home/grapl/dist && \
cp target/x86_64-unknown-linux-musl/${release_target}/analyzer-dispatcher dist/analyzer-dispatcher && \
Expand Down

0 comments on commit a0567c3

Please sign in to comment.