File tree 4 files changed +64
-15
lines changed
4 files changed +64
-15
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ version: "3"
2
2
3
3
silent : true
4
4
5
+ env :
6
+ CGO_ENABLED : " 0"
7
+ GO111MODULE : " on"
8
+
5
9
vars :
6
10
version : ' {{.version | default "dev"}}'
7
11
@@ -190,7 +194,6 @@ tasks:
190
194
env :
191
195
GOOS : " {{.targetOS}}"
192
196
GOARCH : " {{.targetArch}}"
193
- CGO_ENABLED : 0
194
197
195
198
build :
196
199
desc : " Build trx dev binary."
@@ -203,16 +206,51 @@ tasks:
203
206
204
207
_image:build :
205
208
cmds :
206
- - docker build {{.CLI_ARGS}} --platform=linux/amd64 - f "{{.dfilePath}}" -t "{{.imageName}}" "{{.context | default "."}}"
209
+ - docker build {{.CLI_ARGS}} -f "{{.dfilePath}}" -t "{{.imageName}}" "{{.context | default "."}}"
207
210
208
211
image:build:builder :
209
- desc : ' Build werf builder image. Important vars: "imageName".'
212
+ desc : ' Build main builder image. Important vars: "imageName".'
210
213
cmds :
211
214
- task : _image:build
212
215
vars :
213
- dfilePath : Dockerfile
216
+ dfilePath : scripts/builder/Dockerfile
217
+ imageName :
218
+ sh : " echo ghcr.io/flant/trx/builder:$(git rev-parse HEAD)"
219
+
220
+ _image:push :
221
+ cmds :
222
+ - docker push {{.CLI_ARGS}} "{{.imageName}}"
223
+
224
+ image:publish:builder :
225
+ desc : ' Build and publish main builder image. Important vars: "imageName".'
226
+ deps :
227
+ - image:build:builder
228
+ cmds :
229
+ - task : _image:push
230
+ vars :
214
231
imageName :
215
- sh : " echo registry-write.werf.io/trx/builder:$(git rev-parse HEAD)"
232
+ sh : " echo ghcr.io/flant/trx/builder:$(git rev-parse HEAD)"
233
+
234
+ clean :
235
+ desc : " Clean all temporary files and build artifacts."
236
+ deps :
237
+ - clean:binaries
238
+
239
+ clean:binaries :
240
+ desc : " Clean all built binaries."
241
+ deps :
242
+ - clean:binaries:dev
243
+ - clean:binaries:dist
244
+
245
+ clean:binaries:dev :
246
+ desc : " Clean built dev binaries."
247
+ cmds :
248
+ - rm -rf ./bin
249
+
250
+ clean:binaries:dist :
251
+ desc : " Clean built release binaries."
252
+ cmds :
253
+ - rm -rf ./dist
216
254
217
255
verify:dist:binaries :
218
256
desc : " Verify that the distributable binaries are built and have correct platform/arch."
Original file line number Diff line number Diff line change
1
+ FROM --platform=linux/amd64 golang:1.23-bookworm@sha256:3149bc5043fa58cf127fd8db1fdd4e533b6aed5a40d663d4f4ae43d20386665f
2
+ ENV DEBIAN_FRONTEND=noninteractive
3
+
4
+ RUN apt-get -y update && \
5
+ apt-get -y install apt-utils gcc-aarch64-linux-gnu file && \
6
+ curl -sSLO https://github.com/go-task/task/releases/download/v3.33.1/task_linux_amd64.deb && \
7
+ apt-get -y install ./task_linux_amd64.deb && \
8
+ rm -rf ./task_linux_amd64.deb /var/cache/apt/* /var/lib/apt/lists/* /var/log/*
9
+
10
+ ADD cmd /.trx-deps/cmd
11
+ ADD internal /.trx-deps/internal
12
+ ADD go.mod go.sum Taskfile.dist.yaml /.trx-deps/
13
+ ADD scripts /.trx-deps/scripts
14
+
15
+ RUN cd /.trx-deps && \
16
+ task build:dist version=base && \
17
+ task verify:dist:binaries version=base && \
18
+ rm -rf /.trx-deps
19
+
20
+ RUN git config --global --add safe.directory /git
Original file line number Diff line number Diff line change 1
- docker_image : registry-write.werf. io/trx/builder:29fec0a40d0236b70d9f974a4ffa9feab063525c @sha256:a197644941c7597b6ceddcc7037db52bf8db8a65a9c2207063b5e07815670d66
1
+ dockerImage : ghcr. io/flant/ trx/builder:53607301c1d0b7f6c75e52a5784382abb53ac8ce @sha256:95071741e79de3c075fb2fd7c3fdddc54150f53d3f8fe7867d26ffb39c2e05c0
2
2
commands :
3
3
- task build:dist version={{ .Tag }}
4
4
- task verify:dist:binaries version={{ .Tag }}
You can’t perform that action at this time.
0 commit comments