-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtaskfile.yml
More file actions
169 lines (147 loc) · 4.95 KB
/
taskfile.yml
File metadata and controls
169 lines (147 loc) · 4.95 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# https://taskfile.dev
version: "3"
tasks:
fmt:
desc: "Run buf format"
cmds:
- buf format -w
lint:
desc: "Run buf lint"
cmds:
- buf lint
proto:all:
desc: Generate all protobuf files for all services
cmds:
- task proto:gen:job-distributor
- task proto:gen:orchestrator
- task proto:gen:svr
- task proto:gen:rmn
- task proto:gen:workflows
- task proto:gen:billing
- task proto:gen:storage-service
- task proto:gen:op-catalog
- task proto:gen:data-feeds
- task proto:gen:rane
- task proto:gen:node-platform
- task proto:gen:linking-service
- task proto:gen:chainlink-ccv
- task go:mod:tidy
proto:gen:job-distributor:
desc: Generate all protobuf files for the job-distributor service
cmds:
- find ./job-distributor/ -name '*.pb.go' -delete
- buf generate --template buf.gen.jd.yaml
proto:gen:orchestrator:
desc: "Generate Go code from protobuf files for orchestrator"
cmds:
- find ./orchestrator/ -name '*.pb.go' -delete
- task: proto:wsrpc:gen
vars:
SERVICE_NAME: orchestrator
proto:gen:svr:
desc: "Generate Go code from protobuf files for svr"
cmds:
- find ./svr/ -name '*.pb.go' -delete
- task: proto:gen
vars:
SERVICE_NAME: svr
proto:gen:rmn:
desc: "Generate Go code from protobuf files for rmn"
cmds:
- find ./rmn/v1.6/go -name '*.pb.go' -delete
- |
proto_files=$(find ./rmn/v1.6/proto -name "*.proto")
protoc \
-I=./rmn/v1.6/proto \
--go_out=./rmn/v1.6/go \
--go_opt=paths=source_relative \
--go-grpc_out=./rmn/v1.6/go \
--go-grpc_opt=paths=source_relative \
$proto_files
- cd rmn/v1.6/rust && cargo build
proto:gen:workflows:
desc: "Generate Go code from protobuf files for workflows"
cmds:
- cd workflows && make generate
proto:gen:billing:
desc: "Generate Go code from protobuf files for billing"
cmds:
- cd billing && make generate
proto:gen:ring:
desc: "Generate Go code from protobuf files for ring"
cmds:
- cd ring && make generate
proto:gen:storage-service:
desc: "Generate Go code from protobuf files for storage-service"
cmds:
- cd storage-service && make generate
proto:gen:op-catalog:
desc: "Generate Go code from protobuf files for op-catalog"
cmds:
- find ./op-catalog/ -name '*.pb.go' -delete
- task: proto:gen
vars:
SERVICE_NAME: op-catalog
proto:gen:data-feeds:
desc: "Generate Go code from protobuf files for data-feeds"
cmds:
- find ./data-feeds/ -name '*.pb.go' -delete
- cd data-feeds && go generate ./...
proto:gen:rane:
desc: "Generate Go code from protobuf files for rane"
cmds:
- find ./rane/ -name '*.pb.go' -delete
- task: proto:gen
vars:
SERVICE_NAME: rane
proto:gen:node-platform:
desc: "Generate Go code from protobuf files for node-platform"
cmds:
- find ./node-platform/ -name '*.pb.go' -delete
- task: proto:gen
vars:
SERVICE_NAME: node-platform
proto:gen:linking-service:
desc: "Generate Go code from protobuf files for linking-service"
cmds:
- find ./linking-service/ -name '*.pb.go' -delete
- cd linking-service/go && go generate
proto:gen:chainlink-ccv:
desc: "Generate Go code from protobuf files for chainlink-ccv"
cmds:
- find ./chainlink-ccv/ -name '*.pb.go' -delete
- cd chainlink-ccv && buf generate
proto:clean:
desc: "Clean generated protobuf files for all services"
cmds:
- find ./job-distributor/ -name '*.pb.go' -delete
- find ./orchestrator/ -name '*.pb.go' -delete
- find ./svr/ -name '*.pb.go' -delete
- find ./billing/ -name '*.pb.go' -delete
- find ./workflows/ -name '*.pb.go' -delete
- find ./op-catalog/ -name '*.pb.go' -delete
- find ./data-feeds/ -name '*.pb.go' -delete
- find ./rane/ -name '*.pb.go' -delete
- find ./node-platform/ -name '*.pb.go' -delete
- find ./linking-service/ -name '*.pb.go' -delete
- find ./chainlink-ccv/ -name '*.pb.go' -delete
go:mod:tidy:
desc: "Run go mod tidy in each service folder"
cmds:
- go install github.com/jmank88/[email protected]
- asdf reshim golang
- gomods tidy
proto:gen:
internal: true
desc: "Generate Go code from protobuf files"
cmds:
- |
proto_files=$(find ./{{.SERVICE_NAME}} -name "*.proto")
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative $proto_files
proto:wsrpc:gen:
internal: true
desc: "Generate Go code from protobuf files with wsrpc"
cmds:
- |
proto_files=$(find ./{{.SERVICE_NAME}} -name "*.proto")
protoc --go_out=. --go_opt=paths=source_relative --go-wsrpc_out=. --go-wsrpc_opt=paths=source_relative $proto_files