difftreelog
chainql in env file
in: master
5 files changed
.docker/Dockerfile-parachain-upgrade-data.j2diffbeforeafterboth--- a/.docker/Dockerfile-parachain-upgrade-data.j2
+++ b/.docker/Dockerfile-parachain-upgrade-data.j2
@@ -66,7 +66,7 @@
COPY --from=builder-unique-target /unique_parachain/.docker/forkless-config/fork.jsonnet /polkadot-launch/fork.jsonnet
COPY --from=builder-unique-target /unique_parachain/.docker/forkless-config/typeNames.jsonnet /polkadot-launch/typeNames.jsonnet
-COPY --from=uniquenetwork/builder-chainql:latest /chainql/target/release/chainql /chainql/target/release/
+COPY --from=uniquenetwork/builder-chainql:{{ CHAINQL }} /chainql/target/release/chainql /chainql/target/release/
COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/
COPY --from=polkadot /unique_parachain/polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm /polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm
.docker/Dockerfile-xcm.j2diffbeforeafterboth--- a/.docker/Dockerfile-xcm.j2
+++ b/.docker/Dockerfile-xcm.j2
@@ -60,7 +60,7 @@
COPY --from=uniquenetwork/builder-cumulus:{{ CUMULUS_BUILD_BRANCH }} /unique_parachain/cumulus/target/release/polkadot-parachain /cumulus/target/release/cumulus
COPY --from=uniquenetwork/builder-acala:{{ ACALA_BUILD_BRANCH }} /unique_parachain/Acala/target/production/acala /acala/target/release/
COPY --from=uniquenetwork/builder-astar:{{ ASTAR_BUILD_BRANCH }} /unique_parachain/astar/target/release/astar /astar/target/release/
-COPY --from=uniquenetwork/builder-chainql:latest /chainql/target/release/chainql /chainql/target/release/
+COPY --from=uniquenetwork/builder-chainql:{{ CHAINQL }} /chainql/target/release/chainql /chainql/target/release/
EXPOSE 9844
EXPOSE 9933
.envdiffbeforeafterboth--- a/.env
+++ b/.env
@@ -1,6 +1,7 @@
RUST_TOOLCHAIN=nightly-2022-11-15
POLKADOT_LAUNCH_BRANCH=unique-network
RELAY_CHAIN_TYPE=westend
+CHAINQL=v0.4.0
POLKADOT_MAINNET_BRANCH=release-v0.9.37
STATEMINT_BUILD_BRANCH=release-parachains-v9370
.github/workflows/forkless-update-data.ymldiffbeforeafterboth1# Forkless update with data replication2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586869792/Forkless+update+with+data34# Triger: only call from main workflow(re-usable workflows)5on:6 workflow_call:789# A workflow run is made up of one or more jobs that can run sequentially or in parallel10jobs:1112 prepare-execution-marix:1314 name: Prepare execution matrix1516 runs-on: self-hosted-ci17 outputs:18 matrix: ${{ steps.create_matrix.outputs.matrix }}1920 steps:2122 - name: Clean Workspace23 uses: AutoModality/action-clean@v1.1.02425 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it26 - uses: actions/checkout@v3.1.027 with:28 ref: ${{ github.head_ref }} #Checking out head commit2930 - name: Read .env file31 uses: xom9ikk/dotenv@v23233 - name: Create Execution matrix34 uses: CertainLach/create-matrix-action@v435 id: create_matrix36 with:37 matrix: |38 network {quartz}, wasm_name {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}39 network {unique}, wasm_name {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}40 network {opal}, wasm_name {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}41 network {sapphire}, wasm_name {quartz}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, replica_from_address {${{ env.SAPPHIRE_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}}4243 forkless-data-build:44 needs: prepare-execution-marix45 # The type of runner that the job will run on46 runs-on: [self-hosted-ci,large]47 timeout-minutes: 13804849 name: ${{ matrix.network }}-data-build50 strategy:51 matrix:52 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}5354 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.5556 steps:57 - name: Clean Workspace58 uses: AutoModality/action-clean@v1.1.05960 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it61 - uses: actions/checkout@v3.1.062 with:63 ref: ${{ github.head_ref }} #Checking out head commit6465 - name: Read .env file66 uses: xom9ikk/dotenv@v26768 # Prepare SHA 69 - name: Prepare SHA70 uses: ./.github/actions/prepare7172 # Build main image for FORKLESS-UPDATE-NODATA73 - name: Generate ENV related extend Dockerfile file74 uses: cuchi/jinja2-action@v1.2.075 with:76 template: .docker/Dockerfile-parachain-upgrade-data.j277 output_file: .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml78 variables: |79 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}80 NETWORK=${{ matrix.network }}81 MAINNET_BRANCH=${{ matrix.mainnet_branch }}82 WASM_NAME=${{ matrix.wasm_name }}83 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}84 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}85 REPLICA_FROM=${{ matrix.replica_from_address }}8687 - name: Show build configuration88 run: cat .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml8990 - name: Generate launch-config-forkless-data.json91 uses: cuchi/jinja2-action@v1.2.092 with:93 template: .docker/forkless-config/launch-config-forkless-data.j294 output_file: .docker/forkless-config/launch-config-forkless-data.json95 variables: |96 WASM_NAME=${{ matrix.wasm_name }}97 RELAY_CHAIN_TYPE=${{ env.RELAY_CHAIN_TYPE }}98 REPLICA_FROM=${{ matrix.replica_from_address }} 99100 - name: Show launch-config-forkless configuration101 run: cat .docker/forkless-config/launch-config-forkless-data.json102103 - name: Run find-and-replace to remove slashes from branch name104 uses: mad9000/actions-find-and-replace-string@4105 id: branchname106 with:107 source: ${{ github.head_ref }}108 find: '/'109 replace: '-'110111 - name: Set build SHA112 shell: bash113 run: |114 echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV115116 - name: Build the stack117 run: cd .docker/ && docker build --no-cache --file ./Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml --tag uniquenetwork/ci-forkless-data-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA ../118119 - name: Log in to Docker Hub120 uses: docker/login-action@v2.1.0121 with:122 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}123 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}124125 - name: Push docker image version126 run: docker push uniquenetwork/ci-forkless-data-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA127128 - name: Remove builder cache129 if: always() # run this step always130 run: |131 docker builder prune -f132 docker system prune -f133134 forkless-data-tests:135 needs: [prepare-execution-marix, forkless-data-build]136 # The type of runner that the job will run on137 runs-on: [self-hosted-ci, large]138139 timeout-minutes: 600140141 name: ${{ matrix.network }}-data-tests142143 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.144145 strategy:146 matrix:147 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}148149 steps:150 - name: Skip if pull request is in Draft151 if: github.event.pull_request.draft == true152 run: exit 1153154 - name: Clean Workspace155 uses: AutoModality/action-clean@v1.1.0156157 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it158 - uses: actions/checkout@v3.1.0159 with:160 ref: ${{ github.head_ref }} #Checking out head commit161162 - name: Prepare163 uses: ./.github/actions/prepare164165 - name: Set build SHA166 shell: bash167 run: |168 echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV169170 - name: Run find-and-replace to remove slashes from branch name171 uses: mad9000/actions-find-and-replace-string@4172 id: branchname173 with:174 source: ${{ github.head_ref }}175 find: '/'176 replace: '-'177178 - name: Read .env file179 uses: xom9ikk/dotenv@v2180181 - name: Generate ENV related extend file for docker-compose182 uses: cuchi/jinja2-action@v1.2.0183 with:184 template: .docker/docker-compose.forkless-data.j2185 output_file: .docker/docker-compose.forkless-data.${{ matrix.network }}.yml186 variables: |187 NETWORK=${{ matrix.network }}188 BUILD_TAG=${{ steps.branchname.outputs.value }}-$BUILD_SHA189190 - name: Show build configuration191 run: cat .docker/docker-compose.forkless-data.${{ matrix.network }}.yml192193 - name: Log in to Docker Hub194 uses: docker/login-action@v2.1.0195 with:196 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}197 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}198199 - name: Build the stack200 run: docker-compose -f ".docker/docker-compose.forkless-data.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300201202 - uses: actions/setup-node@v3.5.1203 with:204 node-version: 16205206 - name: Check if docker logs consist logs related to Runtime Upgrade testing.207 if: success()208 run: |209 counter=160210 function check_container_status {211 docker inspect -f {{.State.Running}} forkless-data212 }213 function do_docker_logs {214 docker logs --details forkless-data 2>&1215 }216 function is_started {217 if [ "$(check_container_status)" == "true" ]; then218 echo "Container: forkless-data RUNNING";219 echo "Check Docker logs"220 DOCKER_LOGS=$(do_docker_logs)221 if [[ ${DOCKER_LOGS} = *"🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"* ]];then222 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"223 return 0224 elif [[ ${DOCKER_LOGS} = *"🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"* ]];then225 echo "🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"226 return 1227 else228 echo "Message not found in logs output, repeating..."229 return 1230 fi231 else232 echo "Container forkless-data not RUNNING"233 echo "Halting all future checks"234 exit 1235 fi236 exit 0237 }238 while ! is_started; do239 echo "Waiting for special message in log files "240 sleep 30s241 counter=$(( $counter - 1 ))242 echo "Counter: $counter"243 if [ "$counter" -gt "0" ]; then244 continue245 else246 break247 fi248 done249 echo "Halting script"250 exit 0251 shell: bash252253 - name: Collect Docker Logs254 if: success() || failure()255 uses: jwalton/gh-docker-logs@v2.2.1256 with:257 dest: './forkless-parachain-upgrade-data-logs.${{ matrix.features }}'258259 - name: Show Docker logs260 if: success() || failure()261 run: cat './forkless-parachain-upgrade-data-logs.${{ matrix.features }}/forkless-data.log'262263 - name: Stop running containers264 if: always() # run this step always265 run: docker-compose -f ".docker/docker-compose.forkless-data.${{ matrix.network }}.yml" down --volumes266267 - name: Remove builder cache268 if: always() # run this step always269 run: |270 docker builder prune -f -a271 docker system prune -f272 docker image prune -f -a1# Forkless update with data replication2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586869792/Forkless+update+with+data34# Triger: only call from main workflow(re-usable workflows)5on:6 workflow_call:789# A workflow run is made up of one or more jobs that can run sequentially or in parallel10jobs:1112 prepare-execution-marix:1314 name: Prepare execution matrix1516 runs-on: self-hosted-ci17 outputs:18 matrix: ${{ steps.create_matrix.outputs.matrix }}1920 steps:2122 - name: Clean Workspace23 uses: AutoModality/action-clean@v1.1.02425 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it26 - uses: actions/checkout@v3.1.027 with:28 ref: ${{ github.head_ref }} #Checking out head commit2930 - name: Read .env file31 uses: xom9ikk/dotenv@v23233 - name: Create Execution matrix34 uses: CertainLach/create-matrix-action@v435 id: create_matrix36 with:37 matrix: |38 network {quartz}, wasm_name {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}39 network {unique}, wasm_name {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}40 network {opal}, wasm_name {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}41 network {sapphire}, wasm_name {quartz}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, replica_from_address {${{ env.SAPPHIRE_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}}4243 forkless-data-build:44 needs: prepare-execution-marix45 # The type of runner that the job will run on46 runs-on: [self-hosted-ci,large]47 timeout-minutes: 13804849 name: ${{ matrix.network }}-data-build50 strategy:51 matrix:52 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}5354 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.5556 steps:57 - name: Clean Workspace58 uses: AutoModality/action-clean@v1.1.05960 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it61 - uses: actions/checkout@v3.1.062 with:63 ref: ${{ github.head_ref }} #Checking out head commit6465 - name: Read .env file66 uses: xom9ikk/dotenv@v26768 # Prepare SHA 69 - name: Prepare SHA70 uses: ./.github/actions/prepare7172 # Build main image for FORKLESS-UPDATE-NODATA73 - name: Generate ENV related extend Dockerfile file74 uses: cuchi/jinja2-action@v1.2.075 with:76 template: .docker/Dockerfile-parachain-upgrade-data.j277 output_file: .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml78 variables: |79 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}80 NETWORK=${{ matrix.network }}81 MAINNET_BRANCH=${{ matrix.mainnet_branch }}82 WASM_NAME=${{ matrix.wasm_name }}83 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}84 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}85 REPLICA_FROM=${{ matrix.replica_from_address }}86 CHAINQL=${{ env.CHAINQL }}8788 - name: Show build configuration89 run: cat .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml9091 - name: Generate launch-config-forkless-data.json92 uses: cuchi/jinja2-action@v1.2.093 with:94 template: .docker/forkless-config/launch-config-forkless-data.j295 output_file: .docker/forkless-config/launch-config-forkless-data.json96 variables: |97 WASM_NAME=${{ matrix.wasm_name }}98 RELAY_CHAIN_TYPE=${{ env.RELAY_CHAIN_TYPE }}99 REPLICA_FROM=${{ matrix.replica_from_address }} 100101 - name: Show launch-config-forkless configuration102 run: cat .docker/forkless-config/launch-config-forkless-data.json103104 - name: Run find-and-replace to remove slashes from branch name105 uses: mad9000/actions-find-and-replace-string@4106 id: branchname107 with:108 source: ${{ github.head_ref }}109 find: '/'110 replace: '-'111112 - name: Set build SHA113 shell: bash114 run: |115 echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV116117 - name: Build the stack118 run: cd .docker/ && docker build --no-cache --file ./Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml --tag uniquenetwork/ci-forkless-data-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA ../119120 - name: Log in to Docker Hub121 uses: docker/login-action@v2.1.0122 with:123 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}124 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}125126 - name: Push docker image version127 run: docker push uniquenetwork/ci-forkless-data-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA128129 - name: Remove builder cache130 if: always() # run this step always131 run: |132 docker builder prune -f133 docker system prune -f134135 forkless-data-tests:136 needs: [prepare-execution-marix, forkless-data-build]137 # The type of runner that the job will run on138 runs-on: [self-hosted-ci, large]139140 timeout-minutes: 600141142 name: ${{ matrix.network }}-data-tests143144 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.145146 strategy:147 matrix:148 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}149150 steps:151 - name: Skip if pull request is in Draft152 if: github.event.pull_request.draft == true153 run: exit 1154155 - name: Clean Workspace156 uses: AutoModality/action-clean@v1.1.0157158 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it159 - uses: actions/checkout@v3.1.0160 with:161 ref: ${{ github.head_ref }} #Checking out head commit162163 - name: Prepare164 uses: ./.github/actions/prepare165166 - name: Set build SHA167 shell: bash168 run: |169 echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV170171 - name: Run find-and-replace to remove slashes from branch name172 uses: mad9000/actions-find-and-replace-string@4173 id: branchname174 with:175 source: ${{ github.head_ref }}176 find: '/'177 replace: '-'178179 - name: Read .env file180 uses: xom9ikk/dotenv@v2181182 - name: Generate ENV related extend file for docker-compose183 uses: cuchi/jinja2-action@v1.2.0184 with:185 template: .docker/docker-compose.forkless-data.j2186 output_file: .docker/docker-compose.forkless-data.${{ matrix.network }}.yml187 variables: |188 NETWORK=${{ matrix.network }}189 BUILD_TAG=${{ steps.branchname.outputs.value }}-$BUILD_SHA190191 - name: Show build configuration192 run: cat .docker/docker-compose.forkless-data.${{ matrix.network }}.yml193194 - name: Log in to Docker Hub195 uses: docker/login-action@v2.1.0196 with:197 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}198 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}199200 - name: Build the stack201 run: docker-compose -f ".docker/docker-compose.forkless-data.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300202203 - uses: actions/setup-node@v3.5.1204 with:205 node-version: 16206207 - name: Check if docker logs consist logs related to Runtime Upgrade testing.208 if: success()209 run: |210 counter=160211 function check_container_status {212 docker inspect -f {{.State.Running}} forkless-data213 }214 function do_docker_logs {215 docker logs --details forkless-data 2>&1216 }217 function is_started {218 if [ "$(check_container_status)" == "true" ]; then219 echo "Container: forkless-data RUNNING";220 echo "Check Docker logs"221 DOCKER_LOGS=$(do_docker_logs)222 if [[ ${DOCKER_LOGS} = *"🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"* ]];then223 echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"224 return 0225 elif [[ ${DOCKER_LOGS} = *"🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"* ]];then226 echo "🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"227 return 1228 else229 echo "Message not found in logs output, repeating..."230 return 1231 fi232 else233 echo "Container forkless-data not RUNNING"234 echo "Halting all future checks"235 exit 1236 fi237 exit 0238 }239 while ! is_started; do240 echo "Waiting for special message in log files "241 sleep 30s242 counter=$(( $counter - 1 ))243 echo "Counter: $counter"244 if [ "$counter" -gt "0" ]; then245 continue246 else247 break248 fi249 done250 echo "Halting script"251 exit 0252 shell: bash253254 - name: Collect Docker Logs255 if: success() || failure()256 uses: jwalton/gh-docker-logs@v2.2.1257 with:258 dest: './forkless-parachain-upgrade-data-logs.${{ matrix.features }}'259260 - name: Show Docker logs261 if: success() || failure()262 run: cat './forkless-parachain-upgrade-data-logs.${{ matrix.features }}/forkless-data.log'263264 - name: Stop running containers265 if: always() # run this step always266 run: docker-compose -f ".docker/docker-compose.forkless-data.${{ matrix.network }}.yml" down --volumes267268 - name: Remove builder cache269 if: always() # run this step always270 run: |271 docker builder prune -f -a272 docker system prune -f273 docker image prune -f -a.github/workflows/xcm.ymldiffbeforeafterboth--- a/.github/workflows/xcm.yml
+++ b/.github/workflows/xcm.yml
@@ -251,9 +251,43 @@
fi
shell: bash
- - name: Pull chainql docker image
- run: docker pull uniquenetwork/builder-chainql:latest
+ # Check CHAINQL version and build it if it doesn't exist in repository
+ - name: Generate ENV related extend Dockerfile file for CHAINQL
+ uses: cuchi/jinja2-action@v1.2.0
+ with:
+ template: .docker/Dockerfile-chainql.j2
+ output_file: .docker/Dockerfile-chainql.${{ env.CHAINQL }}.yml
+ variables: |
+ RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
+ CHAINQL=${{ env.CHAINQL }}
+
+ - name: Check if the dockerhub repository contains the needed CHAINQL version
+ run: |
+ # aquire token
+ TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
+ export TOKEN=$TOKEN
+
+ # Get TAGS from DOCKERHUB repository
+ CHAINQL_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-chainql/tags/?page_size=100 | jq -r '."results"[]["name"]')
+ # Show TAGS
+ echo "CHAINQL TAGS:"
+ echo $CHAINQL_TAGS
+ # Check correct version CHAINQL and build it if it doesn't exist in CHAINQL TAGS
+ if [[ ${CHAINQL_TAGS[*]} =~ (^|[[:space:]])"${{ env.CHAINQL }}"($|[[:space:]]) ]]; then
+ echo "Repository has needed CHAINQL version";
+ docker pull uniquenetwork/builder-chainql:${{ env.CHAINQL }}
+ else
+ echo "Repository has not needed CHAINQL version, so build it";
+ cd .docker/ && docker build --no-cache --file ./Dockerfile-chainql.${{ env.CHAINQL }}.yml --tag uniquenetwork/builder-chainql:${{ env.CHAINQL }} .
+ echo "Push needed CHAINQL version to the repository";
+ docker push uniquenetwork/builder-chainql:${{ env.CHAINQL }}
+ fi
+ shell: bash
+
+ # - name: Pull chainql docker image
+ # run: docker pull uniquenetwork/builder-chainql:${{ env.CHAINQL }}
+
- name: Generate ENV related extend launch-config file
uses: cuchi/jinja2-action@v1.2.0
with:
@@ -281,6 +315,7 @@
ASTAR_BUILD_BRANCH=${{ matrix.astar_version }}
MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }}
CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }}
+ CHAINQL=${{ env.CHAINQL }}
- name: Show build Dockerfile
run: cat .docker/Dockerfile-xcm.${{ matrix.network }}.yml