git.delta.rocks / unique-network / refs/commits / 320ff21d0a7c

difftreelog

delete hardcode for polkadot_launch_branch in ci

Konstantin Astakhov2022-10-27parent: #3fe954d.patch.diff
in: master

16 files changed

modified.docker/Dockerfile-parachaindiffbeforeafterboth
--- a/.docker/Dockerfile-parachain
+++ b/.docker/Dockerfile-parachain
@@ -6,8 +6,8 @@
 LABEL maintainer="Unique.Network"
 
 ARG RUST_TOOLCHAIN=
+ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
 
-ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
 ENV CARGO_HOME="/cargo-home"
 ENV PATH="/cargo-home/bin:$PATH"
 ENV TZ=UTC
@@ -48,8 +48,7 @@
 
 FROM ubuntu:20.04
 
-ARG POLKADOT_BUILD_BRANCH=
-ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH
+ARG POLKADOT_LAUNCH_BRANCH
 
 RUN apt-get -y update && \
       apt-get -y install curl git && \
@@ -59,7 +58,7 @@
       nvm install v16.16.0 && \
       nvm use v16.16.0
 
-RUN git clone https://github.com/uniquenetwork/polkadot-launch -b unique-network
+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" && \
@@ -75,5 +74,4 @@
 CMD export NVM_DIR="$HOME/.nvm" && \
     [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
     cd /polkadot-launch && \
-    yarn start launch-config.json
-
+    yarn start launch-config.json
\ No newline at end of file
modified.docker/Dockerfile-parachain-node-onlydiffbeforeafterboth
--- a/.docker/Dockerfile-parachain-node-only
+++ b/.docker/Dockerfile-parachain-node-only
@@ -59,10 +59,8 @@
 
 FROM ubuntu:20.04
 
-ARG RUNTIME=
-ENV RUNTIME $RUNTIME
-ARG POLKADOT_BUILD_BRANCH=
-ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH
+ARG RUNTIME
+ARG POLKADOT_LAUNCH_BRANCH
 
 RUN apt-get -y update && \
     apt-get -y install curl git && \
@@ -72,7 +70,7 @@
     nvm install v16.16.0 && \
     nvm use v16.16.0
 
-RUN git clone https://github.com/uniquenetwork/polkadot-launch -b unique-network
+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" && \
@@ -81,7 +79,6 @@
     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/
@@ -94,5 +91,3 @@
     [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
     cd /polkadot-launch && \
     yarn start launch-config.json --test-upgrade-parachains -w -n
-
-
modified.docker/Dockerfile-parachain-upgradediffbeforeafterboth
--- a/.docker/Dockerfile-parachain-upgrade
+++ b/.docker/Dockerfile-parachain-upgrade
@@ -60,10 +60,8 @@
 
 FROM ubuntu:20.04
 
-ARG RUNTIME=
-ENV RUNTIME $RUNTIME
-ARG POLKADOT_BUILD_BRANCH=
-ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH
+ARG RUNTIME
+ARG POLKADOT_LAUNCH_BRANCH
 
 RUN apt-get -y update && \
     apt-get -y install curl git && \
@@ -73,7 +71,7 @@
     nvm install v16.16.0 && \
     nvm use v16.16.0
 
-RUN git clone https://github.com/uniquenetwork/polkadot-launch -b unique-network
+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" && \
@@ -82,7 +80,6 @@
     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/
modified.docker/Dockerfile-parachain-upgrade-datadiffbeforeafterboth
--- a/.docker/Dockerfile-parachain-upgrade-data
+++ b/.docker/Dockerfile-parachain-upgrade-data
@@ -60,12 +60,9 @@
 
 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
+ARG RUNTIME
+ARG REPLICA_FROM
+ARG POLKADOT_LAUNCH_BRANCH
 
 RUN apt-get -y update && \
     apt-get -y install curl git && \
@@ -75,7 +72,7 @@
     nvm install v16.16.0 && \
     nvm use v16.16.0
 
-RUN git clone https://github.com/uniquenetwork/polkadot-launch.git -b unique-network
+RUN git clone https://github.com/uniquenetwork/polkadot-launch.git -b ${POLKADOT_LAUNCH_BRANCH}
 
 RUN export NVM_DIR="$HOME/.nvm" && \
     [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
@@ -85,7 +82,6 @@
 
 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/
modified.docker/Dockerfile-xcm.j2diffbeforeafterboth
--- a/.docker/Dockerfile-xcm.j2
+++ b/.docker/Dockerfile-xcm.j2
@@ -37,7 +37,7 @@
 
 RUN git clone -b {{ BRANCH }} https://github.com/UniqueNetwork/unique-chain.git && \
     cd unique-chain && \
-    cargo build --features={{ FEATURE }} --$PROFILE
+    cargo build --features={{ NETWORK }}-runtime --$PROFILE
 
 # ===== RUN ======
 
modified.docker/docker-compose.tmp-forkless-data.j2diffbeforeafterboth
--- a/.docker/docker-compose.tmp-forkless-data.j2
+++ b/.docker/docker-compose.tmp-forkless-data.j2
@@ -10,6 +10,7 @@
         - "FEATURE={{ FEATURE }}"
         - "RUNTIME={{ RUNTIME }}"
         - "POLKADOT_BUILD_BRANCH={{ POLKADOT_BUILD_BRANCH }}"
+        - "POLKADOT_LAUNCH_BRANCH={{ POLKADOT_LAUNCH_BRANCH }}"
         - "MAINNET_TAG={{ MAINNET_TAG }}"
         - "MAINNET_BRANCH={{ MAINNET_BRANCH }}"
         - "REPLICA_FROM={{ REPLICA_FROM }}"
modified.docker/docker-compose.tmp-forkless-nodata.j2diffbeforeafterboth
--- a/.docker/docker-compose.tmp-forkless-nodata.j2
+++ b/.docker/docker-compose.tmp-forkless-nodata.j2
@@ -10,6 +10,7 @@
         - "FEATURE={{ FEATURE }}"
         - "RUNTIME={{ RUNTIME }}"
         - "POLKADOT_BUILD_BRANCH={{ POLKADOT_BUILD_BRANCH }}"
+        - "POLKADOT_LAUNCH_BRANCH={{ POLKADOT_LAUNCH_BRANCH }}"        
         - "MAINNET_TAG={{ MAINNET_TAG }}"
         - "MAINNET_BRANCH={{ MAINNET_BRANCH }}"
       context: ../
modified.docker/docker-compose.tmp-node.j2diffbeforeafterboth
--- a/.docker/docker-compose.tmp-node.j2
+++ b/.docker/docker-compose.tmp-node.j2
@@ -10,6 +10,7 @@
         - "FEATURE={{ FEATURE }}"
         - "RUNTIME={{ RUNTIME }}"
         - "POLKADOT_BUILD_BRANCH={{ POLKADOT_BUILD_BRANCH }}"
+        - "POLKADOT_LAUNCH_BRANCH={{ POLKADOT_LAUNCH_BRANCH }}"        
         - "MAINNET_TAG={{ MAINNET_TAG }}"
         - "MAINNET_BRANCH={{ MAINNET_BRANCH }}"
       context: ../
modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -19,4 +19,5 @@
 WESTMINT_BUILD_BRANCH=parachains-v9290
 OPAL_MAINNET_TAG=quartz-v924012-2-old-tests-fixes
 OPAL_REPLICA_FROM=wss://eu-ws-opal.unique.network:443
+
 POLKADOT_LAUNCH_BRANCH=unique-network
modified.github/workflows/ci-master.ymldiffbeforeafterboth
--- a/.github/workflows/ci-master.yml
+++ b/.github/workflows/ci-master.yml
@@ -33,5 +33,9 @@
     uses: ./.github/workflows/xcm.yml
     secrets: inherit # pass all secrets from initial workflow to nested
 
+  # testnet:
+  #   uses: ./.github/workflows/testnet-build.yml
+  #   secrets: inherit # pass all secrets from initial workflow to nested
+
   codestyle:
     uses: ./.github/workflows/codestyle.yml
modified.github/workflows/forkless-update-data.ymldiffbeforeafterboth
--- a/.github/workflows/forkless-update-data.yml
+++ b/.github/workflows/forkless-update-data.yml
@@ -74,6 +74,7 @@
             REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
             RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
             POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
+            POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}            
             POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}
             MAINNET_TAG=${{ matrix.mainnet_tag }}
             MAINNET_BRANCH=${{ matrix.mainnet_branch }}
modified.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth
--- a/.github/workflows/forkless-update-nodata.yml
+++ b/.github/workflows/forkless-update-nodata.yml
@@ -75,6 +75,7 @@
             REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
             RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
             POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
+            POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}            
             POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}
             MAINNET_TAG=${{ matrix.mainnet_tag }}
             MAINNET_BRANCH=${{ matrix.mainnet_branch }}
