From 7d6f09c39ef0e0942ce2d57fe31f9196e1de3f45 Mon Sep 17 00:00:00 2001 From: yash10019coder Date: Fri, 27 Sep 2024 19:21:09 +0530 Subject: [PATCH 01/14] add input for passing enterprise blobbers in the action by default this will be false. --- deploy-0chain/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy-0chain/action.yml b/deploy-0chain/action.yml index 686f2435..f4f8b87d 100644 --- a/deploy-0chain/action.yml +++ b/deploy-0chain/action.yml @@ -16,6 +16,10 @@ inputs: description: 'blobber DOCKER IMAGE to deploy' default: '' required: false + is_enterprise_blobbers: + description: 'flag to enable enterprise blobbers' + default: 'false' + required: false validator_image: description: 'validator DOCKER IMAGE to deploy' default: '' @@ -423,7 +427,7 @@ runs: --set blobber.config.block_worker=https://${{ env.NAMESPACE }}.devnet-0chain.net/dns \ --set validator.config.block_worker=https://${{ env.NAMESPACE }}.devnet-0chain.net/dns \ --set blobber.config.delegate_wallet=591d6d0d5642bdbc924756ca2647b4b59adce0acd02a487ecc4d1bd4669293a8 \ - --set blobber.config.is_enterprise="false" \ + --set blobber.config.is_enterprise=${{ input.is_enterprise_blobbers }} \ --set validator.config.delegate_wallet=591d6d0d5642bdbc924756ca2647b4b59adce0acd02a487ecc4d1bd4669293a8 \ --set blobber.hostName=${{ env.NAMESPACE }} \ --set blobber.host=devnet-0chain.net \ From afa7b7e90bebf0fdba8ecbee69943dc916c44b97 Mon Sep 17 00:00:00 2001 From: yash10019coder Date: Mon, 21 Oct 2024 01:19:05 +0530 Subject: [PATCH 02/14] add input for using egosdk as a flag in run-system-tests-tokenomics-action. --- run-system-tests-tokenomics/action.yml | 66 +++++++++++++++++++++----- 1 file changed, 55 insertions(+), 11 deletions(-) diff --git a/run-system-tests-tokenomics/action.yml b/run-system-tests-tokenomics/action.yml index f0ba1770..11565957 100644 --- a/run-system-tests-tokenomics/action.yml +++ b/run-system-tests-tokenomics/action.yml @@ -38,6 +38,10 @@ inputs: required: true default: "NONE" description: 'custom gosdk version. Will upgrade CLI branches with this before running tests' + use_egosdk: + required: false + default: "false" + description: 'use egosdk instead of gosdk for enterprise blobbers network' tokenomics_test_filter: required: false default: "" @@ -91,8 +95,15 @@ runs: ./check-params.sh "${{inputs.zwallet_cli_branch}}" "${{ env.SNAPSHOT_BRANCH_ZWALLETCLI }}" "ZWALLET_BRANCH" ./check-params.sh "${{inputs.system_tests_branch}}" "${{ env.SNAPSHOT_BRANCH_SYSTEM_TEST }}" "SYSTEM_TESTS_BRANCH" ./check-params.sh "${{inputs.s3_migration_cli_branch}}" "${{ env.SNAPSHOT_BRANCH_S3-MIGRATION }}" "S3_MIGRATION_BRANCH" + + if [[ ${{inputs.use_egosdk}}== "false" ]] + then ./check-params.sh "${{inputs.custom_go_sdk_version}}" "${{ env.SNAPSHOT_BRANCH_GOSDK }}" "GOSDK_VERSION" + else + ./check-param.sh "${{inputs.custom_go_sdk_version}}" "${{ env.SNAPSHOT_BRANCH_EGOSDK }}" "GOSDK_VERSION" + fi + echo "USE_EGOSDK=$(echo ${{inputs.use_egosdk}})" >> $GITHUB_ENV echo "NETWORK_URL=$(echo ${{ inputs.network }})" >> $GITHUB_ENV echo "GOMODCACHE=/root/actions-runner${RUNNER_NAME:(-1)}/_work/_tool/go/pkg/mod" >> $GITHUB_ENV echo "GOCACHE=/root/actions-runner${RUNNER_NAME:(-1)}/_work/_tool/.cache/go-build" >> $GITHUB_ENV @@ -127,7 +138,14 @@ runs: echo "0wallet CLI branch: [${{ env.ZWALLET_BRANCH }}]" echo "s3 migration CLI branch: [${{ env.S3_MIGRATION_BRANCH }}]" echo "Ethereum node URL: [https://virtual.mainnet.rpc.tenderly.co/${{ inputs.TENDERLY_VIRTUAL_TESTNET_RPC_ID }}]" - echo "Custom gosdk version: [${{ env.GOSDK_VERSION }}]" + + if [[ "${{env.USE_EGOSDK}}" == "false" ]] + then + echo "Custom gosdk version: [${{ env.GOSDK_VERSION }}]" + else + echo "Custom egosdk version: [${{ env.GOSDK_VERSION }}]" + fi + echo "Test file filter: [${{ inputs.test_file_filter }}]" echo "Running Tokenomics tests: [${{ env.RUN_TOKENOMICS_SYSTEM_TESTS }}]" @@ -205,7 +223,13 @@ runs: echo "==============================================================" echo - GOSDK_HEAD=$(curl -s -H "Authorization: token ${{ inputs.svc_account_secret }}" https://api.github.com/repos/0chain/gosdk/git/refs/heads/${{ env.GOSDK_VERSION }} | jq -r '.object.sha') + if [[ "${{env.USE_EGOSDK}}" == "false" ]]; + then + GOSDK_HEAD=$(curl -s -H "Authorization: token ${{ inputs.svc_account_secret }}" https://api.github.com/repos/0chain/gosdk/git/refs/heads/${{ env.GOSDK_VERSION }} | jq -r '.object.sha') + else + GOSDK_HEAD=$(curl -s -H "Authorization: token ${{ inputs.svc_account_secret }}" https://api.github.com/repos/0chain/egosdk/git/refs/heads/${{ env.GOSDK_VERSION }} | jq -r '.object.sha') + fi + if [[ "$GOSDK_HEAD" == "null" ]]; then echo "[${{ env.GOSDK_VERSION }}] does not seem to be a valid branch (possibly a commit hash?). Will pass directly to go to resolve" GOSDK_HEAD="${{ env.GOSDK_VERSION }}" @@ -213,7 +237,14 @@ runs: echo '#!/bin/bash echo "Upgrading [$2] to GOSDK [${{ env.GOSDK_VERSION }}($1)]" - go get github.com/0chain/gosdk@$1 || { echo "::error title=Failed to retrieve gosdk::failed to retrieve gosdk [${{ env.GOSDK_VERSION }}]" && exit 1; } + + if [[ "${{env.USE_EGOSDK}}" == "false" ]]; + then + go get github.com/0chain/gosdk@$1 || { echo "::error title=Failed to retrieve gosdk::failed to retrieve gosdk [${{ env.GOSDK_VERSION }}]" && exit 1; } + else + go get github.com/0chain/egosdk@$1 || { echo "::error title=Failed to retrieve egosdk::failed to retrieve egosdk [${{ env.GOSDK_VERSION }}]" && exit 1; } + fi + go mod tidy || { echo "::error title=Failed to upgrade $2 gosdk::failed to upgrade $2 gosdk to [${{ env.GOSDK_VERSION }}]" && exit 1; } ' > ./upgrade-gosdk.sh; chmod 555 ./upgrade-gosdk.sh @@ -279,15 +310,21 @@ runs: (./zbox version --configDir ./config --config ./zbox_config.yaml --wallet ../ignore --silent | grep -A2 'Version info' | sed "s/Version info:/ZBox Version Info:/") || true - name: "Set up frontend tests" - if: ${{ env.RUN_FRONTEND_TESTS == 'true' }} + if: ${{ env.RUN_FRONTEND_TESTS == 'true' }} shell: 'script --return --quiet --command "bash {0}"' run: | echo echo "======================================================" echo "SETTING WASM TESTS:" echo "======================================================" - git clone -q https://github.com/0chain/gosdk.git - cd gosdk + if [[ "${{env.USE_EGOSDK}}" == "false" ]]; + then + git clone -q https://github.com/0chain/gosdk.git + cd gosdk + else + git clone -q https://github.com/0chain/egosdk.git + cd egosdk + fi if [[ -n "${{ env.GOSDK_VERSION }}" && "${{ env.GOSDK_VERSION }}" != "NONE" ]]; then @@ -296,8 +333,8 @@ runs: cd .. - - name: Run frontend Tests - if: ${{ env.RUN_FRONTEND_TESTS == 'true' && env.RUN_SUBSET_OF_TESTS == 'false' }} + - name: Run frontend Tests with normal gosdk. + if: ${{ env.RUN_FRONTEND_TESTS == 'true' && inputs.use_egosdk == 'false' && env.RUN_SUBSET_OF_TESTS == 'false' }} uses: cypress-io/github-action@v5 with: working-directory: ./gosdk/wasmsdk/cypress @@ -305,11 +342,18 @@ runs: install-command: yarn start:system-tests start: yarn start - + - name: Run frontend Tests with egosdk. + if: ${{ env.RUN_FRONTEND_TESTS == 'true' && inputs.use_egosdk == 'true' && env.RUN_SUBSET_OF_TESTS == 'false' }} + uses: cypress-io/github-action@v5 + with: + working-directory: ./egosdk/wasmsdk/cypress + record: false + install-command: yarn start:system-tests + start: yarn start - name: "Run Tokenomics System Tests" shell: 'script --return --quiet --command "bash {0}"' - if: ${{ env.RUN_TOKENOMICS_SYSTEM_TESTS == 'true' && env.RUN_TOKENOMICS_SUBSET_OF_TESTS == 'false' && 'true' == 'false' }} + if: ${{ env.RUN_TOKENOMICS_SYSTEM_TESTS == 'true' && env.RUN_TOKENOMICS_SUBSET_OF_TESTS == 'false' && 'true' == 'false' }} run: | echo echo "======================================================" @@ -350,7 +394,7 @@ runs: exit $tokenomics_system_tests_exit_code - name: "Run subset of TOKENOMICS System Tests" - if: ${{ env.RUN_TOKENOMICS_SUBSET_OF_TESTS == 'true' }} + if: ${{ env.RUN_TOKENOMICS_SUBSET_OF_TESTS == 'true' }} shell: 'script --return --quiet --command "bash {0}"' run: | echo From 07ad38fed231ad774591c5d41e388530423f8ebb Mon Sep 17 00:00:00 2001 From: yash10019coder Date: Mon, 21 Oct 2024 04:10:54 +0530 Subject: [PATCH 03/14] nit fixes. --- deploy-0chain/action.yml | 5 +++-- run-system-tests-tokenomics/action.yml | 14 +++----------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/deploy-0chain/action.yml b/deploy-0chain/action.yml index 0ee16190..f6717961 100644 --- a/deploy-0chain/action.yml +++ b/deploy-0chain/action.yml @@ -185,6 +185,7 @@ runs: echo "GRAPHNODE_SC=$(echo ${{ inputs.graphnode_sc }})" >> $GITHUB_ENV echo "GRAPHNODE_NETWORK=$(echo ${{ inputs.graphnode_network }})" >> $GITHUB_ENV echo "GRAPHNODE_ETHEREUM_NODE_URL=$(echo ${{ inputs.graphnode_ethereum_node_url }})" >> $GITHUB_ENV + echo "IS_EBLOBBER=$(echo ${{ inputs.is_enterprise_blobbers }})" >> $GITHUB_ENV if [[ "${RUNNER_NAME:(-1)}" == "t" ]];then echo "RUNNER_NUMBER=st" >> $GITHUB_ENV @@ -428,7 +429,7 @@ runs: --set blobber.config.block_worker=https://${{ env.NAMESPACE }}.devnet-0chain.net/dns \ --set validator.config.block_worker=https://${{ env.NAMESPACE }}.devnet-0chain.net/dns \ --set blobber.config.delegate_wallet=591d6d0d5642bdbc924756ca2647b4b59adce0acd02a487ecc4d1bd4669293a8 \ - --set blobber.config.is_enterprise=${{ input.is_enterprise_blobbers }} \ + --set blobber.config.is_enterprise=${{ env.IS_EBLOBBER }} \ --set validator.config.delegate_wallet=591d6d0d5642bdbc924756ca2647b4b59adce0acd02a487ecc4d1bd4669293a8 \ --set blobber.hostName=${{ env.NAMESPACE }} \ --set blobber.host=devnet-0chain.net \ @@ -791,7 +792,7 @@ runs: # echo "ADDING LATEST HARFORK" # echo "===========================================================" - + # echo '{"client_id":"1746b06bb09f55ee01b33b5e2e055d6cc7a900cb57c0a3a5eaabb8a0e7745802","client_key":"7b630ba670dac2f22d43c2399b70eff378689a53ee03ea20957bb7e73df016200fea410ba5102558b0c39617e5afd2c1843b161a1dedec15e1ab40543a78a518","keys":[{"public_key":"7b630ba670dac2f22d43c2399b70eff378689a53ee03ea20957bb7e73df016200fea410ba5102558b0c39617e5afd2c1843b161a1dedec15e1ab40543a78a518","private_key":"c06b6f6945ba02d5a3be86b8779deca63bb636ce7e46804a479c50e53c864915"}],"mnemonics":"cactus panther essence ability copper fox wise actual need cousin boat uncover ride diamond group jacket anchor current float rely tragic omit child payment","version":"1.0","date_created":"2021-08-04 18:53:56.949069945 +0100 BST m=+0.018986002"}' > owner_wallet.json # ./zwallet mn-update-config --keys cost.add_hardfork --values 100 --wallet owner_wallet.json --config ./zbox_config.yaml --configDir . # ./zwallet add-hardfork -n apollo -r 0 --wallet owner_wallet.json --config ./zbox_config.yaml --configDir . diff --git a/run-system-tests-tokenomics/action.yml b/run-system-tests-tokenomics/action.yml index 11565957..ac1bda9f 100644 --- a/run-system-tests-tokenomics/action.yml +++ b/run-system-tests-tokenomics/action.yml @@ -95,14 +95,8 @@ runs: ./check-params.sh "${{inputs.zwallet_cli_branch}}" "${{ env.SNAPSHOT_BRANCH_ZWALLETCLI }}" "ZWALLET_BRANCH" ./check-params.sh "${{inputs.system_tests_branch}}" "${{ env.SNAPSHOT_BRANCH_SYSTEM_TEST }}" "SYSTEM_TESTS_BRANCH" ./check-params.sh "${{inputs.s3_migration_cli_branch}}" "${{ env.SNAPSHOT_BRANCH_S3-MIGRATION }}" "S3_MIGRATION_BRANCH" - - if [[ ${{inputs.use_egosdk}}== "false" ]] - then ./check-params.sh "${{inputs.custom_go_sdk_version}}" "${{ env.SNAPSHOT_BRANCH_GOSDK }}" "GOSDK_VERSION" - else - ./check-param.sh "${{inputs.custom_go_sdk_version}}" "${{ env.SNAPSHOT_BRANCH_EGOSDK }}" "GOSDK_VERSION" - fi - + echo "USE_EGOSDK=$(echo ${{inputs.use_egosdk}})" >> $GITHUB_ENV echo "NETWORK_URL=$(echo ${{ inputs.network }})" >> $GITHUB_ENV echo "GOMODCACHE=/root/actions-runner${RUNNER_NAME:(-1)}/_work/_tool/go/pkg/mod" >> $GITHUB_ENV @@ -139,8 +133,7 @@ runs: echo "s3 migration CLI branch: [${{ env.S3_MIGRATION_BRANCH }}]" echo "Ethereum node URL: [https://virtual.mainnet.rpc.tenderly.co/${{ inputs.TENDERLY_VIRTUAL_TESTNET_RPC_ID }}]" - if [[ "${{env.USE_EGOSDK}}" == "false" ]] - then + if [[ "${{env.USE_EGOSDK}}" == "false" ]]; then echo "Custom gosdk version: [${{ env.GOSDK_VERSION }}]" else echo "Custom egosdk version: [${{ env.GOSDK_VERSION }}]" @@ -223,8 +216,7 @@ runs: echo "==============================================================" echo - if [[ "${{env.USE_EGOSDK}}" == "false" ]]; - then + if [[ "${{env.USE_EGOSDK}}" == "false" ]]; then GOSDK_HEAD=$(curl -s -H "Authorization: token ${{ inputs.svc_account_secret }}" https://api.github.com/repos/0chain/gosdk/git/refs/heads/${{ env.GOSDK_VERSION }} | jq -r '.object.sha') else GOSDK_HEAD=$(curl -s -H "Authorization: token ${{ inputs.svc_account_secret }}" https://api.github.com/repos/0chain/egosdk/git/refs/heads/${{ env.GOSDK_VERSION }} | jq -r '.object.sha') From 7fbe4b9989486c637f94ffbbb6921fbd77890fef Mon Sep 17 00:00:00 2001 From: yash10019coder Date: Mon, 21 Oct 2024 05:38:35 +0530 Subject: [PATCH 04/14] nit fix add input for using egosdk as a flag in run-system-tests-tokenomics-action. --- run-system-tests-tokenomics/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run-system-tests-tokenomics/action.yml b/run-system-tests-tokenomics/action.yml index ac1bda9f..6f013817 100644 --- a/run-system-tests-tokenomics/action.yml +++ b/run-system-tests-tokenomics/action.yml @@ -95,7 +95,12 @@ runs: ./check-params.sh "${{inputs.zwallet_cli_branch}}" "${{ env.SNAPSHOT_BRANCH_ZWALLETCLI }}" "ZWALLET_BRANCH" ./check-params.sh "${{inputs.system_tests_branch}}" "${{ env.SNAPSHOT_BRANCH_SYSTEM_TEST }}" "SYSTEM_TESTS_BRANCH" ./check-params.sh "${{inputs.s3_migration_cli_branch}}" "${{ env.SNAPSHOT_BRANCH_S3-MIGRATION }}" "S3_MIGRATION_BRANCH" - ./check-params.sh "${{inputs.custom_go_sdk_version}}" "${{ env.SNAPSHOT_BRANCH_GOSDK }}" "GOSDK_VERSION" + + if [[ "${{inputs.use_egosdk}}" == "true" ]]; then + ./check-params.sh "${{inputs.custom_go_sdk_version}}" "${{ env.SNAPSHOT_BRANCH_EGOSDK }}" "GOSDK_VERSION" + else + ./check-params.sh "${{inputs.custom_go_sdk_version}}" "${{ env.SNAPSHOT_BRANCH_GOSDK }}" "GOSDK_VERSION" + fi echo "USE_EGOSDK=$(echo ${{inputs.use_egosdk}})" >> $GITHUB_ENV echo "NETWORK_URL=$(echo ${{ inputs.network }})" >> $GITHUB_ENV From 0ea7c5997cc4bd985cd6e9da12e1fc3725572612 Mon Sep 17 00:00:00 2001 From: yash10019coder Date: Wed, 30 Oct 2024 02:10:37 +0530 Subject: [PATCH 05/14] use go version 1.22 instead of 1.21 in deploy chain actions. --- deploy-0chain-2b2v/action.yml | 4 ++-- deploy-0chain-3b3v/action.yml | 4 ++-- deploy-0chain-fileops-limits/action.yml | 4 ++-- deploy-0chain-minstake/action.yml | 4 ++-- deploy-0chain-tokenomics/action.yml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/deploy-0chain-2b2v/action.yml b/deploy-0chain-2b2v/action.yml index b1d75f93..f21a1dcd 100644 --- a/deploy-0chain-2b2v/action.yml +++ b/deploy-0chain-2b2v/action.yml @@ -440,10 +440,10 @@ runs: ./deploy.sh - - name: Setup go 1.21 + - name: Setup go 1.22 uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' - name: "Checkout 0wallet CLI" uses: actions/checkout@v3 diff --git a/deploy-0chain-3b3v/action.yml b/deploy-0chain-3b3v/action.yml index 0bf09dfd..575ab972 100644 --- a/deploy-0chain-3b3v/action.yml +++ b/deploy-0chain-3b3v/action.yml @@ -440,10 +440,10 @@ runs: ./deploy.sh - - name: Setup go 1.21 + - name: Setup go 1.22 uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' - name: "Checkout 0wallet CLI" uses: actions/checkout@v3 diff --git a/deploy-0chain-fileops-limits/action.yml b/deploy-0chain-fileops-limits/action.yml index abfb3b42..61a859a1 100644 --- a/deploy-0chain-fileops-limits/action.yml +++ b/deploy-0chain-fileops-limits/action.yml @@ -446,10 +446,10 @@ runs: ./deploy.sh - - name: Setup go 1.21 + - name: Setup go 1.22 uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' - name: "Checkout 0wallet CLI" uses: actions/checkout@v3 diff --git a/deploy-0chain-minstake/action.yml b/deploy-0chain-minstake/action.yml index c0f0ea37..d7773966 100644 --- a/deploy-0chain-minstake/action.yml +++ b/deploy-0chain-minstake/action.yml @@ -436,10 +436,10 @@ runs: ./deploy.sh - - name: Setup go 1.21 + - name: Setup go 1.22 uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' - name: "Checkout 0wallet CLI" uses: actions/checkout@v3 diff --git a/deploy-0chain-tokenomics/action.yml b/deploy-0chain-tokenomics/action.yml index 324c0094..56f9c5fd 100644 --- a/deploy-0chain-tokenomics/action.yml +++ b/deploy-0chain-tokenomics/action.yml @@ -438,10 +438,10 @@ runs: ./deploy.sh - - name: Setup go 1.21 + - name: Setup go 1.22 uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' - name: "Checkout 0wallet CLI" uses: actions/checkout@v3 From 2f2dfaa200fc9eeb4b8ea8d6c442362ec5675ce8 Mon Sep 17 00:00:00 2001 From: shahnawaz-creator Date: Tue, 12 Nov 2024 22:07:48 +0530 Subject: [PATCH 06/14] added eblobber deploy functionality into actions repo --- deploy-0chain/action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deploy-0chain/action.yml b/deploy-0chain/action.yml index f6717961..8b1094f4 100644 --- a/deploy-0chain/action.yml +++ b/deploy-0chain/action.yml @@ -414,6 +414,14 @@ runs: ./zwallet add-hardfork -n hercules -r 0 --wallet owner_wallet.json --config ./zbox_config.yaml --configDir . ##############----------------- Installing blobber helm-chart --------------------################### + if [[ "${{ env.IS_EBLOBBER }}" == "true" ]]; then + echo "BLOBBER_DOCKER_REPO=$(echo "0chaindev/eblobber")" >> $GITHUB_ENV + echo "VALIDATOR_DOCKER_REPO=$(echo "0chaindev/evalidator")" >> $GITHUB_ENV + else + echo "BLOBBER_DOCKER_REPO=$(echo "0chaindev/blobber")" >> $GITHUB_ENV + echo "VALIDATOR_DOCKER_REPO=$(echo "0chaindev/validator")" >> $GITHUB_ENV + fi + COUNT=3 #COUNT will be giving 3 try to install the helmchart. RET=1 #You can set RET=0 to skip the blobber helm-chart deployment while [[ $RET -ne 0 && $COUNT -gt 0 ]]; do @@ -435,6 +443,8 @@ runs: --set blobber.host=devnet-0chain.net \ --set blobber.image.tag=${{ env.BLOBBER_TAG }} \ --set validator.image.tag=${{ env.VALIDATOR_TAG }} \ + --set blobber.image.repository=${{ env.BLOBBER_DOCKER_REPO }} \ + --set validator.image.repository=${{ env.VALIDATOR_DOCKER_REPO }} \ --set validator.hostName=${{ env.NAMESPACE }} \ --set validator.host=devnet-0chain.net -n ${{ env.NAMESPACE }} \ 0chain-helm/blobber --kubeconfig ./kube/${{ env.NAMESPACE }}-config From 4bdb917c179060388c7751e28d3afdaec00dbb58 Mon Sep 17 00:00:00 2001 From: yash10019coder Date: Wed, 13 Nov 2024 03:54:40 +0530 Subject: [PATCH 07/14] refactor: blobber image tag for enterprise --- deploy-0chain/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/deploy-0chain/action.yml b/deploy-0chain/action.yml index 8b1094f4..78eea345 100644 --- a/deploy-0chain/action.yml +++ b/deploy-0chain/action.yml @@ -163,8 +163,14 @@ runs: ./check-params.sh "${{inputs.miner_image}}" "${{ env.SNAPSHOT_BRANCH_MINER_TAG }}" "MINER_TAG" ./check-params.sh "${{inputs.sharder_image}}" "${{ env.SNAPSHOT_BRANCH_SHARDER_TAG }}" "SHARDER_TAG" - ./check-params.sh "${{inputs.blobber_image}}" "${{ env.SNAPSHOT_BRANCH_BLOBBER_TAG }}" "BLOBBER_TAG" - ./check-params.sh "${{inputs.validator_image}}" "${{ env.SNAPSHOT_BRANCH_VALIDATOR_TAG }}" "VALIDATOR_TAG" + + if [[ ${{inputs.is_enterprise_blobbers}} == "true" ]]; then + ./check-params.sh "${{inputs.blobber_image}}" "${{ env.SNAPSHOT_BRANCH_EBLOBBER_TAG }}" "BLOBBER_TAG" + ./check-params.sh "${{inputs.validator_image}}" "${{ env.SNAPSHOT_BRANCH_EVALIDATOR_TAG }}" "VALIDATOR_TAG" + else + ./check-params.sh "${{inputs.blobber_image}}" "${{ env.SNAPSHOT_BRANCH_BLOBBER_TAG }}" "BLOBBER_TAG" + ./check-params.sh "${{inputs.validator_image}}" "${{ env.SNAPSHOT_BRANCH_VALIDATOR_TAG }}" "VALIDATOR_TAG" + fi ./check-params.sh "${{inputs.authorizer_image}}" "${{ env.SNAPSHOT_BRANCH_AUTHORIZER_TAG }}" "AUTHORIZER_TAG" ./check-params.sh "${{inputs.zbox_image}}" "${{ env.SNAPSHOT_BRANCH_ZBOX_TAG }}" "ZBOX_TAG" ./check-params.sh "${{inputs.zvault_image}}" "${{ env.SNAPSHOT_BRANCH_ZVAULT_TAG }}" "ZVAULT_TAG" From ea569c8278f0b6664dac780c529b413b1f3199e3 Mon Sep 17 00:00:00 2001 From: shahnawaz-creator <117025384+shahnawaz-creator@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:33:48 +0530 Subject: [PATCH 08/14] fix eblobber action.yml --- deploy-0chain/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-0chain/action.yml b/deploy-0chain/action.yml index 78eea345..888b23cc 100644 --- a/deploy-0chain/action.yml +++ b/deploy-0chain/action.yml @@ -420,7 +420,7 @@ runs: ./zwallet add-hardfork -n hercules -r 0 --wallet owner_wallet.json --config ./zbox_config.yaml --configDir . ##############----------------- Installing blobber helm-chart --------------------################### - if [[ "${{ env.IS_EBLOBBER }}" == "true" ]]; then + if [[ ${{ env.IS_EBLOBBER }} == "true" ]]; then echo "BLOBBER_DOCKER_REPO=$(echo "0chaindev/eblobber")" >> $GITHUB_ENV echo "VALIDATOR_DOCKER_REPO=$(echo "0chaindev/evalidator")" >> $GITHUB_ENV else From 28b206abd1a6b56bd710a563c44ce23b48d3c2f9 Mon Sep 17 00:00:00 2001 From: shahnawaz-creator <117025384+shahnawaz-creator@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:51:11 +0530 Subject: [PATCH 09/14] fix eblobber action.yml --- deploy-0chain/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-0chain/action.yml b/deploy-0chain/action.yml index 888b23cc..c71a59a3 100644 --- a/deploy-0chain/action.yml +++ b/deploy-0chain/action.yml @@ -420,7 +420,7 @@ runs: ./zwallet add-hardfork -n hercules -r 0 --wallet owner_wallet.json --config ./zbox_config.yaml --configDir . ##############----------------- Installing blobber helm-chart --------------------################### - if [[ ${{ env.IS_EBLOBBER }} == "true" ]]; then + if [[ ${{inputs.is_enterprise_blobbers}} == "true" ]]; then echo "BLOBBER_DOCKER_REPO=$(echo "0chaindev/eblobber")" >> $GITHUB_ENV echo "VALIDATOR_DOCKER_REPO=$(echo "0chaindev/evalidator")" >> $GITHUB_ENV else From d282ba5d90e8f15aa31e310f192930aa8c6bc76c Mon Sep 17 00:00:00 2001 From: shahnawaz-creator <117025384+shahnawaz-creator@users.noreply.github.com> Date: Thu, 14 Nov 2024 18:00:24 +0530 Subject: [PATCH 10/14] fix eblobber action.yml --- deploy-0chain/action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy-0chain/action.yml b/deploy-0chain/action.yml index c71a59a3..c30384cf 100644 --- a/deploy-0chain/action.yml +++ b/deploy-0chain/action.yml @@ -420,12 +420,12 @@ runs: ./zwallet add-hardfork -n hercules -r 0 --wallet owner_wallet.json --config ./zbox_config.yaml --configDir . ##############----------------- Installing blobber helm-chart --------------------################### - if [[ ${{inputs.is_enterprise_blobbers}} == "true" ]]; then - echo "BLOBBER_DOCKER_REPO=$(echo "0chaindev/eblobber")" >> $GITHUB_ENV - echo "VALIDATOR_DOCKER_REPO=$(echo "0chaindev/evalidator")" >> $GITHUB_ENV + if [[ "${{ env.IS_EBLOBBER }}" == "true" ]]; then + echo "BLOBBER_DOCKER_REPO=0chaindev/eblobber" >> $GITHUB_ENV + echo "VALIDATOR_DOCKER_REPO=0chaindev/evalidator" >> $GITHUB_ENV else - echo "BLOBBER_DOCKER_REPO=$(echo "0chaindev/blobber")" >> $GITHUB_ENV - echo "VALIDATOR_DOCKER_REPO=$(echo "0chaindev/validator")" >> $GITHUB_ENV + echo "BLOBBER_DOCKER_REPO=0chaindev/blobber" >> $GITHUB_ENV + echo "VALIDATOR_DOCKER_REPO=0chaindev/validator" >> $GITHUB_ENV fi COUNT=3 #COUNT will be giving 3 try to install the helmchart. From 6888039111f01d289efddfbd05385ae63c2889ea Mon Sep 17 00:00:00 2001 From: yash10019coder Date: Mon, 6 Jan 2025 00:52:49 +0530 Subject: [PATCH 11/14] debug. --- get-latest-image-for-branch/action.yaml | 8 ++++++++ resolve-repo-snapshot/action.yaml | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/get-latest-image-for-branch/action.yaml b/get-latest-image-for-branch/action.yaml index ac9ece90..eeac1978 100644 --- a/get-latest-image-for-branch/action.yaml +++ b/get-latest-image-for-branch/action.yaml @@ -17,6 +17,10 @@ inputs: description: 'blobber branch to deploy' default: '' required: false + eblobber_validator_branch: + description: 'eblobber branch to deploy' + default: '' + required: false authorizer_branch: description: 'authorizer branch to deploy' default: '' @@ -59,6 +63,10 @@ outputs: validator-tag: description: "validator docker image" value: ${{ steps.get-images.outputs.VALIDATOR_TAG }} + eblobber-tag: + description: "eblobber docker image" + evalidator-tag: + description: "evalidator docker image" authorizer-tag: description: "authorizer docker image" value: ${{ steps.get-images.outputs.AUTHORIZER_TAG }} diff --git a/resolve-repo-snapshot/action.yaml b/resolve-repo-snapshot/action.yaml index 234593cd..e4793211 100644 --- a/resolve-repo-snapshot/action.yaml +++ b/resolve-repo-snapshot/action.yaml @@ -86,6 +86,7 @@ runs: with: miner_sharder_branch: ${{ env.SNAPSHOT_BRANCH_0CHAIN }} blobber_validator_branch: ${{ env.SNAPSHOT_BRANCH_BLOBBER }} + eblobber_evalidator_branch: ${{ env.SNAPSHOT_BRANCH_EBLOBBER}} authorizer_branch: ${{ env.SNAPSHOT_BRANCH_TOKEN_BRIDGE_AUTHSERVER }} zbox_branch: ${{ env.SNAPSHOT_BRANCH_0BOX }} zvault_branch: ${{ env.SNAPSHOT_BRANCH_ZVAULT }} @@ -114,6 +115,14 @@ runs: echo "SNAPSHOT_BRANCH_VALIDATOR_TAG=$(echo '${{ steps.get-images.outputs.validator-tag }}')" >> $GITHUB_ENV fi + if [[ -n "${{ steps.get-images.outputs.eblobber-tag }}" ]];then + echo "SNAPSHOT_BRANCH_BLOBBER_TAG=$(echo '${{ steps.get-images.outputs.eblobber-tag }}')" >> $GITHUB_ENV + fi + + if [[ -n "${{ steps.get-images.outputs.evalidator-tag }}" ]];then + echo "SNAPSHOT_BRANCH_VALIDATOR_TAG=$(echo '${{ steps.get-images.outputs.evalidator-tag }}')" >> $GITHUB_ENV + fi + if [[ -n "${{ steps.get-images.outputs.authorizer-tag }}" ]];then echo "SNAPSHOT_BRANCH_AUTHORIZER_TAG=$(echo '${{ steps.get-images.outputs.authorizer-tag }}')" >> $GITHUB_ENV fi From a4abdea4f3a8e013e8bb28fd47f793a02de6016e Mon Sep 17 00:00:00 2001 From: yash10019coder Date: Mon, 6 Jan 2025 00:57:44 +0530 Subject: [PATCH 12/14] debug. --- deploy-0chain/action.yml | 2 +- resolve-repo-snapshot/action.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy-0chain/action.yml b/deploy-0chain/action.yml index 0a564577..5daec397 100644 --- a/deploy-0chain/action.yml +++ b/deploy-0chain/action.yml @@ -109,7 +109,7 @@ runs: steps: - name: "Get sprint branch from repo_snapshots_branch" if: ${{ inputs.repo_snapshots_branch != '' }} - uses: 0chain/actions/resolve-repo-snapshot@master + uses: 0chain/actions/resolve-repo-snapshot@feature/add-egosdk-tokenomics-action with: repo_snapshots_branch: ${{ inputs.repo_snapshots_branch }} svc_account_secret: ${{ inputs.svc_account_secret }} diff --git a/resolve-repo-snapshot/action.yaml b/resolve-repo-snapshot/action.yaml index e4793211..dcd211d3 100644 --- a/resolve-repo-snapshot/action.yaml +++ b/resolve-repo-snapshot/action.yaml @@ -82,7 +82,7 @@ runs: - name: "Get docker images for sprint branches" id: get-images if: ${{ inputs.resolve_images == 'true' }} - uses: 0chain/actions/get-latest-image-for-branch@master + uses: 0chain/actions/get-latest-image-for-branch@feature/add-egosdk-tokenomics-action with: miner_sharder_branch: ${{ env.SNAPSHOT_BRANCH_0CHAIN }} blobber_validator_branch: ${{ env.SNAPSHOT_BRANCH_BLOBBER }} From c7daa1c07e9dee62c69311bfc5be5181058c0e89 Mon Sep 17 00:00:00 2001 From: yash10019coder Date: Mon, 6 Jan 2025 01:06:04 +0530 Subject: [PATCH 13/14] debug. --- get-latest-image-for-branch/action.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/get-latest-image-for-branch/action.yaml b/get-latest-image-for-branch/action.yaml index eeac1978..9742956e 100644 --- a/get-latest-image-for-branch/action.yaml +++ b/get-latest-image-for-branch/action.yaml @@ -17,7 +17,7 @@ inputs: description: 'blobber branch to deploy' default: '' required: false - eblobber_validator_branch: + eblobber_evalidator_branch: description: 'eblobber branch to deploy' default: '' required: false @@ -226,6 +226,14 @@ runs: echo "blobber_validator_branch NOT specified, will skip deriving blobber and validator image tag" fi + if [[ -n "${{ inputs.eblobber_evalidator_branch }}" ]]; + then + ./get_tag.sh blobber ${{ inputs.eblobber_evalidator_branch }} blobber + ./get_tag.sh blobber ${{ inputs.eblobber_evalidator_branch }} validator + else + echo "eblobber_evalidator_branch NOT specified, will skip deriving eblobber and evalidator image tag" + fi + if [[ -n "${{ inputs.authorizer_branch }}" ]]; then ./get_tag.sh token_bridge_authserver ${{ inputs.authorizer_branch }} authorizer From 091b900c85922350e34fae2310c4de2664a10067 Mon Sep 17 00:00:00 2001 From: yash10019coder Date: Mon, 6 Jan 2025 01:09:31 +0530 Subject: [PATCH 14/14] debug --- get-latest-image-for-branch/action.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/get-latest-image-for-branch/action.yaml b/get-latest-image-for-branch/action.yaml index 9742956e..6fa836f2 100644 --- a/get-latest-image-for-branch/action.yaml +++ b/get-latest-image-for-branch/action.yaml @@ -65,8 +65,10 @@ outputs: value: ${{ steps.get-images.outputs.VALIDATOR_TAG }} eblobber-tag: description: "eblobber docker image" + value: ${{ steps.get-images.outputs.EBLOBBER_TAG }} evalidator-tag: description: "evalidator docker image" + value: ${{ steps.get-images.outputs.EVALUATOR_TAG }} authorizer-tag: description: "authorizer docker image" value: ${{ steps.get-images.outputs.AUTHORIZER_TAG }} @@ -228,8 +230,8 @@ runs: if [[ -n "${{ inputs.eblobber_evalidator_branch }}" ]]; then - ./get_tag.sh blobber ${{ inputs.eblobber_evalidator_branch }} blobber - ./get_tag.sh blobber ${{ inputs.eblobber_evalidator_branch }} validator + ./get_tag.sh eblobber ${{ inputs.eblobber_evalidator_branch }} eblobber + ./get_tag.sh eblobber ${{ inputs.eblobber_evalidator_branch }} evalidator else echo "eblobber_evalidator_branch NOT specified, will skip deriving eblobber and evalidator image tag" fi