diff --git a/README.md b/README.md index 67a204e..fd72dc0 100644 --- a/README.md +++ b/README.md @@ -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`. diff --git a/builder.Dockerfile b/builder.Dockerfile new file mode 100644 index 0000000..825f0b8 --- /dev/null +++ b/builder.Dockerfile @@ -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"] diff --git a/example-woodpecker.yaml b/example-woodpecker.yaml index ade6b4c..63e654a 100644 --- a/example-woodpecker.yaml +++ b/example-woodpecker.yaml @@ -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