diff --git a/.codebuild/build.sh b/.codebuild/build.sh index a45243cd..565957ac 100644 --- a/.codebuild/build.sh +++ b/.codebuild/build.sh @@ -145,6 +145,35 @@ deploy_nano_testnet() { fi; } +deploy_nano_testnet_hackaton() { + # Deploys the releases and release-candidates to our nano-testnet-hackaton environment + + # We deploy only the Lambdas here, because the daemon used in nano-testnet-hackaton is the same as + # the one built in the hathor-network account, since it runs there as well + + echo "Building git ref ${GIT_REF_TO_DEPLOY}..." + + # This will match both releases and release-candidates + if expr "${GIT_REF_TO_DEPLOY}" : "v.*" >/dev/null; then + make migrate; + make deploy-lambdas-nano-testnet-hackaton; + + send_slack_message "New version deployed to nano-testnet-hackaton: ${GIT_REF_TO_DEPLOY}" + elif expr "${MANUAL_DEPLOY}" : "true" >/dev/null; then + make migrate; + make deploy-lambdas-nano-testnet-hackaton; + + send_slack_message "Branch manually deployed to nano-testnet-hackaton: ${GIT_REF_TO_DEPLOY}" + elif expr "${ROLLBACK}" : "true" >/dev/null; then + make migrate; + make deploy-lambdas-nano-testnet-hackaton; + + send_slack_message "Rollback performed on nano-tesnet-hackaton to: ${GIT_REF_TO_DEPLOY}"; + else + echo "We don't deploy ${GIT_REF_TO_DEPLOY} to nano-testnet-hackaton. Nothing to do."; + fi; +} + deploy_ekvilibro_mainnet() { # Deploys the releases to our ekvilibro-mainnet environment @@ -219,6 +248,9 @@ case $option in nano-testnet) deploy_nano_testnet ;; + nano-testnet-hackaton) + deploy_nano_testnet_hackaton + ;; ekvilibro-testnet) deploy_ekvilibro_testnet ;; diff --git a/Makefile b/Makefile index c297758a..535aa844 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,10 @@ push-daemon: 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-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 diff --git a/packages/wallet-service/serverless.yml b/packages/wallet-service/serverless.yml index 4daa1e60..758c432a 100644 --- a/packages/wallet-service/serverless.yml +++ b/packages/wallet-service/serverless.yml @@ -687,8 +687,8 @@ functions: path: health method: get throttling: - maxRequestsPerSecond: 1 - maxConcurrentRequests: 1 + maxRequestsPerSecond: 2 + maxConcurrentRequests: 2 deleteStalePushDevices: handler: src/db/cronRoutines.cleanStalePushDevices events: