Skip to content

Commit fcd260d

Browse files
authored
Merge pull request #321 from HathorNetwork/release-candidate
Release v1.10.0
2 parents 8457fe8 + 4541d4b commit fcd260d

File tree

141 files changed

+10928
-1758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+10928
-1758
lines changed

.codebuild/build.sh

Lines changed: 106 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,44 @@ deploy_hathor_network_account() {
8686

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

89+
# --- Testnet Hotel ---
90+
# Gets all env vars with `testnethotel_` prefix and re-exports them without the prefix
91+
for var in "${!testnethotel_@}"; do
92+
export ${var#testnethotel_}="${!var}"
93+
done
94+
95+
make migrate;
96+
make build-daemon;
97+
make deploy-lambdas-testnet-hotel;
98+
# The idea here is that if the lambdas deploy fail, the built image won't be pushed:
99+
make push-daemon;
100+
101+
# Unsets all the testnet env vars so we make sure they don't leak to other deploys
102+
for var in "${!testnethotel_@}"; do
103+
unset ${var#testnethotel_}
104+
done
105+
106+
send_slack_message "New version deployed to testnet-hotel: ${GIT_REF_TO_DEPLOY}"
107+
108+
# --- Testnet India ---
109+
# Gets all env vars with `testnetindia_` prefix and re-exports them without the prefix
110+
for var in "${!testnetindia_@}"; do
111+
export ${var#testnetindia_}="${!var}"
112+
done
113+
114+
make migrate;
115+
make build-daemon;
116+
make deploy-lambdas-testnet-india;
117+
# The idea here is that if the lambdas deploy fail, the built image won't be pushed:
118+
make push-daemon;
119+
120+
# Unsets all the testnet env vars so we make sure they don't leak to other deploys
121+
for var in "${!testnetindia_@}"; do
122+
unset ${var#testnetindia_}
123+
done
124+
125+
send_slack_message "New version deployed to testnet-india: ${GIT_REF_TO_DEPLOY}"
126+
89127
# --- Mainnet ---
90128
# Gets all env vars with `mainnet_` prefix and re-exports them without the prefix
91129
for var in "${!mainnet_@}"; do
@@ -129,19 +167,77 @@ deploy_nano_testnet() {
129167
make migrate;
130168
make deploy-lambdas-nano-testnet;
131169

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

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

142-
send_slack_message "Rollback performed on nano-tesnet to: ${GIT_REF_TO_DEPLOY}";
180+
send_slack_message "Rollback performed on nano-tesnet-alpha to: ${GIT_REF_TO_DEPLOY}";
143181
else
144-
echo "We don't deploy ${GIT_REF_TO_DEPLOY} to nano-testnet. Nothing to do.";
182+
echo "We don't deploy ${GIT_REF_TO_DEPLOY} to nano-testnet-alpha. Nothing to do.";
183+
fi;
184+
}
185+
186+
deploy_nano_testnet_bravo() {
187+
# Deploys the releases and release-candidates to our nano-testnet-bravo environment
188+
189+
# We deploy only the Lambdas here, because the image for the daemon used in nano-testnet is
190+
# the same as the one built in the hathor-network account, since it runs there as well
191+
192+
echo "Building git ref ${GIT_REF_TO_DEPLOY}..."
193+
194+
# This will match both releases and release-candidates
195+
if expr "${GIT_REF_TO_DEPLOY}" : "v.*" >/dev/null; then
196+
make migrate;
197+
make deploy-lambdas-nano-testnet-bravo;
198+
199+
send_slack_message "New version deployed to nano-testnet-bravo: ${GIT_REF_TO_DEPLOY}"
200+
elif expr "${MANUAL_DEPLOY}" : "true" >/dev/null; then
201+
make migrate;
202+
make deploy-lambdas-nano-testnet-bravo;
203+
204+
send_slack_message "Branch manually deployed to nano-testnet-bravo: ${GIT_REF_TO_DEPLOY}"
205+
elif expr "${ROLLBACK}" : "true" >/dev/null; then
206+
make migrate;
207+
make deploy-lambdas-nano-testnet-bravo;
208+
209+
send_slack_message "Rollback performed on nano-tesnet-bravo to: ${GIT_REF_TO_DEPLOY}";
210+
else
211+
echo "We don't deploy ${GIT_REF_TO_DEPLOY} to nano-testnet-bravo. Nothing to do.";
212+
fi;
213+
}
214+
215+
deploy_nano_testnet_hackaton() {
216+
# Deploys the releases and release-candidates to our nano-testnet-hackaton environment
217+
218+
# We deploy only the Lambdas here, because the daemon used in nano-testnet-hackaton is the same as
219+
# the one built in the hathor-network account, since it runs there as well
220+
221+
echo "Building git ref ${GIT_REF_TO_DEPLOY}..."
222+
223+
# This will match both releases and release-candidates
224+
if expr "${GIT_REF_TO_DEPLOY}" : "v.*" >/dev/null; then
225+
make migrate;
226+
make deploy-lambdas-nano-testnet-hackaton;
227+
228+
send_slack_message "New version deployed to nano-testnet-hackaton: ${GIT_REF_TO_DEPLOY}"
229+
elif expr "${MANUAL_DEPLOY}" : "true" >/dev/null; then
230+
make migrate;
231+
make deploy-lambdas-nano-testnet-hackaton;
232+
233+
send_slack_message "Branch manually deployed to nano-testnet-hackaton: ${GIT_REF_TO_DEPLOY}"
234+
elif expr "${ROLLBACK}" : "true" >/dev/null; then
235+
make migrate;
236+
make deploy-lambdas-nano-testnet-hackaton;
237+
238+
send_slack_message "Rollback performed on nano-tesnet-hackaton to: ${GIT_REF_TO_DEPLOY}";
239+
else
240+
echo "We don't deploy ${GIT_REF_TO_DEPLOY} to nano-testnet-hackaton. Nothing to do.";
145241
fi;
146242
}
147243

@@ -219,6 +315,12 @@ case $option in
219315
nano-testnet)
220316
deploy_nano_testnet
221317
;;
318+
nano-testnet-bravo)
319+
deploy_nano_testnet_bravo
320+
;;
321+
nano-testnet-hackaton)
322+
deploy_nano_testnet_hackaton
323+
;;
222324
ekvilibro-testnet)
223325
deploy_ekvilibro_testnet
224326
;;

.codebuild/buildspec.yml

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ env:
1515
VOIDED_TX_OFFSET: 20
1616
TX_HISTORY_MAX_COUNT: 50
1717
CREATE_NFT_MAX_RETRIES: 3
18-
dev_DEFAULT_SERVER: "https://wallet-service.private-nodes.testnet.hathor.network/v1a/"
19-
dev_WS_DOMAIN: "ws.dev.wallet-service.testnet.hathor.network"
18+
dev_DEFAULT_SERVER: "https://wallet-service.private-nodes.india.testnet.hathor.network/v1a/"
19+
dev_WS_DOMAIN: "ws.dev.wallet-service.india.testnet.hathor.network"
2020
dev_NETWORK: "testnet"
2121
dev_LOG_LEVEL: "debug"
2222
dev_NFT_AUTO_REVIEW_ENABLED: "true"
@@ -37,6 +37,29 @@ env:
3737
testnet_PUSH_NOTIFICATION_ENABLED: "true"
3838
testnet_PUSH_ALLOWED_PROVIDERS: "android,ios"
3939
testnet_APPLICATION_NAME: "wallet-service-testnet"
40+
testnethotel_DEFAULT_SERVER: "https://wallet-service.private-nodes.hotel.testnet.hathor.network/v1a/"
41+
testnethotel_WS_DOMAIN: "ws.wallet-service.hotel.testnet.hathor.network"
42+
testnethotel_NETWORK: "testnet"
43+
testnethotel_LOG_LEVEL: "debug"
44+
testnethotel_NFT_AUTO_REVIEW_ENABLED: "true"
45+
testnethotel_EXPLORER_STAGE: "hotel"
46+
testnethotel_EXPLORER_SERVICE_LAMBDA_ENDPOINT: "https://lambda.eu-central-1.amazonaws.com"
47+
testnethotel_WALLET_SERVICE_LAMBDA_ENDPOINT: "https://lambda.eu-central-1.amazonaws.com"
48+
testnethotel_PUSH_NOTIFICATION_ENABLED: "true"
49+
testnethotel_PUSH_ALLOWED_PROVIDERS: "android,ios"
50+
testnethotel_APPLICATION_NAME: "wallet-service-testnet-hotel"
51+
testnetindia_DEFAULT_SERVER: "https://wallet-service.private-nodes.india.testnet.hathor.network/v1a/"
52+
testnetindia_WS_DOMAIN: "ws.wallet-service.india.testnet.hathor.network"
53+
testnetindia_NETWORK: "testnet"
54+
testnetindia_LOG_LEVEL: "debug"
55+
testnetindia_NFT_AUTO_REVIEW_ENABLED: "true"
56+
testnetindia_EXPLORER_STAGE: "india"
57+
testnetindia_EXPLORER_SERVICE_LAMBDA_ENDPOINT: "https://lambda.eu-central-1.amazonaws.com"
58+
testnetindia_WALLET_SERVICE_LAMBDA_ENDPOINT: "https://lambda.eu-central-1.amazonaws.com"
59+
testnetindia_PUSH_NOTIFICATION_ENABLED: "true"
60+
testnetindia_PUSH_ALLOWED_PROVIDERS: "android,ios"
61+
testnetindia_APPLICATION_NAME: "wallet-service-testnet-india"
62+
testnetindia_SERVERLESS_DEPLOY_PREFIX: "wallet-service"
4063
mainnet_staging_DEFAULT_SERVER: "https://wallet-service.private-nodes.hathor.network/v1a/"
4164
mainnet_staging_WS_DOMAIN: "ws.staging.wallet-service.hathor.network"
4265
mainnet_staging_NETWORK: "mainnet"
@@ -116,6 +139,58 @@ env:
116139
testnet_ALERT_MANAGER_REGION: "WalletService/testnet:ALERT_MANAGER_REGION"
117140
testnet_ALERT_MANAGER_TOPIC: "WalletService/testnet:ALERT_MANAGER_TOPIC"
118141
testnet_ALERT_MANAGER_ACCOUNT_ID: "WalletService/testnet:ALERT_MANAGER_ACCOUNT_ID"
142+
# Testnet Hotel secrets
143+
testnethotel_ACCOUNT_ID: "WalletService/testnet-hotel:account_id"
144+
testnethotel_AUTH_SECRET: "WalletService/testnet-hotel:auth_secret"
145+
testnethotel_AWS_VPC_DEFAULT_SG_ID: "WalletService/testnet-hotel:aws_vpc_default_sg_id"
146+
testnethotel_AWS_SUBNET_ID_1: "WalletService/testnet-hotel:aws_subnet_id_1"
147+
testnethotel_AWS_SUBNET_ID_2: "WalletService/testnet-hotel:aws_subnet_id_2"
148+
testnethotel_AWS_SUBNET_ID_3: "WalletService/testnet-hotel:aws_subnet_id_3"
149+
testnethotel_DB_NAME: "WalletService/rds/testnet-hotel:dbname"
150+
testnethotel_DB_USER: "WalletService/rds/testnet-hotel:username"
151+
testnethotel_DB_PASS: "WalletService/rds/testnet-hotel:password"
152+
testnethotel_DB_ENDPOINT: "WalletService/rds/testnet-hotel:host"
153+
testnethotel_DB_PORT: "WalletService/rds/testnet-hotel:port"
154+
testnethotel_REDIS_URL: "WalletService/redis/testnet-hotel:url"
155+
testnethotel_REDIS_PASSWORD: "WalletService/redis/testnet-hotel:password"
156+
testnethotel_FIREBASE_PROJECT_ID: "WalletService/testnet-hotel:FIREBASE_PROJECT_ID"
157+
testnethotel_FIREBASE_PRIVATE_KEY_ID: "WalletService/testnet-hotel:FIREBASE_PRIVATE_KEY_ID"
158+
testnethotel_FIREBASE_PRIVATE_KEY: "WalletService/testnet-hotel:FIREBASE_PRIVATE_KEY"
159+
testnethotel_FIREBASE_CLIENT_EMAIL: "WalletService/testnet-hotel:FIREBASE_CLIENT_EMAIL"
160+
testnethotel_FIREBASE_CLIENT_ID: "WalletService/testnet-hotel:FIREBASE_CLIENT_ID"
161+
testnethotel_FIREBASE_AUTH_URI: "WalletService/testnet-hotel:FIREBASE_AUTH_URI"
162+
testnethotel_FIREBASE_TOKEN_URI: "WalletService/testnet-hotel:FIREBASE_TOKEN_URI"
163+
testnethotel_FIREBASE_AUTH_PROVIDER_X509_CERT_URL: "WalletService/testnet-hotel:FIREBASE_AUTH_PROVIDER_X509_CERT_URL"
164+
testnethotel_FIREBASE_CLIENT_X509_CERT_URL: "WalletService/testnet-hotel:FIREBASE_CLIENT_X509_CERT_URL"
165+
testnethotel_ALERT_MANAGER_REGION: "WalletService/testnet-hotel:ALERT_MANAGER_REGION"
166+
testnethotel_ALERT_MANAGER_TOPIC: "WalletService/testnet-hotel:ALERT_MANAGER_TOPIC"
167+
testnethotel_ALERT_MANAGER_ACCOUNT_ID: "WalletService/testnet-hotel:ALERT_MANAGER_ACCOUNT_ID"
168+
# Testnet India secrets
169+
testnetindia_ACCOUNT_ID: "WalletService/testnet-india:account_id"
170+
testnetindia_AUTH_SECRET: "WalletService/testnet-india:auth_secret"
171+
testnetindia_AWS_VPC_DEFAULT_SG_ID: "WalletService/testnet-india:aws_vpc_default_sg_id"
172+
testnetindia_AWS_SUBNET_ID_1: "WalletService/testnet-india:aws_subnet_id_1"
173+
testnetindia_AWS_SUBNET_ID_2: "WalletService/testnet-india:aws_subnet_id_2"
174+
testnetindia_AWS_SUBNET_ID_3: "WalletService/testnet-india:aws_subnet_id_3"
175+
testnetindia_DB_NAME: "WalletService/rds/testnet-india:dbname"
176+
testnetindia_DB_USER: "WalletService/rds/testnet-india:username"
177+
testnetindia_DB_PASS: "WalletService/rds/testnet-india:password"
178+
testnetindia_DB_ENDPOINT: "WalletService/rds/testnet-india:host"
179+
testnetindia_DB_PORT: "WalletService/rds/testnet-india:port"
180+
testnetindia_REDIS_URL: "WalletService/redis/testnet-india:url"
181+
testnetindia_REDIS_PASSWORD: "WalletService/redis/testnet-india:password"
182+
testnetindia_FIREBASE_PROJECT_ID: "WalletService/testnet-india:FIREBASE_PROJECT_ID"
183+
testnetindia_FIREBASE_PRIVATE_KEY_ID: "WalletService/testnet-india:FIREBASE_PRIVATE_KEY_ID"
184+
testnetindia_FIREBASE_PRIVATE_KEY: "WalletService/testnet-india:FIREBASE_PRIVATE_KEY"
185+
testnetindia_FIREBASE_CLIENT_EMAIL: "WalletService/testnet-india:FIREBASE_CLIENT_EMAIL"
186+
testnetindia_FIREBASE_CLIENT_ID: "WalletService/testnet-india:FIREBASE_CLIENT_ID"
187+
testnetindia_FIREBASE_AUTH_URI: "WalletService/testnet-india:FIREBASE_AUTH_URI"
188+
testnetindia_FIREBASE_TOKEN_URI: "WalletService/testnet-india:FIREBASE_TOKEN_URI"
189+
testnetindia_FIREBASE_AUTH_PROVIDER_X509_CERT_URL: "WalletService/testnet-india:FIREBASE_AUTH_PROVIDER_X509_CERT_URL"
190+
testnetindia_FIREBASE_CLIENT_X509_CERT_URL: "WalletService/testnet-india:FIREBASE_CLIENT_X509_CERT_URL"
191+
testnetindia_ALERT_MANAGER_REGION: "WalletService/testnet-india:ALERT_MANAGER_REGION"
192+
testnetindia_ALERT_MANAGER_TOPIC: "WalletService/testnet-india:ALERT_MANAGER_TOPIC"
193+
testnetindia_ALERT_MANAGER_ACCOUNT_ID: "WalletService/testnet-india:ALERT_MANAGER_ACCOUNT_ID"
119194
# Mainnet Staging secrets
120195
mainnet_staging_ACCOUNT_ID: "WalletService/mainnet_staging:account_id"
121196
mainnet_staging_AUTH_SECRET: "WalletService/mainnet_staging:auth_secret"
@@ -173,12 +248,12 @@ phases:
173248
#If you use the Ubuntu standard image 2.0 or later, you must specify runtime-versions.
174249
#If you specify runtime-versions and use an image other than Ubuntu standard image 2.0, the build fails.
175250
runtime-versions:
176-
nodejs: 20
251+
nodejs: 22
177252
# name: version
178253
commands:
179254
- npm install -g yarn
255+
# corepack will use the version of yarn specified in package.json
180256
- corepack enable
181-
- yarn set version 4.1.0
182257
- yarn install
183258
pre_build:
184259
commands:

Dockerfile

Lines changed: 0 additions & 40 deletions
This file was deleted.

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ build-and-push-daemon:
66
build-daemon:
77
bash scripts/build-daemon.sh
88

9+
.PHONY: build-migrator
10+
build-migrator:
11+
bash scripts/build-migrator.sh
12+
13+
.PHONY: build-service
14+
build-service:
15+
bash scripts/build-service.sh
16+
917
.PHONY: push-daemon
1018
push-daemon:
1119
bash scripts/push-daemon.sh
@@ -14,6 +22,14 @@ push-daemon:
1422
deploy-lambdas-nano-testnet:
1523
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage nano --region eu-central-1 --aws-profile nano-testnet
1624

25+
.PHONY: deploy-lambdas-nano-testnet-bravo
26+
deploy-lambdas-nano-testnet-bravo:
27+
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage nano-bravo --region eu-central-1 --aws-profile nano-testnet
28+
29+
.PHONY: deploy-lambdas-nano-testnet-hackaton
30+
deploy-lambdas-nano-testnet-hackaton:
31+
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage hackaton --region eu-central-1 --aws-profile nano-testnet-hackaton
32+
1733
.PHONY: deploy-lambdas-ekvilibro-testnet
1834
deploy-lambdas-ekvilibro-testnet:
1935
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage ekvilibro --region eu-central-1 --aws-profile ekvilibro
@@ -30,6 +46,14 @@ deploy-lambdas-dev-testnet:
3046
deploy-lambdas-testnet:
3147
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage testnet --region eu-central-1
3248

49+
.PHONY: deploy-lambdas-testnet-hotel
50+
deploy-lambdas-testnet-hotel:
51+
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage hotel --region eu-central-1
52+
53+
.PHONY: deploy-lambdas-testnet-india
54+
deploy-lambdas-testnet-india:
55+
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage india --region eu-central-1
56+
3357
.PHONY: deploy-lambdas-mainnet-staging
3458
deploy-lambdas-mainnet-staging:
3559
AWS_SDK_LOAD_CONFIG=1 yarn workspace wallet-service run serverless deploy --stage mainnet-stg --region eu-central-1

0 commit comments

Comments
 (0)