difftreelog
xcm testnet workflow
in: master
4 files changed
.docker/Dockerfile-testnet.j2diffbeforeafterbothno changes
.docker/Dockerfile-xcm-2diffbeforeafterbothno changes
.docker/Dockerfile-xcm.j2diffbeforeafterbothno changes
.github/workflows/xcm-testnet.ymldiffbeforeafterboth1name: upgrade nodata1name: xcm testnet223# Controls when the action will run.3# Controls when the action will run.4on:4on:303031 name: Prepare execution matrix31 name: Prepare execution matrix323233 runs-on: XL33 runs-on: XL234 outputs:34 outputs:35 matrix: ${{ steps.create_matrix.outputs.matrix }}35 matrix: ${{ steps.create_matrix.outputs.matrix }}363659 xcm-build:59 xcm-build:60 needs: prepare-execution-marix60 needs: prepare-execution-marix61 # The type of runner that the job will run on61 # The type of runner that the job will run on62 runs-on: [XL]62 runs-on: [XL2]636364 timeout-minutes: 60064 timeout-minutes: 60065657373747475 steps:75 steps:76 - name: Skip if pull request is in Draft76 #- name: Skip if pull request is in Draft77 # `if: github.event.pull_request.draft == true` should be kept here, at77 # `if: github.event.pull_request.draft == true` should be kept here, at78 # the step level, rather than at the job level. The latter is not78 # the step level, rather than at the job level. The latter is not79 # recommended because when the PR is moved from "Draft" to "Ready to79 # recommended because when the PR is moved from "Draft" to "Ready to88 # 4. Move it to "Ready for review"; now the workflow is passing (it was88 # 4. Move it to "Ready for review"; now the workflow is passing (it was89 # skipped) and "Check reviews" is also passing (it won't be updated89 # skipped) and "Check reviews" is also passing (it won't be updated90 # until the workflow is finished)90 # until the workflow is finished)91 if: github.event.pull_request.draft == true91 # if: github.event.pull_request.draft == true92 run: exit 192 #run: exit 1939394 - name: Clean Workspace94 - name: Clean Workspace95 uses: AutoModality/action-clean@v1.1.095 uses: AutoModality/action-clean@v1.1.0102 - name: Read .env file102 - name: Read .env file103 uses: xom9ikk/dotenv@v1.0.2103 uses: xom9ikk/dotenv@v1.0.2104104105 - name: Generate ENV related extend file for docker-compose105 - name: Generate ENV related extend Dockerfile file106 uses: cuchi/jinja2-action@v1.2.0106 uses: cuchi/jinja2-action@v1.2.0107 with:107 with:108 template: .docker/docker-compose.tmp-xcm.j2108 template: .docker/Dockerfile-xcm.j2109 output_file: .docker/docker-compose-xcm.${{ matrix.network }}.yml109 output_file: .docker/Dockerfile-xcm.${{ matrix.network }}.yml110 variables: |110 variables: |111 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git111 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}112 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}112 NETWORK=${{ matrix.network }}113 NETWORK=${{ matrix.network }}113 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}114 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}114 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}115 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}116 MAINNET_BRANCH=${{ matrix.mainnet_branch }}115 FEATURE=${{ matrix.features }}117 FEATURE=${{ matrix.features }}116 RUNTIME=${{ matrix.runtime }}118 RUNTIME=${{ matrix.runtime }}117 BRANCH=${{ github.head_ref }}119 BRANCH=${{ github.head_ref }}118 ACALA_BUILD_BRANCH=${{ env.ACALA_BUILD_BRANCH }}120 ACALA_BUILD_BRANCH=${{ env.ACALA_BUILD_BRANCH }}119 MOONBEAM_BUILD_BRANCH=${{ env.MOONBEAM_BUILD_BRANCH }}121 MOONBEAM_BUILD_BRANCH=${{ env.MOONBEAM_BUILD_BRANCH }}120 CUMULUS_BUILD_BRANCH=${{ env.CUMULUS_BUILD_BRANCH }}122 CUMULUS_BUILD_BRANCH=${{ env.CUMULUS_BUILD_BRANCH }}123121124 - name: Show build configuration122 - name: Show build Dockerfile125 run: cat .docker/docker-compose-xcm.${{ matrix.network }}.yml123 run: cat .docker/Dockerfile-xcm.${{ matrix.network }}.yml126124127 - name: Show launch-config-xcm-${{ matrix.network }} configuration125 - name: Show launch-config-xcm-${{ matrix.network }} configuration128 run: cat .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json126 run: cat .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json129127130 - name: Build the stack128 - name: Build the stack131 run: docker-compose -f ".docker/docker-compose-xcm.yml" -f ".docker/docker-compose-xcm.${{ matrix.network }}.yml" up -d --build129 run: cd .docker/ && docker build --file ./Dockerfile-xcm.${{ matrix.network }}.yml --tag xcm-nodes-${{ matrix.network }} --tag uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ github.head_ref }}-${{ github.sha }} --tag uniquenetwork/xcm-${{ matrix.network }}-testnet-local:latest .132130133 - name: Collect Docker Logs131 - name: Collect Docker Logs134 if: success() || failure()132 if: success() || failure()141 if: success() || failure()139 if: success() || failure()142 run: cat './xcm-build-logs.${{ matrix.features }}/xcm-nodes-${{ matrix.network }}.log'140 run: cat './xcm-build-logs.${{ matrix.features }}/xcm-nodes-${{ matrix.network }}.log'143144 - name: Stop running containers145 if: always() # run this step always146 run: docker-compose -f ".docker/docker-compose-xcm.yml" -f ".docker/docker-compose-xcm.${{ matrix.network }}.yml" down147141148 - name: Log in to Docker Hub142 - name: Log in to Docker Hub149 uses: docker/login-action143 uses: docker/login-action@v2.0.0150 with:144 with:151 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}145 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}152 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}146 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}153147154 - name: Tag docker image148 - name: Push docker version image 155 run: docker tag xcm_nodes_${{ matrix.network }} uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ github.head_ref }}-${{ github.sha }}149 run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ github.head_ref }}-${{ github.sha }}156150157 - name: Push docker image151 - name: Push docker image latest158 run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ github.head_ref }}-${{ github.sha }}152 run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:latest159160 testnet-build:161 needs: prepare-execution-marix162 # The type of runner that the job will run on163 runs-on: [XL]164165 timeout-minutes: 600166167 name: ${{ matrix.network }}168169 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.170171 strategy:172 matrix:173 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}174175 steps:176 - name: Skip if pull request is in Draft177 # `if: github.event.pull_request.draft == true` should be kept here, at178 # the step level, rather than at the job level. The latter is not179 # recommended because when the PR is moved from "Draft" to "Ready to180 # review" the workflow will immediately be passing (since it was skipped),181 # even though it hasn't actually ran, since it takes a few seconds for182 # the workflow to start. This is also disclosed in:183 # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17184 # That scenario would open an opportunity for the check to be bypassed:185 # 1. Get your PR approved186 # 2. Move it to Draft187 # 3. Push whatever commits you want188 # 4. Move it to "Ready for review"; now the workflow is passing (it was189 # skipped) and "Check reviews" is also passing (it won't be updated190 # until the workflow is finished)191 if: github.event.pull_request.draft == true192 run: exit 1193194 - name: Clean Workspace195 uses: AutoModality/action-clean@v1.1.0196197 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it198 - uses: actions/checkout@v3199 with:200 ref: ${{ github.head_ref }} #Checking out head commit201202 - name: Read .env file203 uses: xom9ikk/dotenv@v1.0.2204205 - name: Generate ENV related extend file for docker-compose206 uses: cuchi/jinja2-action@v1.2.0207 with:208 template: .docker/docker-compose.tmp-testnet.j2209 output_file: .docker/docker-compose-testnet.${{ matrix.network }}.yml210 variables: |211 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git212 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}213 NETWORK=${{ matrix.network }}214 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}215 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}216 MAINNET_BRANCH=${{ matrix.mainnet_branch }}217 FEATURE=${{ matrix.features }}218 RUNTIME=${{ matrix.runtime }}219 BRANCH=${{ github.head_ref }}220221 - name: Show build configuration222 run: cat .docker/docker-compose-testnet.${{ matrix.network }}.yml223224 - name: Build the stack225 run: docker-compose -f ".docker/docker-compose-testnet.yml" -f ".docker/docker-compose-testnet.${{ matrix.network }}.yml" up -d --build226227 - name: Collect Docker Logs228 if: success() || failure()229 uses: jwalton/gh-docker-logs@v2.2.0230 with:231 dest: './testnet-build-logs.${{ matrix.features }}'232 images: 'testnet_node_${{ matrix.network }}'233234 - name: Show docker logs235 if: success() || failure()236 run: cat './testnet-build-logs.${{ matrix.features }}/testnet_node_${{ matrix.network }}.log'237238 - name: Stop running containers239 if: always() # run this step always240 run: docker-compose -f ".docker/docker-compose-testnet.yml" -f ".docker/docker-compose-testnet.${{ matrix.network }}.yml" down241242 - name: Log in to Docker Hub243 uses: docker/login-action244 with:245 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}246 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}247248 - name: Tag docker image249 run: docker tag testnet_node_${{ matrix.network }} uniquenetwork/${{ matrix.network }}-testnet-local:nightly-${{ github.head_ref }}-${{ github.sha }}250251 - name: Push docker image252 run: docker push uniquenetwork/${{ matrix.network }}-testnet-local:nightly-${{ github.head_ref }}-${{ github.sha }}253153254255