Add CI builder image and use it in the pipeline
builder.Dockerfile bakes the build step's dependencies into git.teletype.hu/internal/* so the pipeline no longer installs packages on every run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,4 +30,17 @@ The pipeline uploads `$(PROJECT)-$(VERSION).html.zip` to the droparea,
|
||||
then triggers
|
||||
`/update?platform=ebitengine&name=$(PROJECT)&version=$(VERSION)`.
|
||||
|
||||
## Builder image
|
||||
|
||||
`builder.Dockerfile` bakes the pipeline's build-step dependencies
|
||||
(Go + git/make/zip/curl) into
|
||||
`git.teletype.hu/internal/ebitengine-builder`, so the build step
|
||||
no longer runs `apk add` on every run:
|
||||
|
||||
```sh
|
||||
docker build --platform linux/amd64 -f builder.Dockerfile \
|
||||
-t git.teletype.hu/internal/ebitengine-builder:latest .
|
||||
docker push git.teletype.hu/internal/ebitengine-builder:latest
|
||||
```
|
||||
|
||||
Detailed documentation lives on the wiki: `/development/ebitengine`.
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# CI builder image for Ebitengine projects: Go toolchain + packaging tools.
|
||||
# Used by the `build` step in example-woodpecker.yaml instead of installing
|
||||
# zip/make/curl on every pipeline run.
|
||||
#
|
||||
# Build & push (the CI runner is linux/amd64):
|
||||
# docker build --platform linux/amd64 -f builder.Dockerfile \
|
||||
# -t git.teletype.hu/internal/ebitengine-builder:latest .
|
||||
# docker push git.teletype.hu/internal/ebitengine-builder:latest
|
||||
|
||||
# 1.26 covers every current game repo's go.mod directive (1.25.x, 1.26.x).
|
||||
FROM golang:1.26-alpine
|
||||
|
||||
RUN apk add --no-cache git make zip curl
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
CMD ["/bin/sh"]
|
||||
@@ -6,9 +6,8 @@ steps:
|
||||
- make ci-version
|
||||
|
||||
- name: build
|
||||
image: golang:1.25.6-alpine
|
||||
image: git.teletype.hu/internal/ebitengine-builder:latest
|
||||
commands:
|
||||
- apk add --no-cache zip make curl
|
||||
- make ci-export
|
||||
|
||||
- name: artifact
|
||||
|
||||
Reference in New Issue
Block a user