@@ -35,34 +35,32 @@ WORKDIR /unique_parachain
3535FROM rust-builder as builder-unique-current
3636
3737ARG PROFILE=release
38- ARG FEATURE=
39- ARG MAINNET_BRANCH=
40- ARG REPO_URL=
38+ ARG NETWORK
39+ ARG MAINNET_BRANCH
40+ ARG REPO_URL
4141
4242WORKDIR /unique_parachain
4343
4444RUN git clone $REPO_URL -b $MAINNET_BRANCH . && \
45- cargo build --features=$FEATURE --$PROFILE
45+ cargo build --features=${NETWORK}-runtime --$PROFILE
4646
4747# ===== BUILD target version ======
4848FROM rust-builder as builder-unique-target
4949
5050ARG PROFILE=release
51- ARG FEATURE=
51+ ARG NETWORK
5252
5353COPY . /unique_parachain
5454WORKDIR /unique_parachain
5555
56- RUN cargo build --features=$FEATURE --$PROFILE
56+ RUN cargo build --features=${NETWORK}-runtime --$PROFILE
5757
5858# ===== RUN ======
5959
6060FROM ubuntu:20.04
6161
62- ARG RUNTIME=
63- ENV RUNTIME $RUNTIME
64- ARG POLKADOT_BUILD_BRANCH=
65- ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH
62+ ARG NETWORK
63+ ARG POLKADOT_LAUNCH_BRANCH
6664
6765RUN apt-get -y update && \
6866 apt-get -y install curl git && \
@@ -72,20 +70,19 @@ RUN apt-get -y update && \
7270 nvm install v16.16.0 && \
7371 nvm use v16.16.0
7472
75- RUN git clone https://github.com/uniquenetwork/polkadot-launch -b unique-network
73+ RUN git clone https://github.com/uniquenetwork/polkadot-launch -b ${POLKADOT_LAUNCH_BRANCH}
7674
7775RUN export NVM_DIR="$HOME/.nvm" && \
7876 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
7977 cd /polkadot-launch && \
8078 npm install --global yarn && \
8179 yarn install
8280
83- RUN echo "$RUNTIME"
84- RUN echo "$POLKADOT_BUILD_BRANCH"
81+ RUN echo "$NETWORK"
8582
8683COPY --from=builder-unique-current /unique_parachain/target/release/unique-collator /unique-chain/current/release/
8784COPY --from=builder-unique-target /unique_parachain/target/release/unique-collator /unique-chain/target/release/
88- COPY --from=builder-unique-target /unique_parachain/target/release/wbuild/"$RUNTIME "-runtime/"$RUNTIME "_runtime.compact.compressed.wasm /unique-chain/target/release/wbuild/"$RUNTIME "-runtime/"$RUNTIME "_runtime.compact.compressed.wasm
85+ COPY --from=builder-unique-target /unique_parachain/target/release/wbuild/"$NETWORK "-runtime/"$NETWORK "_runtime.compact.compressed.wasm /unique-chain/target/release/wbuild/"$NETWORK "-runtime/"$NETWORK "_runtime.compact.compressed.wasm
8986
9087COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/
9188COPY --from=polkadot /unique_parachain/polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm /polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm
@@ -94,5 +91,3 @@ CMD export NVM_DIR="$HOME/.nvm" && \
9491 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
9592 cd /polkadot-launch && \
9693 yarn start launch-config.json --test-upgrade-parachains -w -n
97-
98-
0 commit comments