git.delta.rocks / unique-network / refs/commits / 6a7d5b108992

difftreelog

escaping for values in execution matrix

Alexander Aksenov2022-08-15parent: #94c28c0.patch.diff
in: master

2 files changed

modified.github/workflows/fork-update-withdata.ymldiffbeforeafterboth
before · .github/workflows/fork-update-withdata.yml
1name: Fork Parachain update with data23# 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 }}2122# A workflow run is made up of one or more jobs that can run sequentially or in parallel23jobs:2425  prepare-execution-marix-fork:26    27    name: Prepare execution matrix for fork28    29    runs-on: self-hosted-ci30    outputs:31      matrix: ${{ steps.create_matrix.outputs.matrix }}32    steps:33      34      - name: Clean Workspace35        uses: AutoModality/action-clean@v1.1.03637      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it38      - uses: actions/checkout@v339        with:40          ref: ${{ github.head_ref }}  #Checking out head commit4142      - name: Read .env file43        uses: xom9ikk/dotenv@v1.0.24445      - name: Create Execution matrix46        uses: fabiocaccamo/create-matrix-action@v247        id: create_matrix48        with:49          matrix: |50            network {Opal}, runtime {opal}, features {opal-runtime}, mainnet_branch {${{ env.OPAL_MAINNET_TAG }}}, fork_from_address {wss://eu-ws-opal.unique.network:443}51            network {Quartz}, runtime {quartz}, features {quartz-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}}, fork_from_address {wss://eu-ws-quartz.unique.network:443}52            network {Unique}, runtime {unique}, features {unique-runtime}, mainnet_branch {${{ env.UNIQUE_MAINNET_TAG }}}, fork_from_address {wss://eu-ws.unique.network:443}53545556  fork-update-withdata:57    needs: prepare-execution-marix-fork58    # The type of runner that the job will run on59    runs-on: self-hosted-ci6061    name: Build Container, Spin it Up an test6263    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.6465    strategy:66      matrix:67        include: ${{fromJson(needs.prepare-execution-marix-fork.outputs.matrix)}}6869    steps:70      - name: Skip if pull request is in Draft71        # `if: github.event.pull_request.draft == true` should be kept here, at72        # the step level, rather than at the job level. The latter is not73        # recommended because when the PR is moved from "Draft" to "Ready to74        # review" the workflow will immediately be passing (since it was skipped),75        # even though it hasn't actually ran, since it takes a few seconds for76        # the workflow to start. This is also disclosed in:77        # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/1778        # That scenario would open an opportunity for the check to be bypassed:79        # 1. Get your PR approved80        # 2. Move it to Draft81        # 3. Push whatever commits you want82        # 4. Move it to "Ready for review"; now the workflow is passing (it was83        #    skipped) and "Check reviews" is also passing (it won't be updated84        #    until the workflow is finished)85        if: github.event.pull_request.draft == true86        run: exit 18788      - name: Clean Workspace89        uses: AutoModality/action-clean@v1.1.09091      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it92      - uses: actions/checkout@v393        with:94          ref: ${{ github.head_ref }}  #Checking out head commit9596      - name: Read .env file97        uses: xom9ikk/dotenv@v1.0.29899      - name: Generate ENV related extend file for docker-compose100        uses: cuchi/jinja2-action@v1.2.0101        with:102          template: .docker/forking/docker-compose.tmp-fork.j2103          output_file: .docker/forking/docker-compose.${{ matrix.network }}.yml104          variables: |105            REPO_URL=${{ github.server_url }}/${{ github.repository }}.git106            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}107            POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}108            POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}109            MAINNET_TAG=${{ matrix.mainnet_tag }}110            MAINNET_BRANCH=${{ matrix.mainnet_branch }}111            FEATURE=${{ matrix.features }}112            RUNTIME=${{ matrix.runtime }}113            BRANCH=${{ github.head_ref }}114            FORK_FROM=${{ matrix.fork_from_address }}115116      - name: Show build configuration117        run: cat .docker/forking/docker-compose.${{ matrix.network }}.yml118119      - name: Generate launch-config-fork.json120        uses: cuchi/jinja2-action@v1.2.0121        with:122          template: .docker/forking/launch-config-fork.j2123          output_file: .docker/forking/launch-config-fork.json124          variables: |125            FEATURE=${{ matrix.features }}126            RUNTIME=${{ matrix.runtime }}127128      - name: Show launch-config-fork configuration129        run: cat .docker/forking/launch-config-fork.json130131132      - name: Build the stack133        run: docker-compose -f ".docker/forking/docker-compose-fork.yaml" -f ".docker/forking/docker-compose.${{ matrix.network }}.yml" up -d --build  --force-recreate --timeout 300134135      - name: Check if docker logs consist logs related to Runtime Upgrade testing.136        if: success()137        run: |138            counter=160139            function do_docker_logs {140                docker logs --details parachain-fork  2>&1141            }142            function is_started {143                echo "Check Docker logs"144                DOCKER_LOGS=$(do_docker_logs)145                if [[ ${DOCKER_LOGS} = *"🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"* ]];then146                     echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"147                     return 0148                     exit 0149                fi150                     echo "Function is_started: Return 1"151                     return 1152            }153            while ! is_started; do154                echo "Waiting for special message in log files "155                sleep 30s156                counter=$(( $counter - 1 ))157                echo "Counter: $counter"158                if [ "$counter" -gt "0" ]; then159                     continue160                else161                     break162                fi163            done164            exit 1165        shell: bash166167      - name: Collect Docker Logs168        if: success() || failure()169        uses: jwalton/gh-docker-logs@v2.2.0170        with:171          dest: './fork-parachain-update-withdata-logs.${{ matrix.features }}'172          images: 'parachain-fork' 173174      - name: Tar logs175        if: success() || failure()176        run: tar cvzf ./fork-parachain-update-withdata-logs.${{ matrix.features }}.tgz ./fork-parachain-update-withdata-logs.${{ matrix.features }}177178      - name: Upload logs to GitHub179        if: success() || failure()180        uses: actions/upload-artifact@master181        with:182          name: fork-parachain-update-withdata-logs.${{ matrix.features }}.tgz183          path: ./fork-parachain-update-withdata-logs.${{ matrix.features }}.tgz184185      - name: Stop running containers186        if: always()                   # run this step always187        run: docker-compose -f ".docker/forking/docker-compose-fork.yaml" -f ".docker/forking/docker-compose.${{ matrix.network }}.yml" down
after · .github/workflows/fork-update-withdata.yml
1name: Fork Parachain update with data23# 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 }}2122# A workflow run is made up of one or more jobs that can run sequentially or in parallel23jobs:2425  prepare-execution-marix-fork:26    27    name: Prepare execution matrix for fork28    29    runs-on: self-hosted-ci30    outputs:31      matrix: ${{ steps.create_matrix.outputs.matrix }}32    steps:33      34      - name: Clean Workspace35        uses: AutoModality/action-clean@v1.1.03637      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it38      - uses: actions/checkout@v339        with:40          ref: ${{ github.head_ref }}  #Checking out head commit4142      - name: Read .env file43        uses: xom9ikk/dotenv@v1.0.24445      - name: Create Execution matrix46        uses: fabiocaccamo/create-matrix-action@v247        id: create_matrix48        with:49          matrix: |50            network {Opal}, runtime {opal}, features {opal-runtime}, mainnet_branch {${{ env.OPAL_MAINNET_TAG }}}, fork_from_address {'wss://eu-ws-opal.unique.network:443'}51            network {Quartz}, runtime {quartz}, features {quartz-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}}, fork_from_address {'wss://eu-ws-quartz.unique.network:443'}52            network {Unique}, runtime {unique}, features {unique-runtime}, mainnet_branch {${{ env.UNIQUE_MAINNET_TAG }}}, fork_from_address {'wss://eu-ws.unique.network:443'}53545556  fork-update-withdata:57    needs: prepare-execution-marix-fork58    # The type of runner that the job will run on59    runs-on: self-hosted-ci6061    name: Build Container, Spin it Up an test6263    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.6465    strategy:66      matrix:67        include: ${{fromJson(needs.prepare-execution-marix-fork.outputs.matrix)}}6869    steps:70      - name: Skip if pull request is in Draft71        # `if: github.event.pull_request.draft == true` should be kept here, at72        # the step level, rather than at the job level. The latter is not73        # recommended because when the PR is moved from "Draft" to "Ready to74        # review" the workflow will immediately be passing (since it was skipped),75        # even though it hasn't actually ran, since it takes a few seconds for76        # the workflow to start. This is also disclosed in:77        # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/1778        # That scenario would open an opportunity for the check to be bypassed:79        # 1. Get your PR approved80        # 2. Move it to Draft81        # 3. Push whatever commits you want82        # 4. Move it to "Ready for review"; now the workflow is passing (it was83        #    skipped) and "Check reviews" is also passing (it won't be updated84        #    until the workflow is finished)85        if: github.event.pull_request.draft == true86        run: exit 18788      - name: Clean Workspace89        uses: AutoModality/action-clean@v1.1.09091      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it92      - uses: actions/checkout@v393        with:94          ref: ${{ github.head_ref }}  #Checking out head commit9596      - name: Read .env file97        uses: xom9ikk/dotenv@v1.0.29899      - name: Generate ENV related extend file for docker-compose100        uses: cuchi/jinja2-action@v1.2.0101        with:102          template: .docker/forking/docker-compose.tmp-fork.j2103          output_file: .docker/forking/docker-compose.${{ matrix.network }}.yml104          variables: |105            REPO_URL=${{ github.server_url }}/${{ github.repository }}.git106            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}107            POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}108            POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}109            MAINNET_TAG=${{ matrix.mainnet_tag }}110            MAINNET_BRANCH=${{ matrix.mainnet_branch }}111            FEATURE=${{ matrix.features }}112            RUNTIME=${{ matrix.runtime }}113            BRANCH=${{ github.head_ref }}114            FORK_FROM=${{ matrix.fork_from_address }}115116      - name: Show build configuration117        run: cat .docker/forking/docker-compose.${{ matrix.network }}.yml118119      - name: Generate launch-config-fork.json120        uses: cuchi/jinja2-action@v1.2.0121        with:122          template: .docker/forking/launch-config-fork.j2123          output_file: .docker/forking/launch-config-fork.json124          variables: |125            FEATURE=${{ matrix.features }}126            RUNTIME=${{ matrix.runtime }}127128      - name: Show launch-config-fork configuration129        run: cat .docker/forking/launch-config-fork.json130131132      - name: Build the stack133        run: docker-compose -f ".docker/forking/docker-compose-fork.yaml" -f ".docker/forking/docker-compose.${{ matrix.network }}.yml" up -d --build  --force-recreate --timeout 300134135      - name: Check if docker logs consist logs related to Runtime Upgrade testing.136        if: success()137        run: |138            counter=160139            function do_docker_logs {140                docker logs --details parachain-fork  2>&1141            }142            function is_started {143                echo "Check Docker logs"144                DOCKER_LOGS=$(do_docker_logs)145                if [[ ${DOCKER_LOGS} = *"🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"* ]];then146                     echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"147                     return 0148                     exit 0149                fi150                     echo "Function is_started: Return 1"151                     return 1152            }153            while ! is_started; do154                echo "Waiting for special message in log files "155                sleep 30s156                counter=$(( $counter - 1 ))157                echo "Counter: $counter"158                if [ "$counter" -gt "0" ]; then159                     continue160                else161                     break162                fi163            done164            exit 1165        shell: bash166167      - name: Collect Docker Logs168        if: success() || failure()169        uses: jwalton/gh-docker-logs@v2.2.0170        with:171          dest: './fork-parachain-update-withdata-logs.${{ matrix.features }}'172          images: 'parachain-fork' 173174      - name: Tar logs175        if: success() || failure()176        run: tar cvzf ./fork-parachain-update-withdata-logs.${{ matrix.features }}.tgz ./fork-parachain-update-withdata-logs.${{ matrix.features }}177178      - name: Upload logs to GitHub179        if: success() || failure()180        uses: actions/upload-artifact@master181        with:182          name: fork-parachain-update-withdata-logs.${{ matrix.features }}.tgz183          path: ./fork-parachain-update-withdata-logs.${{ matrix.features }}.tgz184185      - name: Stop running containers186        if: always()                   # run this step always187        run: docker-compose -f ".docker/forking/docker-compose-fork.yaml" -f ".docker/forking/docker-compose.${{ matrix.network }}.yml" down
modified.github/workflows/try-runtime.ymldiffbeforeafterboth
--- a/.github/workflows/try-runtime.yml
+++ b/.github/workflows/try-runtime.yml
@@ -64,9 +64,9 @@
         id: create_matrix
         with:
           matrix: |
-            network {Opal}, features {opal-runtime}, fork_from_address {wss://eu-ws-opal.unique.network:443}
-            network {Quartz}, features {quartz-runtime}, fork_from_address {wss://eu-ws-quartz.unique.network:443}
-            network {Unique}, features {unique-runtime}, fork_from_address {wss://eu-ws.unique.network:443}
+            network {Opal}, features {opal-runtime}, fork_from_address {'wss://eu-ws-opal.unique.network:443'}
+            network {Quartz}, features {quartz-runtime}, fork_from_address {'wss://eu-ws-quartz.unique.network:443'}
+            network {Unique}, features {unique-runtime}, fork_from_address {'wss://eu-ws.unique.network:443'}