Skip to content

Commit

Permalink
Merge branch 'staging' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrossy committed Jul 31, 2019
2 parents 87763cd + a17a99c commit 6ab7e6e
Show file tree
Hide file tree
Showing 187 changed files with 2,893 additions and 1,873 deletions.
112 changes: 112 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,42 @@ jobs:

- run: yarn run ci-lint

build-all-packages:
<<: *defaults
steps:
- attach_workspace:
at: ~/app

- run:
name: Build SDK
command: |
set -e
yarn --cwd=packages/contractkit build alfajores
- run:
name: Build CLI
command: |
yarn --cwd=packages/cli setup:environment alfajores
yarn --cwd=packages/cli build
- run:
name: Build mobile
command: yarn --cwd=packages/mobile build

- run:
name: Build Verification Pool
command: yarn --cwd=packages/verification-pool-api compile-typescript

- run:
name: Build Verifier
command: yarn --cwd=packages/verifier build:typescript

- run:
name: Build Web
command: |
set -e
yarn --cwd=packages/web build
general-test:
<<: *defaults
steps:
Expand Down Expand Up @@ -128,6 +164,12 @@ jobs:
- attach_workspace:
at: ~/app

- run:
name: Ensure translations are not missing
command: |
set -euo pipefail
diff <(cat packages/mobile/locales/en-US/*.json | jq keys | sort) <(cat packages/mobile/locales/es-AR/*.json | jq keys | sort)
- run:
name: jest tests
command: |
Expand Down Expand Up @@ -182,6 +224,27 @@ jobs:
# Flaky tests - run them twice
command: yarn --cwd packages/protocol test || yarn --cwd packages/protocol test

contractkit-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: test alphanet
command: |
# Test alphanet
set -euo pipefail
yarn --cwd=packages/contractkit build alfajores
yarn --cwd=packages/contractkit test
- run:
name: test alphanet staging
command: |
# Test alphanet
set -euo pipefail
yarn --cwd=packages/contractkit build alfajoresstaging
yarn --cwd=packages/contractkit test
cli-test:
<<: *defaults
steps:
Expand Down Expand Up @@ -282,6 +345,35 @@ jobs:
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
./ci_test_sync.sh checkout master
end-to-end-geth-integration-sync-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/app
- run:
name: Check if the test should run
command: |
DIRS_TO_CHECK="${PWD}/packages/celotool,${PWD}/packages/protocol"
./scripts/ci_check_if_test_should_run_v2.sh ${DIRS_TO_CHECK}
- run:
name: Setup Go language
command: |
set -e
set -v
wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
tar xf go1.11.5.linux-amd64.tar.gz -C /tmp
ls /tmp/go/bin/go
/tmp/go/bin/go version
- run:
name: Run test
command: |
set -e
export PATH=${PATH}:/tmp/go/bin
go version
cd packages/celotool
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
./ci_test_integration_sync.sh checkout master
web:
working_directory: ~/app
docker:
Expand All @@ -301,10 +393,22 @@ workflows:
- lint-checks:
requires:
- install_dependencies
- build-all-packages:
requires:
- install_dependencies
- lint-checks
- general-test:
requires:
- install_dependencies
- lint-checks
- contractkit-test:
requires:
- install_dependencies
- lint-checks
- cli-test:
requires:
- install_dependencies
- lint-checks
- mobile-test:
requires:
- install_dependencies
Expand All @@ -320,12 +424,20 @@ workflows:
- protocol-test:
requires:
- install_dependencies
- lint-checks
- end-to-end-geth-transfer-test:
requires:
- install_dependencies
- lint-checks
- end-to-end-geth-governance-test:
requires:
- install_dependencies
- lint-checks
- end-to-end-geth-sync-test:
requires:
- install_dependencies
- lint-checks
- end-to-end-geth-integration-sync-test:
requires:
- install_dependencies
- lint-checks
3 changes: 0 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ EPOCH=30000
VALIDATORS="3"
STATIC_IPS_FOR_GETH_NODES=false

# requires STATIC_IPS_FOR_GETH_NODES to be false
INTERNAL_BOOTNODE=true

GETHTX1_NODE_ID="1182aa8c9dbb96cd1aa71b74e2b6b481085971e08b210bab3b64c39d54876d4b1370f3f2c3cc3c0f52806a0e5772aa3fe937b4ceda8b97c5bf647a34170555e4"
GETHTX2_NODE_ID="b1d8deee4e5f4faf9b7e8e7fbd5e19545632d9023ff10de55e2e7a37464c52d1d6fb3ac8cb011757558b37309b83d915de19ef86eb27fe13209cc02d0098ee1f"
GETHTX3_NODE_ID="7f8b950b57ef0189637375e1aab3c6cc089501063089242ccdfb3982045025feeb64fdf343b08f2534372f5d636fa6804150c14e40bc2d395057a834c6be3932"
Expand Down
4 changes: 1 addition & 3 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BLOCKSCOUT_WEB_DOCKER_IMAGE_TAG="web-f6c3e0888d1d0ef72dc8bf870808702b7fd13730"
BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG="indexer-f6c3e0888d1d0ef72dc8bf870808702b7fd13730"
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_DB_SUFFIX="6"
BLOCKSCOUT_SUBNETWORK_NAME="Alfajores"

GETH_NODE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/geth"
# When upgrading change this to latest commit hash from the master of the geth repo
Expand Down Expand Up @@ -46,9 +47,6 @@ VALIDATORS=70
TX_NODES=10
STATIC_IPS_FOR_GETH_NODES=true

# requires STATIC_IPS_FOR_GETH_NODES to be false
INTERNAL_BOOTNODE=false

ADMIN_RPC_ENABLED=false

# Testnet vars
Expand Down
4 changes: 1 addition & 3 deletions .env.alfajoresstaging
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BLOCKSCOUT_WEB_DOCKER_IMAGE_TAG="web-f6c3e0888d1d0ef72dc8bf870808702b7fd13730"
BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG="indexer-f6c3e0888d1d0ef72dc8bf870808702b7fd13730"
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_DB_SUFFIX="8"
BLOCKSCOUT_SUBNETWORK_NAME="Alfajores Staging"

GETH_NODE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/geth"
# When upgrading change this to latest commit hash from the master of the geth repo
Expand Down Expand Up @@ -43,9 +44,6 @@ VALIDATORS=70
TX_NODES=10
STATIC_IPS_FOR_GETH_NODES=true

# requires STATIC_IPS_FOR_GETH_NODES to be false
INTERNAL_BOOTNODE=false

ADMIN_RPC_ENABLED=false

# Testnet vars
Expand Down
4 changes: 1 addition & 3 deletions .env.appintegration
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BLOCKSCOUT_WEB_DOCKER_IMAGE_TAG="web-af8cefc512035b8fea9fd61e2828b9b9d6f2ae96"
BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG="indexer-af8cefc512035b8fea9fd61e2828b9b9d6f2ae96"
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_DB_SUFFIX="5"
BLOCKSCOUT_SUBNETWORK_NAME="App Integration"

GETH_NODE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/geth"
GETH_NODE_DOCKER_IMAGE_TAG="94c7a784fe0e44737c4f2637b52ead0f6d98a26c"
Expand All @@ -39,9 +40,6 @@ VALIDATORS=10
TX_NODES=4
STATIC_IPS_FOR_GETH_NODES=false

# requires STATIC_IPS_FOR_GETH_NODES to be false
INTERNAL_BOOTNODE=false

ADMIN_RPC_ENABLED=false

# Testnet vars
Expand Down
4 changes: 1 addition & 3 deletions .env.integration
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BLOCKSCOUT_WEB_DOCKER_IMAGE_TAG="web-fb9a5bd46a0968865ef30cc568a260f01cb7fdaf"
BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG="indexer-fb9a5bd46a0968865ef30cc568a260f01cb7fdaf"
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_DB_SUFFIX="15"
BLOCKSCOUT_SUBNETWORK_NAME="Integration"

GETH_NODE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/geth"
# When upgrading change this to latest commit hash from the master of the geth repo
Expand Down Expand Up @@ -46,9 +47,6 @@ VALIDATORS=1
TX_NODES=1
STATIC_IPS_FOR_GETH_NODES=false

# requires STATIC_IPS_FOR_GETH_NODES to be false
INTERNAL_BOOTNODE=false

ADMIN_RPC_ENABLED=false

# Testnet vars
Expand Down
4 changes: 1 addition & 3 deletions .env.integrationtesting
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BLOCKSCOUT_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/blockscout"
BLOCKSCOUT_WEB_DOCKER_IMAGE_TAG="web-ea15cfd04caedc7dfb8b23342ece8a9e61963cc1"
BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG="indexer-6448af74c2032ef02e45bf3534b15ceb4c1622ad"
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_SUBNETWORK_NAME="Integration Testing"

GETH_NODE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/geth"
GETH_NODE_DOCKER_IMAGE_TAG="eb90e01af7b9f2b336279374471a00e16ff66614"
Expand All @@ -37,9 +38,6 @@ BLOCK_TIME=5
VALIDATORS=1
TX_NODES=1

# requires STATIC_IPS_FOR_GETH_NODES to be false
INTERNAL_BOOTNODE=false

# Testnet vars
GETH_NODES_BACKUP_CRONJOB_ENABLED=true
CONTRACT_CRONJOBS_ENABLED=true
Expand Down
75 changes: 75 additions & 0 deletions .env.pilot
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
ENV_TYPE="production"

GETH_VERBOSITY=2

KUBERNETES_CLUSTER_NAME="pilot"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"

TESTNET_PROJECT_NAME="celo-testnet-production"

BLOCKSCOUT_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/blockscout"
BLOCKSCOUT_WEB_DOCKER_IMAGE_TAG="web-f6c3e0888d1d0ef72dc8bf870808702b7fd13730"
BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG="indexer-f6c3e0888d1d0ef72dc8bf870808702b7fd13730"
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_DB_SUFFIX="1"
BLOCKSCOUT_SUBNETWORK_NAME="Pilot"

GETH_NODE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/geth"
# When upgrading change this to latest commit hash from the master of the geth repo
# `geth $ git show | head -n 1`
GETH_NODE_DOCKER_IMAGE_TAG="58a4453c22504e3367a4d95177320acda4c5b061"

GETH_BOOTNODE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/geth-all"
# When upgrading change this to latest commit hash from the master of the geth repo
# `geth $ git show | head -n 1`
GETH_BOOTNODE_DOCKER_IMAGE_TAG="58a4453c22504e3367a4d95177320acda4c5b061"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-2616309a839a30e53faecfafb9b68ab51a5fcdcf"

TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-2616309a839a30e53faecfafb9b68ab51a5fcdcf"

GETH_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet-production/geth-exporter"
GETH_EXPORTER_DOCKER_IMAGE_TAG="ed7d21bd50592709173368cd697ef73c1774a261"

# Genesis Vars
NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
PREDEPLOYED_CONTRACTS="REGISTRY"
BLOCK_TIME=5
EPOCH=17280 // Minimum epoch length is 1 day

# "og" -> our original 4 tx nodes, "${n}" -> for deriving n tx nodes from the MNEMONIC
# NOTE: we only create static IPs when TX_NODES is set to "og"
VALIDATORS=10
TX_NODES=2
STATIC_IPS_FOR_GETH_NODES=false

ADMIN_RPC_ENABLED=false

# Testnet vars
GETH_NODES_BACKUP_CRONJOB_ENABLED=true
CONTRACT_CRONJOBS_ENABLED=true
CLUSTER_CREATION_FLAGS="--enable-autoscaling --min-nodes 3 --max-nodes 8 --machine-type=n1-standard-4"


GETH_NODE_CPU_REQUEST=400m
GETH_NODE_MEMORY_REQUEST=2.5G

VERIFICATION_POOL_URL="https://us-central1-celo-testnet-production.cloudfunctions.net/handleVerificationRequestpilot/v0.1/sms/"
VERIFICATION_REWARDS_URL="https://us-central1-celo-testnet-production.cloudfunctions.net/handleVerificationRequestpilot/v0.1/rewards/"

STACKDRIVER_MONITORING_DASHBOARD="https://app.google.stackdriver.com/dashboards/18188447122939770939?project=celo-testnet-production"
STACKDRIVER_NOTIFICATION_CHANNEL="11334674278687022983"
MOBILE_WALLET_PLAYSTORE_LINK="https://play.google.com/apps/internaltest/4700990475000634666"

NOTIFICATION_SERVICE_FIREBASE_DB="https://console.firebase.google.com/u/0/project/celo-org-mobile/database/celo-org-mobile-int/data"

PROMTOSD_SCRAPE_INTERVAL="5m"
PROMTOSD_EXPORT_INTERVAL="5m"

AUCTION_CRON_SPEC="*/5 * * * *"

SMS_RETRIEVER_HASH_CODE=l5k6LvdPDXS
Loading

0 comments on commit 6ab7e6e

Please sign in to comment.