From d671c29c1037730304387ea26d3773bd38c8d2cd Mon Sep 17 00:00:00 2001 From: Levi Schoen Date: Thu, 13 Apr 2023 10:43:22 -0700 Subject: [PATCH] add manually triggerable cd job for internal testnet --- .../workflows/cd-internal-testnet-manual.yml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/cd-internal-testnet-manual.yml diff --git a/.github/workflows/cd-internal-testnet-manual.yml b/.github/workflows/cd-internal-testnet-manual.yml new file mode 100644 index 00000000..102396ec --- /dev/null +++ b/.github/workflows/cd-internal-testnet-manual.yml @@ -0,0 +1,56 @@ +name: Manual Deployment (Internal Testnet) +# allow to be triggered manually +on: workflow_dispatch + +jobs: + # in order: + # enter standby (prevents autoscaling group from killing node during deploy) + # stop kava + # take ebs + zfs snapshots + # download updated binary and genesis + # reset application database state (only done on internal testnet) + reset-chain-to-zero-state: + # only start cd pipeline if last ci run was successful + if: ${{ github.event.workflow_run.conclusion == 'success' }} + uses: ./.github/workflows/cd-reset-internal-testnet.yml + with: + aws-region: us-east-1 + chain-id: kava_2221-17000 + ssm-document-name: kava-testnet-internal-node-update + playbook-name: reset-internal-testnet-playbook.yml + playbook-infrastructure-branch: master + secrets: inherit + + # start kava with new binary and genesis state on api, peer and seed nodes, place nodes in service once they start and are synched to live + start-chain-api: + uses: ./.github/workflows/cd-start-chain.yml + with: + aws-region: us-east-1 + chain-id: kava_2221-17000 + ssm-document-name: kava-testnet-internal-node-update + playbook-name: start-chain-api-playbook.yml + playbook-infrastructure-branch: master + secrets: inherit + needs: [reset-chain-to-zero-state] + + # setup test and development accounts and balances, deploy contracts by calling the chain's api + seed-chain-state: + uses: ./.github/workflows/cd-seed-chain.yml + with: + chain-api-url: https://rpc.app.internal.testnet.us-east.production.kava.io:443 + chain-id: kava_2221-17000 + seed-script-filename: seed-internal-testnet.sh + erc20-deployer-network-name: internal_testnet + genesis_validator_addresses: "kavavaloper1xcgtffvv2yeqmgs3yz4gv29kgjrj8usxrnrlwp kavavaloper1w66m9hdzwgd6uc8g93zqkcumgwzrpcw958sh3s" + kava_version_filepath: ./ci/env/kava-internal-testnet/KAVA.VERSION + secrets: inherit + needs: [start-chain-api] + post-pipeline-metrics: + uses: ./.github/workflows/metric-pipeline.yml + if: always() # always run so we metric failures and successes + with: + aws-region: us-east-1 + metric-name: kava.deploys.testnet.internal + namespace: Kava/ContinuousDeployment + secrets: inherit + needs: [seed-chain-state]