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
40 changes: 36 additions & 4 deletions .codebuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,48 @@ deploy_nano_testnet() {
make migrate;
make deploy-lambdas-nano-testnet;

send_slack_message "New version deployed to nano-testnet: ${GIT_REF_TO_DEPLOY}"
send_slack_message "New version deployed to nano-testnet-alpha: ${GIT_REF_TO_DEPLOY}"
elif expr "${MANUAL_DEPLOY}" : "true" >/dev/null; then
make migrate;
make deploy-lambdas-nano-testnet;

send_slack_message "Branch manually deployed to nano-testnet: ${GIT_REF_TO_DEPLOY}"
send_slack_message "Branch manually deployed to nano-testnet-alpha: ${GIT_REF_TO_DEPLOY}"
elif expr "${ROLLBACK}" : "true" >/dev/null; then
make migrate;
make deploy-lambdas-nano-testnet;

send_slack_message "Rollback performed on nano-tesnet to: ${GIT_REF_TO_DEPLOY}";
send_slack_message "Rollback performed on nano-tesnet-alpha to: ${GIT_REF_TO_DEPLOY}";
else
echo "We don't deploy ${GIT_REF_TO_DEPLOY} to nano-testnet. Nothing to do.";
echo "We don't deploy ${GIT_REF_TO_DEPLOY} to nano-testnet-alpha. Nothing to do.";
fi;
}

deploy_nano_testnet_bravo() {
# Deploys the releases and release-candidates to our nano-testnet-bravo environment

# We deploy only the Lambdas here, because the image for the daemon used in nano-testnet 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-bravo;

send_slack_message "New version deployed to nano-testnet-bravo: ${GIT_REF_TO_DEPLOY}"
elif expr "${MANUAL_DEPLOY}" : "true" >/dev/null; then
make migrate;
make deploy-lambdas-nano-testnet-bravo;

send_slack_message "Branch manually deployed to nano-testnet-bravo: ${GIT_REF_TO_DEPLOY}"
elif expr "${ROLLBACK}" : "true" >/dev/null; then
make migrate;
make deploy-lambdas-nano-testnet-bravo;

send_slack_message "Rollback performed on nano-tesnet-bravo to: ${GIT_REF_TO_DEPLOY}";
else
echo "We don't deploy ${GIT_REF_TO_DEPLOY} to nano-testnet-bravo. Nothing to do.";
fi;
}

Expand Down Expand Up @@ -248,6 +277,9 @@ case $option in
nano-testnet)
deploy_nano_testnet
;;
nano-testnet-bravo)
deploy_nano_testnet_bravo
;;
nano-testnet-hackaton)
deploy_nano_testnet_hackaton
;;
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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-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
Expand Down
12 changes: 6 additions & 6 deletions packages/daemon/__tests__/integration/scripts/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
- "3380:3306"

unvoided_transaction:
image: hathornetwork/hathor-core:stable
image: hathornetwork/hathor-core:latest
command: [
"events_simulator",
"--scenario", "UNVOIDED_TRANSACTION",
Expand All @@ -18,7 +18,7 @@ services:
ports:
- "8081:8080"
reorg:
image: hathornetwork/hathor-core:stable
image: hathornetwork/hathor-core:latest
command: [
"events_simulator",
"--scenario", "REORG",
Expand All @@ -27,7 +27,7 @@ services:
ports:
- "8082:8080"
single_chain_blocks_and_transactions:
image: hathornetwork/hathor-core:stable
image: hathornetwork/hathor-core:latest
command: [
"events_simulator",
"--scenario", "SINGLE_CHAIN_BLOCKS_AND_TRANSACTIONS",
Expand All @@ -36,7 +36,7 @@ services:
ports:
- "8083:8080"
invalid_mempool_transaction:
image: hathornetwork/hathor-core:stable
image: hathornetwork/hathor-core:latest
command: [
"events_simulator",
"--scenario", "INVALID_MEMPOOL_TRANSACTION",
Expand All @@ -46,7 +46,7 @@ services:
- "8085:8080"

custom_scripts:
image: hathornetwork/hathor-core:stable
image: hathornetwork/hathor-core:latest
command: [
"events_simulator",
"--scenario", "CUSTOM_SCRIPT",
Expand All @@ -56,7 +56,7 @@ services:
- "8086:8080"

empty_script:
image: hathornetwork/hathor-core:stable
image: hathornetwork/hathor-core:latest
command: [
"events_simulator",
"--scenario", "EMPTY_SCRIPT",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"fork-ts-checker-webpack-plugin": "9.0.0",
"jest": "29.7.0",
"npm-run-all": "4.1.5",
"serverless": "3.35.2",
"serverless": "3.40.0",
"serverless-api-gateway-throttling": "2.0.3",
"serverless-better-credentials": "2.0.0",
"serverless-iam-roles-per-function": "3.2.0",
Expand Down
18 changes: 9 additions & 9 deletions packages/wallet-service/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,15 @@ provider:
WALLET_SERVICE_LAMBDA_ENDPOINT: ${env:WALLET_SERVICE_LAMBDA_ENDPOINT}
PUSH_NOTIFICATION_ENABLED: ${env:PUSH_NOTIFICATION_ENABLED}
PUSH_ALLOWED_PROVIDERS: ${env:PUSH_ALLOWED_PROVIDERS}
FIREBASE_PROJECT_ID: ${env:FIREBASE_PROJECT_ID, ''}
FIREBASE_PRIVATE_KEY_ID: ${env:FIREBASE_PRIVATE_KEY_ID, ''}
FIREBASE_PRIVATE_KEY: ${env:FIREBASE_PRIVATE_KEY, ''}
FIREBASE_CLIENT_EMAIL: ${env:FIREBASE_CLIENT_EMAIL, ''}
FIREBASE_CLIENT_ID: ${env:FIREBASE_CLIENT_ID, ''}
FIREBASE_AUTH_URI: ${env:FIREBASE_AUTH_URI, ''}
FIREBASE_TOKEN_URI: ${env:FIREBASE_TOKEN_URI, ''}
FIREBASE_AUTH_PROVIDER_X509_CERT_URL: ${env:FIREBASE_AUTH_PROVIDER_X509_CERT_URL, ''}
FIREBASE_CLIENT_X509_CERT_URL: ${env:FIREBASE_CLIENT_X509_CERT_URL, ''}
FIREBASE_PROJECT_ID: ${env:FIREBASE_PROJECT_ID, null}
FIREBASE_PRIVATE_KEY_ID: ${env:FIREBASE_PRIVATE_KEY_ID, null}
FIREBASE_PRIVATE_KEY: ${env:FIREBASE_PRIVATE_KEY, null}
FIREBASE_CLIENT_EMAIL: ${env:FIREBASE_CLIENT_EMAIL, null}
FIREBASE_CLIENT_ID: ${env:FIREBASE_CLIENT_ID, null}
FIREBASE_AUTH_URI: ${env:FIREBASE_AUTH_URI, null}
FIREBASE_TOKEN_URI: ${env:FIREBASE_TOKEN_URI, null}
FIREBASE_AUTH_PROVIDER_X509_CERT_URL: ${env:FIREBASE_AUTH_PROVIDER_X509_CERT_URL, null}
FIREBASE_CLIENT_X509_CERT_URL: ${env:FIREBASE_CLIENT_X509_CERT_URL, null}
LOG_LEVEL: ${env:LOG_LEVEL}
ALERT_MANAGER_REGION: ${env:ALERT_MANAGER_REGION}
ALERT_MANAGER_TOPIC: ${env:ALERT_MANAGER_TOPIC}
Expand Down
Loading