modified.github/workflows/integration-tests.ymldiffbeforeafterboth
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -78,6 +78,7 @@
             REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
             RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
             POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
+            POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}            
             POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}
             MAINNET_TAG=${{ matrix.mainnet_tag }}
             MAINNET_BRANCH=${{ matrix.mainnet_branch }}
@@ -227,6 +228,7 @@
             REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
             RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
             POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
+            POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}            
             POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}
             MAINNET_TAG=${{ matrix.mainnet_tag }}
             MAINNET_BRANCH=${{ matrix.mainnet_branch }}
modified.github/workflows/node-only-update.ymldiffbeforeafterboth
--- a/.github/workflows/node-only-update.yml
+++ b/.github/workflows/node-only-update.yml
@@ -80,6 +80,7 @@
             REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
             RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
             POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
+            POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}            
             POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}
             MAINNET_TAG=${{ matrix.mainnet_tag }}
             MAINNET_BRANCH=${{ matrix.mainnet_branch }}
modified.github/workflows/testnet-build.ymldiffbeforeafterboth
before · .github/workflows/testnet-build.yml
1name: testnet-build23# Controls when the action will run.4on:5 # Triggers the workflow on push or pull request events but only for the master branch6  pull_request:7    branches:8      - master9    types:10      - opened11      - reopened12      - synchronize   #commit(s) pushed to the pull request13      - ready_for_review1415  # Allows you to run this workflow manually from the Actions tab16  workflow_dispatch:1718#Define Workflow variables19env:20  REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122concurrency:23  group: ${{ github.workflow }}-${{ github.ref }}24  cancel-in-progress: true2526# A workflow run is made up of one or more jobs that can run sequentially or in parallel27jobs:2829  prepare-execution-marix:3031    name: Prepare execution matrix3233    runs-on: [self-hosted-ci,medium]34    outputs:35      matrix: ${{ steps.create_matrix.outputs.matrix }}3637    steps:3839      - name: Clean Workspace40        uses: AutoModality/action-clean@v1.1.04142      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it43      - uses: actions/checkout@v344        with:45          ref: ${{ github.head_ref }}  #Checking out head commit4647      - name: Read .env file48        uses: xom9ikk/dotenv@v24950      - name: Create Execution matrix51        uses: fabiocaccamo/create-matrix-action@v252        id: create_matrix53        with:54          matrix: |55            network {opal}, runtime {opal}, features {opal-runtime}56            network {quartz}, runtime {quartz}, features {quartz-runtime}57            network {unique}, runtime {unique}, features {unique-runtime}5859  testnet-build:60    needs: prepare-execution-marix61    # The type of runner that the job will run on62    runs-on: [self-hosted-ci,medium]6364    timeout-minutes: 6006566    name: ${{ matrix.network }}6768    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.6970    strategy:71      matrix:72        include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}7374    steps:75      - name: Skip if pull request is in Draft76        if: github.event.pull_request.draft == true77        run: exit 17879      - name: Clean Workspace80        uses: AutoModality/action-clean@v1.1.08182      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it83      - uses: actions/checkout@v384        with:85          ref: ${{ github.head_ref }}  #Checking out head commit8687      - name: Read .env file88        uses: xom9ikk/dotenv@v28990      - name: Generate ENV related extend file for docker-compose91        uses: cuchi/jinja2-action@v1.2.092        with:93          template: .docker/Dockerfile-testnet.j294          output_file: .docker/Dockerfile-testnet.${{ matrix.network }}.yml95          variables: |96            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}97            NETWORK=${{ matrix.network }}98            POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}99            POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}100            FEATURE=${{ matrix.features }}101            RUNTIME=${{ matrix.runtime }}102            BRANCH=${{ github.head_ref }}103104      - name: Show build configuration105        run: cat .docker/Dockerfile-testnet.${{ matrix.network }}.yml106107      - name: Show launch-config configuration108        run: cat launch-config.json109110      - name: Run find-and-replace to remove slashes from branch name111        uses: mad9000/actions-find-and-replace-string@2112        id: branchname113        with:114          source: ${{ github.head_ref }}115          find: '/'116          replace: '-'117118      - name: Log in to Docker Hub119        uses: docker/login-action@v2.0.0120        with:121          username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}122          password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}123124      - name: Pull polkadot docker image125        run: docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}           126127      - name: Build the stack128        run: cd .docker/ && docker build --file ./Dockerfile-testnet.${{ matrix.network }}.yml --tag uniquenetwork/${{ matrix.network }}-testnet-local-nightly:nightly-${{ steps.branchname.outputs.value }}-${{ github.sha }} . 129130      - name: Push docker version image131        run: docker push uniquenetwork/${{ matrix.network }}-testnet-local-nightly:nightly-${{ steps.branchname.outputs.value }}-${{ github.sha }}132133      - name: Clean Workspace134        if: always()135        uses: AutoModality/action-clean@v1.1.0136137      - name: Remove builder cache138        if: always()                   # run this step always139        run: |140          docker builder prune -f141          docker system prune -f
modified.github/workflows/xcm.ymldiffbeforeafterboth
--- a/.github/workflows/xcm.yml
+++ b/.github/workflows/xcm.yml
@@ -40,9 +40,9 @@
         id: create_matrix
         with:
           matrix: |
-            network {opal}, runtime {opal}, features {opal-runtime}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.WESTMINT_BUILD_BRANCH }}}, runtest {testXcmOpal}
-            network {quartz}, runtime {quartz}, features {quartz-runtime}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINE_BUILD_BRANCH }}}, runtest {testXcmQuartz}
-            network {unique}, runtime {unique}, features {unique-runtime}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINT_BUILD_BRANCH }}}, runtest {testXcmUnique}
+            network {opal}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.WESTMINT_BUILD_BRANCH }}}, runtest {testXcmOpal}
+            network {quartz}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINE_BUILD_BRANCH }}}, runtest {testXcmQuartz}
+            network {unique}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINT_BUILD_BRANCH }}}, runtest {testXcmUnique}
 
   xcm-build:
     
@@ -229,9 +229,7 @@
             RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
             NETWORK=${{ matrix.network }}
             POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
-            POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}
-            FEATURE=${{ matrix.features }}
-            RUNTIME=${{ matrix.runtime }}
+            POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}           
             BRANCH=${{ github.head_ref }}
             ACALA_BUILD_BRANCH=${{ matrix.acala_version }}
             MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }}