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
--- a/.docker/Dockerfile-try-runtime
+++ b/.docker/Dockerfile-try-runtime
@@ -36,38 +36,10 @@
 ARG FEATURE=
 ARG REPO_URL=
 ARG BRANCH=
-
-RUN git clone $REPO_URL -b $BRANCH . && \
-    cargo build --features=$FEATURE --$PROFILE
-
-
-# ===== BUILD POLKADOT =====
-FROM rust-builder as builder-polkadot
-
-ARG POLKADOT_BUILD_BRANCH=
-ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH
+ARG FORK_FROM=
 
-RUN mkdir /unique_parachain
 WORKDIR /unique_parachain
 
-RUN git clone -b $POLKADOT_BUILD_BRANCH --depth 1 https://github.com/paritytech/polkadot.git && \
-    cd polkadot && \
-    cargo build --release
+RUN git clone $REPO_URL -b $BRANCH . && \
+    cargo run --features=FEATURE --release -- try-runtime on-runtime-upgrade live --uri $FORK_FROM
 
-# ===== RUN ======
-
-FROM ubuntu:20.04
-
-ARG FORM_FROM=
-ARG FEATURE=
-
-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
-
-COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/
-COPY --from=builder-polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/
\ No newline at end of file
modified.docker/docker-compose.try-runtime.j2diffbeforeafterboth
--- a/.docker/docker-compose.try-runtime.j2
+++ b/.docker/docker-compose.try-runtime.j2
@@ -8,8 +8,5 @@
         - "BRANCH={{ BRANCH }}"
         - "REPO_URL={{ REPO_URL }}"
         - "FEATURE={{ FEATURE }}"
-        - "POLKADOT_BUILD_BRANCH={{ POLKADOT_BUILD_BRANCH }}"
         - "FORK_FROM={{ FORK_FROM }}"
-
-    command: cargo run --features=$FEATURE --release -- try-runtime on-runtime-upgrade live --uri $FORK_FROM
 
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