Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .codebuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,25 @@ deploy_hathor_network_account() {

send_slack_message "New version deployed to testnet-hotel: ${GIT_REF_TO_DEPLOY}"

# --- Testnet India ---
# Gets all env vars with `testnetindia_` prefix and re-exports them without the prefix
for var in "${!testnetindia_@}"; do
export ${var#testnetindia_}="${!var}"
done

make migrate;
make build-daemon;
make deploy-lambdas-testnet-india;
# The idea here is that if the lambdas deploy fail, the built image won't be pushed:
make push-daemon;

# Unsets all the testnet env vars so we make sure they don't leak to other deploys
for var in "${!testnetindia_@}"; do
unset ${var#testnetindia_}
done

send_slack_message "New version deployed to testnet-india: ${GIT_REF_TO_DEPLOY}"

# --- Mainnet ---
# Gets all env vars with `mainnet_` prefix and re-exports them without the prefix
for var in "${!mainnet_@}"; do
Expand Down
37 changes: 37 additions & 0 deletions .codebuild/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ env:
testnethotel_PUSH_NOTIFICATION_ENABLED: "true"
testnethotel_PUSH_ALLOWED_PROVIDERS: "android,ios"
testnethotel_APPLICATION_NAME: "wallet-service-testnet-hotel"
testnetindia_DEFAULT_SERVER: "https://wallet-service.private-nodes.india.testnet.hathor.network/v1a/"
testnetindia_WS_DOMAIN: "ws.wallet-service.india.testnet.hathor.network"
testnetindia_NETWORK: "testnet"
testnetindia_LOG_LEVEL: "debug"
testnetindia_NFT_AUTO_REVIEW_ENABLED: "true"
testnetindia_EXPLORER_STAGE: "india"
testnetindia_EXPLORER_SERVICE_LAMBDA_ENDPOINT: "https://lambda.eu-central-1.amazonaws.com"
testnetindia_WALLET_SERVICE_LAMBDA_ENDPOINT: "https://lambda.eu-central-1.amazonaws.com"
testnetindia_PUSH_NOTIFICATION_ENABLED: "true"
testnetindia_PUSH_ALLOWED_PROVIDERS: "android,ios"
testnetindia_APPLICATION_NAME: "wallet-service-testnet-india"
mainnet_staging_DEFAULT_SERVER: "https://wallet-service.private-nodes.hathor.network/v1a/"
mainnet_staging_WS_DOMAIN: "ws.staging.wallet-service.hathor.network"
mainnet_staging_NETWORK: "mainnet"
Expand Down Expand Up @@ -153,6 +164,32 @@ env:
testnethotel_ALERT_MANAGER_REGION: "WalletService/testnet-hotel:ALERT_MANAGER_REGION"
testnethotel_ALERT_MANAGER_TOPIC: "WalletService/testnet-hotel:ALERT_MANAGER_TOPIC"
testnethotel_ALERT_MANAGER_ACCOUNT_ID: "WalletService/testnet-hotel:ALERT_MANAGER_ACCOUNT_ID"
# Testnet India secrets
testnetindia_ACCOUNT_ID: "WalletService/testnet-india:account_id"
testnetindia_AUTH_SECRET: "WalletService/testnet-india:auth_secret"
testnetindia_AWS_VPC_DEFAULT_SG_ID: "WalletService/testnet-india:aws_vpc_default_sg_id"
testnetindia_AWS_SUBNET_ID_1: "WalletService/testnet-india:aws_subnet_id_1"
testnetindia_AWS_SUBNET_ID_2: "WalletService/testnet-india:aws_subnet_id_2"
testnetindia_AWS_SUBNET_ID_3: "WalletService/testnet-india:aws_subnet_id_3"
testnetindia_DB_NAME: "WalletService/rds/testnet-india:dbname"
testnetindia_DB_USER: "WalletService/rds/testnet-india:username"
testnetindia_DB_PASS: "WalletService/rds/testnet-india:password"
testnetindia_DB_ENDPOINT: "WalletService/rds/testnet-india:host"
testnetindia_DB_PORT: "WalletService/rds/testnet-india:port"
testnetindia_REDIS_URL: "WalletService/redis/testnet-india:url"
testnetindia_REDIS_PASSWORD: "WalletService/redis/testnet-india:password"
testnetindia_FIREBASE_PROJECT_ID: "WalletService/testnet-india:FIREBASE_PROJECT_ID"
testnetindia_FIREBASE_PRIVATE_KEY_ID: "WalletService/testnet-india:FIREBASE_PRIVATE_KEY_ID"
testnetindia_FIREBASE_PRIVATE_KEY: "WalletService/testnet-india:FIREBASE_PRIVATE_KEY"
testnetindia_FIREBASE_CLIENT_EMAIL: "WalletService/testnet-india:FIREBASE_CLIENT_EMAIL"
testnetindia_FIREBASE_CLIENT_ID: "WalletService/testnet-india:FIREBASE_CLIENT_ID"
testnetindia_FIREBASE_AUTH_URI: "WalletService/testnet-india:FIREBASE_AUTH_URI"
testnetindia_FIREBASE_TOKEN_URI: "WalletService/testnet-india:FIREBASE_TOKEN_URI"
testnetindia_FIREBASE_AUTH_PROVIDER_X509_CERT_URL: "WalletService/testnet-india:FIREBASE_AUTH_PROVIDER_X509_CERT_URL"
testnetindia_FIREBASE_CLIENT_X509_CERT_URL: "WalletService/testnet-india:FIREBASE_CLIENT_X509_CERT_URL"
testnetindia_ALERT_MANAGER_REGION: "WalletService/testnet-india:ALERT_MANAGER_REGION"
testnetindia_ALERT_MANAGER_TOPIC: "WalletService/testnet-india:ALERT_MANAGER_TOPIC"
testnetindia_ALERT_MANAGER_ACCOUNT_ID: "WalletService/testnet-india:ALERT_MANAGER_ACCOUNT_ID"
# Mainnet Staging secrets
mainnet_staging_ACCOUNT_ID: "WalletService/mainnet_staging:account_id"
mainnet_staging_AUTH_SECRET: "WalletService/mainnet_staging:auth_secret"
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ deploy-lambdas-testnet:
deploy-lambdas-testnet-hotel:
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage hotel --region eu-central-1

.PHONY: deploy-lambdas-testnet-india
deploy-lambdas-testnet-india:
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage india --region eu-central-1

.PHONY: deploy-lambdas-mainnet-staging
deploy-lambdas-mainnet-staging:
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage mainnet-stg --region eu-central-1
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-service/serverless.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
service: hathor-wallet-service
service: ${env:SERVERLESS_DEPLOY_PREFIX, "hathor-wallet-service"}
frameworkVersion: '3'

useDotenv: true
Expand Down