@@ -14,8 +14,10 @@ variable "GIT_DATE" {
14
14
default = " 0"
15
15
}
16
16
17
+ // The default version to embed in the built images.
18
+ // During CI release builds this is set to <<pipeline.git.tag>>
17
19
variable "GIT_VERSION" {
18
- default = " docker " // original default as set in proxyd file, not used by full go stack, yet
20
+ default = " v0.0.0 "
19
21
}
20
22
21
23
variable "IMAGE_TAGS" {
@@ -27,148 +29,187 @@ variable "PLATFORMS" {
27
29
// Only a specify a single platform when `--load` ing into docker.
28
30
// Multi-platform is supported when outputting to disk or pushing to a registry.
29
31
// Multi-platform builds can be tested locally with: --set="*.output=type=image,push=false"
30
- default = " linux/amd64 "
32
+ default = " "
31
33
}
32
34
33
- target "op-stack-go" {
35
+ // Each of the services can have a customized version, but defaults to the global specified version.
36
+ variable "OP_NODE_VERSION" {
37
+ default = " ${ GIT_VERSION } "
38
+ }
39
+
40
+ variable "OP_BATCHER_VERSION" {
41
+ default = " ${ GIT_VERSION } "
42
+ }
43
+
44
+ variable "OP_PROPOSER_VERSION" {
45
+ default = " ${ GIT_VERSION } "
46
+ }
47
+
48
+ variable "OP_CHALLENGER_VERSION" {
49
+ default = " ${ GIT_VERSION } "
50
+ }
51
+
52
+ variable "OP_DISPUTE_MON_VERSION" {
53
+ default = " ${ GIT_VERSION } "
54
+ }
55
+
56
+ variable "OP_HEARTBEAT_VERSION" {
57
+ default = " ${ GIT_VERSION } "
58
+ }
59
+
60
+ variable "OP_PROGRAM_VERSION" {
61
+ default = " ${ GIT_VERSION } "
62
+ }
63
+
64
+ variable "CANNON_VERSION" {
65
+ default = " ${ GIT_VERSION } "
66
+ }
67
+
68
+ variable "OP_CONDUCTOR_VERSION" {
69
+ default = " ${ GIT_VERSION } "
70
+ }
71
+
72
+
73
+ target "op-node" {
34
74
dockerfile = " ops/docker/op-stack-go/Dockerfile"
35
75
context = " ."
36
76
args = {
37
77
GIT_COMMIT = " ${ GIT_COMMIT } "
38
78
GIT_DATE = " ${ GIT_DATE } "
79
+ OP_NODE_VERSION = " ${ OP_NODE_VERSION } "
39
80
}
40
- platforms = split (" ," , PLATFORMS)
41
- tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-stack-go:${ tag } " ]
42
- }
43
-
44
- target "op-node" {
45
- dockerfile = " Dockerfile"
46
- context = " ./op-node"
47
- args = {
48
- OP_STACK_GO_BUILDER = " op-stack-go"
49
- }
50
- contexts = {
51
- op- stack- go: " target:op-stack-go"
52
- }
81
+ target = " op-node-target"
53
82
platforms = split (" ," , PLATFORMS)
54
83
tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-node:${ tag } " ]
55
84
}
56
85
57
86
target "op-batcher" {
58
- dockerfile = " Dockerfile"
59
- context = " ./op-batcher "
87
+ dockerfile = " ops/docker/op-stack-go/ Dockerfile"
88
+ context = " ."
60
89
args = {
61
- OP_STACK_GO_BUILDER = " op-stack-go"
62
- }
63
- contexts = {
64
- op- stack- go: " target:op-stack-go"
90
+ GIT_COMMIT = " ${ GIT_COMMIT } "
91
+ GIT_DATE = " ${ GIT_DATE } "
92
+ OP_BATCHER_VERSION = " ${ OP_BATCHER_VERSION } "
65
93
}
94
+ target = " op-batcher-target"
66
95
platforms = split (" ," , PLATFORMS)
67
96
tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-batcher:${ tag } " ]
68
97
}
69
98
70
99
target "op-proposer" {
71
- dockerfile = " Dockerfile"
72
- context = " ./op-proposer "
100
+ dockerfile = " ops/docker/op-stack-go/ Dockerfile"
101
+ context = " ."
73
102
args = {
74
- OP_STACK_GO_BUILDER = " op-stack-go"
75
- }
76
- contexts = {
77
- op- stack- go: " target:op-stack-go"
103
+ GIT_COMMIT = " ${ GIT_COMMIT } "
104
+ GIT_DATE = " ${ GIT_DATE } "
105
+ OP_PROPOSER_VERSION = " ${ OP_PROPOSER_VERSION } "
78
106
}
107
+ target = " op-proposer-target"
79
108
platforms = split (" ," , PLATFORMS)
80
109
tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-proposer:${ tag } " ]
81
110
}
82
111
83
112
target "op-challenger" {
84
- dockerfile = " Dockerfile"
85
- context = " ./op-challenger "
113
+ dockerfile = " ops/docker/op-stack-go/ Dockerfile"
114
+ context = " ."
86
115
args = {
87
- OP_STACK_GO_BUILDER = " op-stack-go"
88
- }
89
- contexts = {
90
- op- stack- go: " target:op-stack-go"
116
+ GIT_COMMIT = " ${ GIT_COMMIT } "
117
+ GIT_DATE = " ${ GIT_DATE } "
118
+ OP_CHALLENGER_VERSION = " ${ OP_CHALLENGER_VERSION } "
91
119
}
120
+ target = " op-challenger-target"
92
121
platforms = split (" ," , PLATFORMS)
93
122
tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-challenger:${ tag } " ]
94
123
}
95
124
96
125
target "op-dispute-mon" {
97
- dockerfile = " Dockerfile"
98
- context = " ./op-dispute-mon "
126
+ dockerfile = " ops/docker/op-stack-go/ Dockerfile"
127
+ context = " ."
99
128
args = {
100
- OP_STACK_GO_BUILDER = " op-stack-go"
101
- }
102
- contexts = {
103
- op- stack- go: " target:op-stack-go"
129
+ GIT_COMMIT = " ${ GIT_COMMIT } "
130
+ GIT_DATE = " ${ GIT_DATE } "
131
+ OP_DISPUTE_MON_VERSION = " ${ OP_DISPUTE_MON_VERSION } "
104
132
}
133
+ target = " op-dispute-mon-target"
105
134
platforms = split (" ," , PLATFORMS)
106
135
tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-dispute-mon:${ tag } " ]
107
136
}
108
137
109
138
target "op-conductor" {
110
- dockerfile = " Dockerfile"
111
- context = " ./op-conductor "
139
+ dockerfile = " ops/docker/op-stack-go/ Dockerfile"
140
+ context = " ."
112
141
args = {
113
- OP_STACK_GO_BUILDER = " op-stack-go"
114
- }
115
- contexts = {
116
- op- stack- go: " target:op-stack-go"
142
+ GIT_COMMIT = " ${ GIT_COMMIT } "
143
+ GIT_DATE = " ${ GIT_DATE } "
144
+ OP_CONDUCTOR_VERSION = " ${ OP_CONDUCTOR_VERSION } "
117
145
}
146
+ target = " op-conductor-target"
118
147
platforms = split (" ," , PLATFORMS)
119
148
tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-conductor:${ tag } " ]
120
149
}
121
150
122
151
target "op-heartbeat" {
123
- dockerfile = " Dockerfile"
124
- context = " ./op-heartbeat "
152
+ dockerfile = " ops/docker/op-stack-go/ Dockerfile"
153
+ context = " ."
125
154
args = {
126
- OP_STACK_GO_BUILDER = " op-stack-go"
127
- }
128
- contexts = {
129
- op- stack- go: " target:op-stack-go"
155
+ GIT_COMMIT = " ${ GIT_COMMIT } "
156
+ GIT_DATE = " ${ GIT_DATE } "
157
+ OP_HEARTBEAT_VERSION = " ${ OP_HEARTBEAT_VERSION } "
130
158
}
159
+ target = " op-heartbeat-target"
131
160
platforms = split (" ," , PLATFORMS)
132
161
tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-heartbeat:${ tag } " ]
133
162
}
134
163
135
164
target "da-server" {
136
- dockerfile = " Dockerfile"
137
- context = " ./op-plasma "
165
+ dockerfile = " ops/docker/op-stack-go/ Dockerfile"
166
+ context = " ."
138
167
args = {
139
- OP_STACK_GO_BUILDER = " op-stack-go"
140
- }
141
- contexts = {
142
- op- stack- go: " target:op-stack-go"
168
+ GIT_COMMIT = " ${ GIT_COMMIT } "
169
+ GIT_DATE = " ${ GIT_DATE } "
143
170
}
171
+ target = " da-server-target"
144
172
platforms = split (" ," , PLATFORMS)
145
173
tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /da-server:${ tag } " ]
146
174
}
147
175
148
176
target "op-program" {
149
- dockerfile = " Dockerfile"
150
- context = " ./op-program "
177
+ dockerfile = " ops/docker/op-stack-go/ Dockerfile"
178
+ context = " ."
151
179
args = {
152
- OP_STACK_GO_BUILDER = " op-stack-go"
153
- }
154
- contexts = {
155
- op- stack- go: " target:op-stack-go"
180
+ GIT_COMMIT = " ${ GIT_COMMIT } "
181
+ GIT_DATE = " ${ GIT_DATE } "
182
+ OP_PROGRAM_VERSION = " ${ OP_PROGRAM_VERSION } "
156
183
}
184
+ target = " op-program-target"
157
185
platforms = split (" ," , PLATFORMS)
158
186
tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-program:${ tag } " ]
159
187
}
160
188
161
189
target "op-ufm" {
162
190
dockerfile = " ./op-ufm/Dockerfile"
163
- context = " ./"
164
- args = {
191
+ context = " ./"
192
+ args = {
165
193
// op-ufm dockerfile has no _ in the args
166
- GITCOMMIT = " ${ GIT_COMMIT } "
167
- GITDATE = " ${ GIT_DATE } "
194
+ GITCOMMIT = " ${ GIT_COMMIT } "
195
+ GITDATE = " ${ GIT_DATE } "
168
196
GITVERSION = " ${ GIT_VERSION } "
169
197
}
170
198
platforms = split (" ," , PLATFORMS)
171
- tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-ufm:${ tag } " ]
199
+ tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /op-ufm:${ tag } " ]
200
+ }
201
+
202
+ target "cannon" {
203
+ dockerfile = " ops/docker/op-stack-go/Dockerfile"
204
+ context = " ."
205
+ args = {
206
+ GIT_COMMIT = " ${ GIT_COMMIT } "
207
+ GIT_DATE = " ${ GIT_DATE } "
208
+ CANNON_VERSION = " ${ CANNON_VERSION } "
209
+ }
210
+ target = " cannon-target"
211
+ platforms = split (" ," , PLATFORMS)
212
+ tags = [for tag in split (" ," , IMAGE_TAGS) : " ${ REGISTRY } /${ REPOSITORY } /cannon:${ tag } " ]
172
213
}
173
214
174
215
target "proxyd" {
0 commit comments