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
49 changes: 0 additions & 49 deletions .codebuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@ deploy_hathor_network_account() {
exit=true;
fi;

# Checks whether there is a file called "rollback_testnet_production", which is used by our other CodeBuild to indicate that this is a testnet-production rollback
if [ -f "rollback_testnet_production" ]; then
# Gets all env vars with `testnet_` prefix and re-exports them without the prefix
for var in "${!testnet_@}"; do
export ${var#testnet_}="${!var}"
done
make deploy-lambdas-testnet;
send_slack_message "Rollback performed on testnet-production to: ${GIT_REF_TO_DEPLOY}";
exit=true;
fi;

if [ "$exit" = true ]; then
echo "Rollbacks performed successfully. Exiting now.";
exit 0;
Expand Down Expand Up @@ -67,44 +56,6 @@ deploy_hathor_network_account() {
elif expr "${GIT_REF_TO_DEPLOY}" : "v.*" >/dev/null; then
echo $GIT_REF_TO_DEPLOY > /tmp/docker_image_tag

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

make migrate;
make build-daemon;
make deploy-lambdas-testnet;
# 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 "${!testnet_@}"; do
unset ${var#testnet_}
done

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

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

make migrate;
make build-daemon;
make deploy-lambdas-testnet-hotel;
# 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 "${!testnethotel_@}"; do
unset ${var#testnethotel_}
done

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
Expand Down
74 changes: 0 additions & 74 deletions .codebuild/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,6 @@ env:
dev_PUSH_NOTIFICATION_ENABLED: "true"
dev_PUSH_ALLOWED_PROVIDERS: "android,ios"
dev_APPLICATION_NAME: "wallet-service-dev"
testnet_DEFAULT_SERVER: "https://wallet-service.private-nodes.testnet.hathor.network/v1a/"
testnet_WS_DOMAIN: "ws.wallet-service.testnet.hathor.network"
testnet_NETWORK: "testnet"
testnet_LOG_LEVEL: "debug"
testnet_NFT_AUTO_REVIEW_ENABLED: "true"
testnet_EXPLORER_STAGE: "testnet"
testnet_EXPLORER_SERVICE_LAMBDA_ENDPOINT: "https://lambda.eu-central-1.amazonaws.com"
testnet_WALLET_SERVICE_LAMBDA_ENDPOINT: "https://lambda.eu-central-1.amazonaws.com"
testnet_PUSH_NOTIFICATION_ENABLED: "true"
testnet_PUSH_ALLOWED_PROVIDERS: "android,ios"
testnet_APPLICATION_NAME: "wallet-service-testnet"
testnethotel_DEFAULT_SERVER: "https://wallet-service.private-nodes.hotel.testnet.hathor.network/v1a/"
testnethotel_WS_DOMAIN: "ws.wallet-service.hotel.testnet.hathor.network"
testnethotel_NETWORK: "testnet"
testnethotel_LOG_LEVEL: "debug"
testnethotel_NFT_AUTO_REVIEW_ENABLED: "true"
testnethotel_EXPLORER_STAGE: "hotel"
testnethotel_EXPLORER_SERVICE_LAMBDA_ENDPOINT: "https://lambda.eu-central-1.amazonaws.com"
testnethotel_WALLET_SERVICE_LAMBDA_ENDPOINT: "https://lambda.eu-central-1.amazonaws.com"
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"
Expand Down Expand Up @@ -113,58 +91,6 @@ env:
dev_ALERT_MANAGER_REGION: "WalletService/dev:ALERT_MANAGER_REGION"
dev_ALERT_MANAGER_TOPIC: "WalletService/dev:ALERT_MANAGER_TOPIC"
dev_ALERT_MANAGER_ACCOUNT_ID: "WalletService/dev:ALERT_MANAGER_ACCOUNT_ID"
# Testnet secrets
testnet_ACCOUNT_ID: "WalletService/testnet:account_id"
testnet_AUTH_SECRET: "WalletService/testnet:auth_secret"
testnet_AWS_VPC_DEFAULT_SG_ID: "WalletService/testnet:aws_vpc_default_sg_id"
testnet_AWS_SUBNET_ID_1: "WalletService/testnet:aws_subnet_id_1"
testnet_AWS_SUBNET_ID_2: "WalletService/testnet:aws_subnet_id_2"
testnet_AWS_SUBNET_ID_3: "WalletService/testnet:aws_subnet_id_3"
testnet_DB_NAME: "WalletService/rds/testnet:dbname"
testnet_DB_USER: "WalletService/rds/testnet:username"
testnet_DB_PASS: "WalletService/rds/testnet:password"
testnet_DB_ENDPOINT: "WalletService/rds/testnet:host"
testnet_DB_PORT: "WalletService/rds/testnet:port"
testnet_REDIS_URL: "WalletService/redis/testnet:url"
testnet_REDIS_PASSWORD: "WalletService/redis/testnet:password"
testnet_FIREBASE_PROJECT_ID: "WalletService/testnet:FIREBASE_PROJECT_ID"
testnet_FIREBASE_PRIVATE_KEY_ID: "WalletService/testnet:FIREBASE_PRIVATE_KEY_ID"
testnet_FIREBASE_PRIVATE_KEY: "WalletService/testnet:FIREBASE_PRIVATE_KEY"
testnet_FIREBASE_CLIENT_EMAIL: "WalletService/testnet:FIREBASE_CLIENT_EMAIL"
testnet_FIREBASE_CLIENT_ID: "WalletService/testnet:FIREBASE_CLIENT_ID"
testnet_FIREBASE_AUTH_URI: "WalletService/testnet:FIREBASE_AUTH_URI"
testnet_FIREBASE_TOKEN_URI: "WalletService/testnet:FIREBASE_TOKEN_URI"
testnet_FIREBASE_AUTH_PROVIDER_X509_CERT_URL: "WalletService/testnet:FIREBASE_AUTH_PROVIDER_X509_CERT_URL"
testnet_FIREBASE_CLIENT_X509_CERT_URL: "WalletService/testnet:FIREBASE_CLIENT_X509_CERT_URL"
testnet_ALERT_MANAGER_REGION: "WalletService/testnet:ALERT_MANAGER_REGION"
testnet_ALERT_MANAGER_TOPIC: "WalletService/testnet:ALERT_MANAGER_TOPIC"
testnet_ALERT_MANAGER_ACCOUNT_ID: "WalletService/testnet:ALERT_MANAGER_ACCOUNT_ID"
# Testnet Hotel secrets
testnethotel_ACCOUNT_ID: "WalletService/testnet-hotel:account_id"
testnethotel_AUTH_SECRET: "WalletService/testnet-hotel:auth_secret"
testnethotel_AWS_VPC_DEFAULT_SG_ID: "WalletService/testnet-hotel:aws_vpc_default_sg_id"
testnethotel_AWS_SUBNET_ID_1: "WalletService/testnet-hotel:aws_subnet_id_1"
testnethotel_AWS_SUBNET_ID_2: "WalletService/testnet-hotel:aws_subnet_id_2"
testnethotel_AWS_SUBNET_ID_3: "WalletService/testnet-hotel:aws_subnet_id_3"
testnethotel_DB_NAME: "WalletService/rds/testnet-hotel:dbname"
testnethotel_DB_USER: "WalletService/rds/testnet-hotel:username"
testnethotel_DB_PASS: "WalletService/rds/testnet-hotel:password"
testnethotel_DB_ENDPOINT: "WalletService/rds/testnet-hotel:host"
testnethotel_DB_PORT: "WalletService/rds/testnet-hotel:port"
testnethotel_REDIS_URL: "WalletService/redis/testnet-hotel:url"
testnethotel_REDIS_PASSWORD: "WalletService/redis/testnet-hotel:password"
testnethotel_FIREBASE_PROJECT_ID: "WalletService/testnet-hotel:FIREBASE_PROJECT_ID"
testnethotel_FIREBASE_PRIVATE_KEY_ID: "WalletService/testnet-hotel:FIREBASE_PRIVATE_KEY_ID"
testnethotel_FIREBASE_PRIVATE_KEY: "WalletService/testnet-hotel:FIREBASE_PRIVATE_KEY"
testnethotel_FIREBASE_CLIENT_EMAIL: "WalletService/testnet-hotel:FIREBASE_CLIENT_EMAIL"
testnethotel_FIREBASE_CLIENT_ID: "WalletService/testnet-hotel:FIREBASE_CLIENT_ID"
testnethotel_FIREBASE_AUTH_URI: "WalletService/testnet-hotel:FIREBASE_AUTH_URI"
testnethotel_FIREBASE_TOKEN_URI: "WalletService/testnet-hotel:FIREBASE_TOKEN_URI"
testnethotel_FIREBASE_AUTH_PROVIDER_X509_CERT_URL: "WalletService/testnet-hotel:FIREBASE_AUTH_PROVIDER_X509_CERT_URL"
testnethotel_FIREBASE_CLIENT_X509_CERT_URL: "WalletService/testnet-hotel:FIREBASE_CLIENT_X509_CERT_URL"
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"
Expand Down
20 changes: 0 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ build-service:
push-daemon:
bash scripts/push-daemon.sh

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

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

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

.PHONY: deploy-lambdas-ekvilibro-testnet
deploy-lambdas-ekvilibro-testnet:
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage ekvilibro --region eu-central-1 --aws-profile ekvilibro
Expand All @@ -42,14 +30,6 @@ deploy-lambdas-ekvilibro-mainnet:
deploy-lambdas-dev-testnet:
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage dev-testnet --region eu-central-1

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

.PHONY: deploy-lambdas-testnet-hotel
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
Expand Down