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:
@@ -10,9 +10,12 @@ projects, in the same spirit as
|
||||
Woodpecker pipeline targets (`ci-version`, `ci-export`, `ci-upload`,
|
||||
`ci-update`).
|
||||
- `example-woodpecker.yaml` — Woodpecker pipeline: version → build
|
||||
(`node:22-alpine`, syntax check + web bundle) → upload (scp to the
|
||||
droparea) → update (calls the teletypegames `/update` endpoint with
|
||||
`platform=phaser`).
|
||||
(syntax check + web bundle in the
|
||||
`git.teletype.hu/internal/phaser-builder` image) → upload (scp to
|
||||
the droparea) → update (calls the teletypegames `/update` endpoint
|
||||
with `platform=phaser`).
|
||||
- `builder.Dockerfile` — the CI builder image: `node:22-alpine` with
|
||||
make/zip/curl baked in.
|
||||
- `example-tasks.json` — VS Code `.vscode/tasks.json` with the common
|
||||
dev tasks: **Serve** (`make serve`, default build task,
|
||||
`Cmd+Shift+B`), **Build Web** and **Make build**.
|
||||
@@ -42,4 +45,12 @@ The pipeline uploads `$(PROJECT)-$(VERSION).html.zip` to the droparea,
|
||||
then triggers
|
||||
`/update?platform=phaser&name=$(PROJECT)&version=$(VERSION)`.
|
||||
|
||||
## Builder image
|
||||
|
||||
```sh
|
||||
docker build --platform linux/amd64 -f builder.Dockerfile \
|
||||
-t git.teletype.hu/internal/phaser-builder:latest .
|
||||
docker push git.teletype.hu/internal/phaser-builder:latest
|
||||
```
|
||||
|
||||
Detailed documentation lives on the wiki: `/development/phaser`.
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# CI builder image for Phaser projects: Node (syntax check) + packaging
|
||||
# tools, so the pipeline's build step does not run apk on every run.
|
||||
#
|
||||
# Build & push (the CI runner is linux/amd64):
|
||||
# docker build --platform linux/amd64 -f builder.Dockerfile \
|
||||
# -t git.teletype.hu/internal/phaser-builder:latest .
|
||||
# docker push git.teletype.hu/internal/phaser-builder:latest
|
||||
|
||||
FROM node:22-alpine
|
||||
|
||||
RUN apk add --no-cache make zip curl git
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
CMD ["/bin/sh"]
|
||||
@@ -6,9 +6,8 @@ steps:
|
||||
- make ci-version
|
||||
|
||||
- name: build
|
||||
image: node:22-alpine
|
||||
image: git.teletype.hu/internal/phaser-builder:latest
|
||||
commands:
|
||||
- apk add --no-cache zip make curl
|
||||
- make ci-export
|
||||
|
||||
- name: upload
|
||||
|
||||
Reference in New Issue
Block a user