git.delta.rocks / unique-network / refs/commits / d2043ffafec9

difftreelog

update dockerfile for try runtime

Alexander Aksenov2022-08-16parent: #3d43cce.patch.diff
in: master

3 files changed

modified.docker/Dockerfile-try-runtimediffbeforeafterboth
36ARG FEATURE=36ARG FEATURE=
37ARG REPO_URL=37ARG REPO_URL=
38ARG BRANCH=38ARG BRANCH=
39ARG FORK_FROM=
3940
40RUN git clone $REPO_URL -b $BRANCH . && \
41 cargo build --features=$FEATURE --$PROFILE
42
43
44# ===== BUILD POLKADOT =====
45FROM rust-builder as builder-polkadot
46
47ARG POLKADOT_BUILD_BRANCH=
48ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH
49
50RUN mkdir /unique_parachain
51WORKDIR /unique_parachain41WORKDIR /unique_parachain
5242
53RUN git clone -b $POLKADOT_BUILD_BRANCH --depth 1 https://github.com/paritytech/polkadot.git && \43RUN git clone $REPO_URL -b $BRANCH . && \
54 cd polkadot && \44 cargo run --features=FEATURE --release -- try-runtime on-runtime-upgrade live --uri $FORK_FROM
55 cargo build --release
56
57# ===== RUN ======
58
59FROM ubuntu:20.04
60
61ARG FORM_FROM=
62ARG FEATURE=
63
64RUN apt-get -y update && \
65 apt-get -y install curl git && \
66 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \
67 export NVM_DIR="$HOME/.nvm" && \
68 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
69 nvm install v16.16.0 && \
70 nvm use v16.16.0
7145
72COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/46
73COPY --from=builder-polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/
modified.docker/docker-compose.try-runtime.j2diffbeforeafterboth
8 - "BRANCH={{ BRANCH }}"8 - "BRANCH={{ BRANCH }}"
9 - "REPO_URL={{ REPO_URL }}"9 - "REPO_URL={{ REPO_URL }}"
10 - "FEATURE={{ FEATURE }}"10 - "FEATURE={{ FEATURE }}"
11 - "POLKADOT_BUILD_BRANCH={{ POLKADOT_BUILD_BRANCH }}"
12 - "FORK_FROM={{ FORK_FROM }}"11 - "FORK_FROM={{ FORK_FROM }}"
1312
14 command: cargo run --features=$FEATURE --release -- try-runtime on-runtime-upgrade live --uri $FORK_FROM
15
1613
modified.github/workflows/try-runtime.ymldiffbeforeafterboth
2121
22# A workflow run is made up of one or more jobs that can run sequentially or in parallel22# A workflow run is made up of one or more jobs that can run sequentially or in parallel
23jobs:23jobs:
24 fork-update-withdata:24 try-runtime:
25 # The type of runner that the job will run on25 # The type of runner that the job will run on
26 runs-on: self-hosted-ci26 runs-on: self-hosted-ci
2727
28 name: Build Container, Spin it Up an test28 name: ${{ matrix.network }} - Try-runtime
2929
30 continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.30 continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.
3131
43 fork_from_address: wss://eu-ws.unique.network:44343 fork_from_address: wss://eu-ws.unique.network:443
4444
45 steps:45 steps:
46# - name: Skip if pull request is in Draft46 - name: Skip if pull request is in Draft
47 # `if: github.event.pull_request.draft == true` should be kept here, at47 # `if: github.event.pull_request.draft == true` should be kept here, at
48 # the step level, rather than at the job level. The latter is not48 # the step level, rather than at the job level. The latter is not
49 # recommended because when the PR is moved from "Draft" to "Ready to49 # recommended because when the PR is moved from "Draft" to "Ready to
58 # 4. Move it to "Ready for review"; now the workflow is passing (it was58 # 4. Move it to "Ready for review"; now the workflow is passing (it was
59 # skipped) and "Check reviews" is also passing (it won't be updated59 # skipped) and "Check reviews" is also passing (it won't be updated
60 # until the workflow is finished)60 # until the workflow is finished)
61# if: github.event.pull_request.draft == true61 if: github.event.pull_request.draft == true
62# run: exit 162 run: exit 1
6363
6464
65 - name: Clean Workspace65 - name: Clean Workspace
78 with:78 with:
79 template: .docker/docker-compose.try-runtime.j279 template: .docker/docker-compose.try-runtime.j2
80 output_file: .docker/docker-compose.try-runtime.${{ matrix.network }}.yml80 output_file: .docker/docker-compose.try-runtime.${{ matrix.network }}.yml
81 variables: |81 variables: |
82 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git82 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
83 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}83 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
84 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}84 FEATURE=${{ matrix.features }}
85 FEATURE=${{ matrix.features }}85 BRANCH=${{ github.head_ref }}
86 BRANCH=${{ github.head_ref }}86 FORK_FROM=${{ matrix.fork_from_address }}
87 FORK_FROM=${{ matrix.fork_from_address }}
8887
89 - name: Show build configuration88 - name: Show build configuration
90 run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml89 run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml