-
Notifications
You must be signed in to change notification settings - Fork 7
/
Taskfile.yaml
136 lines (121 loc) · 3.2 KB
/
Taskfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
version: '3'
env:
CODE_BASE:
sh: printf "%s" {{.ROOT_DIR}}
SUPERVISORD_INI:
sh: printf "%s/%s/supervisord/supervisord.ini" {{.ROOT_DIR}} $(yq .params.supvDir ./conf/baseconfig.yaml)
includes:
build: ./taskfiles/build.yaml
tasks:
test:
cmds:
- |
export PATH={{.PATH}}
env | grep -i _proxy
default:
- task: buildAll
build-all:
aliases: [build-all]
desc: build all of babylon component
silent: true
cmds:
- task: build:buildAll
up-supervisord:
aliases: [ start-supervisord ]
desc: start supervisord
silent: true
cmds:
- |
printf "up supervisor, ini path: ${SUPERVISORD_INI}, log path: ${SUPERVISORD_LOG} \n"
supervisord -n -c ${SUPERVISORD_INI}
down-supervisord:
aliases: [ stop-supervisord ]
desc: stop supervisord
silent: true
cmds:
- |
export PATH={{.PATH}}
supervisorctl -c ${SUPERVISORD_INI} shutdown
init-network-conf:
aliases: [init-babylon-config]
desc: init babylon network config
silent: true
cmds:
- |
export PATH={{.PATH}}
printf "Start init network config, codebase path: ${CODE_BASE} \n"
source ${CODE_BASE}/lib/utils.sh && init_config
up-babylon-network:
aliases: [ start-babylon, up-babylon ]
deps: [ up-supervisord ]
desc: start babylon
silent: true
cmds:
- |
export PATH={{.PATH}}
printf "start up babylon network\n"
init-bitcoin:
aliases: [ init-bitcoin]
desc: init bitcoin network
silent: true
cmds:
- |
export PATH={{.PATH}}
printf "start init bitcoin nework\n"
source ${CODE_BASE}/lib/utils.sh && bitcoin_init
printf "end init bitcoin nework\n"
deploy_babylon_contract:
aliases: [ deploy-babylon-contract ]
desc: deploy babylon contract
silent: true
cmds:
- |
export PATH={{.PATH}}
printf "deploy babylon contract\n"
source ${CODE_BASE}/lib/utils.sh && deploy_babylon_contract
printf "end deploy babylon contract\n"
init-relayer:
aliases: [ init-relayer]
desc: init cosmos relayer
silent: true
cmds:
- |
export PATH={{.PATH}}
printf "start init relayer\n"
source ${CODE_BASE}/lib/utils.sh && init_relayer
printf "end init relayer\n"
start-relayer:
aliases: [ start-relayer ]
desc: start cosmos relayer
silent: true
cmds:
- |
export PATH={{.PATH}}
printf "start relayer\n"
source ${CODE_BASE}/lib/utils.sh && start_relayer
printf "end start relayer\n"
ps:
desc: show services status.
silent: true
aliases: [status]
cmds:
- |
export PATH={{.PATH}}
supervisorctl -c ${SUPERVISORD_INI} status
clean:
desc: stop services and rm config.
silent: true
aliases: [ clean all data and services ]
deps: [ down-supervisord ]
cmds:
- |
export PATH={{.PATH}}
rm -rf ${CODE_BASE}/testnets
rm-all:
desc: rm config and data in testnet dir.
silent: true
aliases: [ clean all data in testnet dir ]
cmds:
- |
export PATH={{.PATH}}
rm -rf ${CODE_BASE}/testnets