You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Checks whether there is a file called "rollback_mainnet_production", which is used by our other CodeBuild to indicate that this is a mainnet-production rollback
17
-
if [ -f"rollback_mainnet_production" ];then
18
-
# Gets all env vars with `mainnet_` prefix and re-exports them without the prefix
19
-
forvarin"${!mainnet_@}";do
20
-
export${var#mainnet_}="${!var}"
21
-
done
22
-
make deploy-lambdas-mainnet;
23
-
send_slack_message "Rollback performed on mainnet-production to: ${GIT_REF_TO_DEPLOY}";
24
-
exit=true;
25
-
fi;
26
-
27
-
# 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
28
-
if [ -f"rollback_testnet_production" ];then
29
-
# Gets all env vars with `testnet_` prefix and re-exports them without the prefix
30
-
forvarin"${!testnet_@}";do
31
-
export${var#testnet_}="${!var}"
32
-
done
33
-
make deploy-lambdas-testnet;
34
-
send_slack_message "Rollback performed on testnet-production to: ${GIT_REF_TO_DEPLOY}";
35
-
exit=true;
36
-
fi;
37
-
38
-
if [ "$exit"=true ];then
39
-
echo"Rollbacks performed successfully. Exiting now.";
40
-
exit 0;
41
-
fi
42
-
43
-
if expr "${GIT_REF_TO_DEPLOY}":"master">/dev/null;then
44
-
# Gets all env vars with `dev_` prefix and re-exports them without the prefix
45
-
forvarin"${!dev_@}";do
46
-
export${var#dev_}="${!var}"
47
-
done
48
-
49
-
make migrate;
50
-
make build-daemon;
51
-
make deploy-lambdas-dev-testnet;
52
-
# The idea here is that if the lambdas deploy fail, the built image won't be pushed:
# Gets all env vars with `testnet_` prefix and re-exports them without the prefix
69
-
forvarin"${!testnet_@}";do
70
-
export${var#testnet_}="${!var}"
71
-
done
72
-
73
-
echo$GIT_REF_TO_DEPLOY> /tmp/docker_image_tag
74
-
make migrate;
75
-
make build-daemon;
76
-
make deploy-lambdas-testnet;
77
-
make push-daemon;
78
-
79
-
# Unsets all the testnet env vars so we make sure they don't leak to the mainnet deploy below
80
-
forvarin"${!testnet_@}";do
81
-
unset${var#testnet_}
82
-
done
83
-
84
-
# Gets all env vars with `mainnet_` prefix and re-exports them without the prefix
85
-
forvarin"${!mainnet_@}";do
86
-
export${var#mainnet_}="${!var}"
87
-
done
88
-
make migrate;
89
-
make build-daemon;
90
-
make deploy-lambdas-mainnet;
91
-
make push-daemon;
92
-
send_slack_message "New version deployed to testnet-production and mainnet-production: ${GIT_REF_TO_DEPLOY}"
93
-
else
94
-
# Gets all env vars with `dev_` prefix and re-exports them without the prefix
95
-
forvarin"${!dev_@}";do
96
-
export${var#dev_}="${!var}"
97
-
done
98
-
make migrate;
99
-
make build-daemon;
100
-
make deploy-lambdas-dev-testnet;
101
-
make push-daemon;
102
-
fi;
12
+
deploy_hathor_network_account() {
13
+
exit=false;
14
+
15
+
# Checks whether there is a file called "rollback_mainnet_production", which is used by our other CodeBuild to indicate that this is a mainnet-production rollback
16
+
if [ -f"rollback_mainnet_production" ];then
17
+
# Gets all env vars with `mainnet_` prefix and re-exports them without the prefix
18
+
forvarin"${!mainnet_@}";do
19
+
export${var#mainnet_}="${!var}"
20
+
done
21
+
make deploy-lambdas-mainnet;
22
+
send_slack_message "Rollback performed on mainnet-production to: ${GIT_REF_TO_DEPLOY}";
23
+
exit=true;
24
+
fi;
25
+
26
+
# 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
27
+
if [ -f"rollback_testnet_production" ];then
28
+
# Gets all env vars with `testnet_` prefix and re-exports them without the prefix
29
+
forvarin"${!testnet_@}";do
30
+
export${var#testnet_}="${!var}"
31
+
done
32
+
make deploy-lambdas-testnet;
33
+
send_slack_message "Rollback performed on testnet-production to: ${GIT_REF_TO_DEPLOY}";
34
+
exit=true;
35
+
fi;
36
+
37
+
if [ "$exit"=true ];then
38
+
echo"Rollbacks performed successfully. Exiting now.";
39
+
exit 0;
40
+
fi
41
+
42
+
if expr "${GIT_REF_TO_DEPLOY}":"master">/dev/null;then
43
+
# Gets all env vars with `dev_` prefix and re-exports them without the prefix
44
+
forvarin"${!dev_@}";do
45
+
export${var#dev_}="${!var}"
46
+
done
47
+
48
+
make migrate;
49
+
make build-daemon;
50
+
make deploy-lambdas-dev-testnet;
51
+
# The idea here is that if the lambdas deploy fail, the built image won't be pushed:
0 commit comments