-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #721 from UniqueNetwork/release-v924013
Release v924013
- Loading branch information
Showing
75 changed files
with
5,511 additions
and
338 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
ARG POLKADOT_BUILD_BRANCH | ||
FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot | ||
|
||
# ===== Rust builder ===== | ||
FROM ubuntu:20.04 as rust-builder | ||
LABEL maintainer="Unique.Network" | ||
|
||
ARG RUST_TOOLCHAIN= | ||
|
||
ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN | ||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
ENV TZ=UTC | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl cmake pkg-config libssl-dev git clang protobuf-compiler && \ | ||
apt-get clean && \ | ||
rm -r /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install $RUST_TOOLCHAIN && \ | ||
rustup default $RUST_TOOLCHAIN && \ | ||
rustup target list --installed && \ | ||
rustup show | ||
RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN | ||
|
||
RUN mkdir /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
|
||
# ===== BUILD ====== | ||
FROM rust-builder as builder-unique | ||
|
||
ARG PROFILE=release | ||
ARG FEATURE= | ||
ARG REPO_URL= | ||
ARG BRANCH= | ||
|
||
WORKDIR /unique_parachain | ||
|
||
RUN git clone $REPO_URL -b $BRANCH . && \ | ||
cargo build --features=$FEATURE --$PROFILE | ||
|
||
# ===== RUN ====== | ||
|
||
FROM ubuntu:20.04 | ||
|
||
ARG POLKADOT_BUILD_BRANCH= | ||
ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH | ||
|
||
RUN apt-get -y update && \ | ||
apt-get -y install curl git && \ | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \ | ||
export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
nvm install v16.16.0 && \ | ||
nvm use v16.16.0 | ||
|
||
RUN git clone https://github.com/uniquenetwork/polkadot-launch -b unique-network | ||
|
||
RUN export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
cd /polkadot-launch && \ | ||
npm install --global yarn && \ | ||
yarn install | ||
|
||
COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/ | ||
COPY --from=builder-unique /unique_parachain/launch-config.json /polkadot-launch/launch-config.json | ||
|
||
COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ | ||
|
||
CMD export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
cd /polkadot-launch && \ | ||
yarn start launch-config.json |
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 |
---|---|---|
@@ -0,0 +1,97 @@ | ||
ARG POLKADOT_BUILD_BRANCH | ||
FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot | ||
|
||
# ===== Rust builder ===== | ||
FROM ubuntu:20.04 as rust-builder | ||
LABEL maintainer="Unique.Network" | ||
|
||
ARG RUST_TOOLCHAIN= | ||
|
||
ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN | ||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
ENV TZ=UTC | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl cmake pkg-config libssl-dev git clang protobuf-compiler && \ | ||
apt-get clean && \ | ||
rm -r /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install $RUST_TOOLCHAIN && \ | ||
rustup default $RUST_TOOLCHAIN && \ | ||
rustup target list --installed && \ | ||
rustup show | ||
RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN | ||
|
||
RUN mkdir /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
# ===== BUILD current version ====== | ||
FROM rust-builder as builder-unique-current | ||
|
||
ARG PROFILE=release | ||
ARG FEATURE= | ||
ARG MAINNET_BRANCH= | ||
ARG REPO_URL= | ||
|
||
WORKDIR /unique_parachain | ||
|
||
RUN git clone $REPO_URL -b $MAINNET_BRANCH . && \ | ||
cargo build --features=$FEATURE --$PROFILE | ||
|
||
# ===== BUILD target version ====== | ||
FROM rust-builder as builder-unique-target | ||
|
||
ARG PROFILE=release | ||
ARG FEATURE= | ||
ARG BRANCH= | ||
ARG REPO_URL= | ||
|
||
COPY . /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
RUN cargo build --features=$FEATURE --$PROFILE | ||
|
||
# ===== RUN ====== | ||
|
||
FROM ubuntu:20.04 | ||
|
||
ARG RUNTIME= | ||
ENV RUNTIME $RUNTIME | ||
ARG POLKADOT_BUILD_BRANCH= | ||
ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH | ||
|
||
RUN apt-get -y update && \ | ||
apt-get -y install curl git && \ | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \ | ||
export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
nvm install v16.16.0 && \ | ||
nvm use v16.16.0 | ||
|
||
RUN git clone https://github.com/uniquenetwork/polkadot-launch -b unique-network | ||
|
||
RUN export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
cd /polkadot-launch && \ | ||
npm install --global yarn && \ | ||
yarn install | ||
|
||
RUN echo "$RUNTIME" | ||
RUN echo "$POLKADOT_BUILD_BRANCH" | ||
|
||
COPY --from=builder-unique-current /unique_parachain/target/release/unique-collator /unique-chain/current/release/ | ||
COPY --from=builder-unique-target /unique_parachain/target/release/unique-collator /unique-chain/target/release/ | ||
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 | ||
|
||
COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ | ||
COPY --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 | ||
|
||
CMD export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
cd /polkadot-launch && \ | ||
yarn start launch-config.json --test-upgrade-parachains |
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 |
---|---|---|
@@ -0,0 +1,102 @@ | ||
ARG POLKADOT_BUILD_BRANCH | ||
FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot | ||
|
||
# ===== Rust builder ===== | ||
FROM ubuntu:20.04 as rust-builder | ||
LABEL maintainer="Unique.Network" | ||
|
||
ARG RUST_TOOLCHAIN= | ||
|
||
ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN | ||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
ENV TZ=UTC | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl cmake pkg-config libssl-dev git clang protobuf-compiler && \ | ||
apt-get clean && \ | ||
rm -r /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install $RUST_TOOLCHAIN && \ | ||
rustup default $RUST_TOOLCHAIN && \ | ||
rustup target list --installed && \ | ||
rustup show | ||
RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN | ||
|
||
RUN mkdir /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
# ===== BUILD current version ====== | ||
FROM rust-builder as builder-unique-current | ||
|
||
ARG PROFILE=release | ||
ARG FEATURE= | ||
ARG MAINNET_BRANCH= | ||
ARG REPO_URL= | ||
|
||
WORKDIR /unique_parachain | ||
|
||
RUN git clone $REPO_URL -b $MAINNET_BRANCH . && \ | ||
cargo build --features=$FEATURE --$PROFILE | ||
|
||
# ===== BUILD target version ====== | ||
FROM rust-builder as builder-unique-target | ||
|
||
ARG PROFILE=release | ||
ARG FEATURE= | ||
ARG BRANCH= | ||
ARG REPO_URL= | ||
|
||
COPY . /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
RUN cargo build --features=$FEATURE --$PROFILE | ||
|
||
# ===== RUN ====== | ||
|
||
FROM ubuntu:20.04 | ||
|
||
ARG RUNTIME= | ||
ENV RUNTIME $RUNTIME | ||
ARG REPLICA_FROM= | ||
ENV REPLICA_FROM=$REPLICA_FROM | ||
ARG POLKADOT_BUILD_BRANCH= | ||
ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH | ||
|
||
RUN apt-get -y update && \ | ||
apt-get -y install curl git && \ | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \ | ||
export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
nvm install v16.16.0 && \ | ||
nvm use v16.16.0 | ||
|
||
RUN git clone https://github.com/uniquenetwork/polkadot-launch.git -b unique-network | ||
|
||
RUN export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
cd /polkadot-launch && \ | ||
npm install --global yarn && \ | ||
yarn install | ||
|
||
RUN echo "$RUNTIME" | ||
RUN echo "$REPLICA_FROM" | ||
RUN echo "$POLKADOT_BUILD_BRANCH" | ||
|
||
COPY --from=builder-unique-current /unique_parachain/target/release/unique-collator /unique-chain/current/release/ | ||
COPY --from=builder-unique-target /unique_parachain/target/release/unique-collator /unique-chain/target/release/ | ||
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 | ||
|
||
COPY --from=uniquenetwork/builder-chainql:latest /chainql/target/release/chainql /chainql/target/release/ | ||
|
||
COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ | ||
COPY --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 | ||
|
||
CMD export NVM_DIR="$HOME/.nvm" PATH="$PATH:/chainql/target/release" REPLICA_FROM && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
cd /polkadot-launch && \ | ||
yarn start launch-config.json --test-upgrade-parachains |
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# ===== Rust builder ===== | ||
FROM ubuntu:20.04 as rust-builder | ||
LABEL maintainer="Unique.Network" | ||
|
||
ENV CARGO_HOME="/cargo-home" | ||
ENV PATH="/cargo-home/bin:$PATH" | ||
ENV TZ=UTC | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ | ||
apt-get clean && \ | ||
rm -r /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none | ||
|
||
RUN rustup toolchain uninstall $(rustup toolchain list) && \ | ||
rustup toolchain install {{ RUST_TOOLCHAIN }} && \ | ||
rustup default {{ RUST_TOOLCHAIN }} && \ | ||
rustup target list --installed && \ | ||
rustup show | ||
RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} | ||
|
||
RUN mkdir /unique_parachain | ||
WORKDIR /unique_parachain | ||
|
||
# ===== BUILD ====== | ||
FROM rust-builder as builder-unique | ||
|
||
ARG PROFILE=release | ||
|
||
WORKDIR /unique_parachain | ||
|
||
RUN git clone -b {{ BRANCH }} https://github.com/UniqueNetwork/unique-chain.git && \ | ||
cd unique-chain && \ | ||
cargo build --features={{ FEATURE }} --$PROFILE | ||
|
||
# ===== RUN ====== | ||
|
||
FROM ubuntu:20.04 | ||
|
||
RUN apt-get -y update && \ | ||
apt-get -y install curl git && \ | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \ | ||
export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
nvm install v16.16.0 && \ | ||
nvm use v16.16.0 | ||
|
||
RUN git clone https://github.com/uniquenetwork/polkadot-launch -b {{ POLKADOT_LAUNCH_BRANCH }} | ||
|
||
RUN export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
cd /polkadot-launch && \ | ||
npm install --global yarn && \ | ||
yarn install | ||
|
||
COPY --from=builder-unique /unique_parachain/unique-chain/.docker/testnet-config/launch-config.json /polkadot-launch/launch-config.json | ||
COPY --from=builder-unique /unique_parachain/unique-chain/target/release/unique-collator /unique-chain/target/release/ | ||
|
||
COPY --from=uniquenetwork/builder-polkadot:{{ POLKADOT_BUILD_BRANCH }} /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ | ||
|
||
EXPOSE 9844 | ||
EXPOSE 9944 | ||
EXPOSE 9933 | ||
EXPOSE 9833 | ||
EXPOSE 40333 | ||
EXPOSE 30333 | ||
|
||
CMD export NVM_DIR="$HOME/.nvm" && \ | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | ||
cd /polkadot-launch && \ | ||
yarn start launch-config.json |
Oops, something went wrong.