2022-11-30 23:52:03 +00:00
|
|
|
name: Continuous Deployment (Internal Testnet)
|
|
|
|
# run after every successful CI job of new commits to the master branch
|
|
|
|
on:
|
|
|
|
workflow_run:
|
2022-12-08 17:30:12 +00:00
|
|
|
workflows: [Continuous Integration (Kava Master)]
|
2022-11-30 23:52:03 +00:00
|
|
|
types:
|
|
|
|
- completed
|
2022-12-08 17:30:12 +00:00
|
|
|
|
2022-11-30 23:52:03 +00:00
|
|
|
jobs:
|
2022-12-08 17:30:12 +00:00
|
|
|
# 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:
|
2022-12-08 18:35:20 +00:00
|
|
|
# only start cd pipeline if last ci run was successful
|
2023-04-06 18:23:46 +00:00
|
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
2022-12-08 17:30:12 +00:00
|
|
|
uses: ./.github/workflows/cd-reset-internal-testnet.yml
|
|
|
|
with:
|
|
|
|
aws-region: us-east-1
|
2022-12-14 20:41:53 +00:00
|
|
|
chain-id: kava_2221-17000
|
|
|
|
ssm-document-name: kava-testnet-internal-node-update
|
2022-12-08 17:30:12 +00:00
|
|
|
playbook-name: reset-internal-testnet-playbook.yml
|
2022-12-08 18:35:20 +00:00
|
|
|
playbook-infrastructure-branch: master
|
2022-12-08 17:30:12 +00:00
|
|
|
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
|
2022-12-14 20:41:53 +00:00
|
|
|
chain-id: kava_2221-17000
|
|
|
|
ssm-document-name: kava-testnet-internal-node-update
|
2022-12-08 17:30:12 +00:00
|
|
|
playbook-name: start-chain-api-playbook.yml
|
2022-12-08 18:35:20 +00:00
|
|
|
playbook-infrastructure-branch: master
|
2022-12-08 17:30:12 +00:00
|
|
|
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
|
2022-12-08 18:35:20 +00:00
|
|
|
with:
|
2022-12-14 20:41:53 +00:00
|
|
|
chain-api-url: https://rpc.app.internal.testnet.us-east.production.kava.io:443
|
2022-12-08 18:35:20 +00:00
|
|
|
chain-id: kava_2221-17000
|
|
|
|
seed-script-filename: seed-internal-testnet.sh
|
2022-12-14 20:41:53 +00:00
|
|
|
erc20-deployer-network-name: internal_testnet
|
2023-03-31 22:41:11 +00:00
|
|
|
genesis_validator_addresses: "kavavaloper1xcgtffvv2yeqmgs3yz4gv29kgjrj8usxrnrlwp kavavaloper1w66m9hdzwgd6uc8g93zqkcumgwzrpcw958sh3s"
|
2023-04-06 20:51:42 +00:00
|
|
|
kava_version_filepath: ./ci/env/kava-internal-testnet/KAVA.VERSION
|
2022-12-08 17:30:12 +00:00
|
|
|
secrets: inherit
|
|
|
|
needs: [start-chain-api]
|
2022-12-15 22:07:54 +00:00
|
|
|
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]
|