-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
1 addition
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
# ===== FIRST STAGE ====== | ||
ARG DDC_SMART_CONTRACT_VERSION=2.2.3 | ||
ARG ECR_REGISTRY | ||
FROM phusion/baseimage:0.11 as builder | ||
LABEL maintainer="[email protected]" | ||
LABEL description="This is the build stage to create the binary." | ||
WORKDIR /cerenetwork | ||
COPY . /cerenetwork | ||
|
||
# ===== SECOND STAGE ====== | ||
FROM $ECR_REGISTRY/ddc-smart-contract:$DDC_SMART_CONTRACT_VERSION as ddc-smart-contract | ||
|
||
FROM builder | ||
# Copy smart-contract artifacts (ddc.wasm and metadata.json) | ||
COPY --from=ddc-smart-contract /ddc-smart-contract/artifacts/ddc.wasm /cerenetwork/pallets/ddc-metrics-offchain-worker/src/tests/test_data/ | ||
COPY --from=ddc-smart-contract /ddc-smart-contract/artifacts/metadata.json /cerenetwork/pallets/ddc-metrics-offchain-worker/src/tests/test_data/ | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y cmake pkg-config libssl-dev git clang unzip | ||
|
@@ -31,4 +23,4 @@ RUN PB_REL="https://github.com/protocolbuffers/protobuf/releases" && \ | |
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ | ||
export PATH=$PATH:$HOME/.cargo/bin && \ | ||
scripts/init.sh && \ | ||
TRYBUILD=overwrite cargo test --workspace --locked --release --verbose --features runtime-benchmarks --manifest-path node/cli/Cargo.toml | ||
TRYBUILD=overwrite cargo test --workspace --locked --release --verbose --features runtime-benchmarks --manifest-path node/cli/Cargo.toml |