Switch the CI templates to the /build HTTP endpoints

This commit is contained in:
2026-08-05 20:32:25 +02:00
parent 6dd21822cc
commit c3b92f1ff2
3 changed files with 15 additions and 16 deletions
+5 -5
View File
@@ -12,8 +12,8 @@ projects, in the same spirit as
- `example-woodpecker.yaml` — Woodpecker pipeline: version → build
(Rust, `wasm32-unknown-unknown` target + `wasm-bindgen` in the
`git.teletypegames.org/internal/bevy-builder` image) → binaries
(native linux-x64 + mingw win-x64) → upload (scp to the droparea) →
update (calls the teletypegames `/update` endpoint with
(native linux-x64 + mingw win-x64) → upload (HTTP POST to `/build/upload`) →
update (calls the teletypegames `/build/publish` endpoint with
`platform=bevy`).
- `builder.Dockerfile` — the CI builder image: `rust:1-bookworm`
(glibc — bevy's native linux build needs alsa/udev, which does not
@@ -45,7 +45,7 @@ projects, in the same spirit as
ships the CLI — when bumping the version, rebuild the image with
the matching `--build-arg WASM_BINDGEN_VERSION`.
3. Copy `example-woodpecker.yaml` to `.woodpecker.yaml` and add the
`droparea_ssh_password` / `update_secret_key` secrets in Woodpecker.
`update_secret_key` secret in Woodpecker.
4. Copy `example-tasks.json` to `.vscode/tasks.json` and replace the
binary name (`bevydemo`) with `$(PROJECT)`.
@@ -54,8 +54,8 @@ Local WASM builds additionally need
(`cargo install wasm-bindgen-cli --version 0.2.100`).
The pipeline uploads `$(PROJECT)-$(VERSION).html.zip` and the native
binary zips (`-win-x64.zip`, `-linux-x64.zip`) to the droparea, then
triggers `/update?platform=bevy&name=$(PROJECT)&version=$(VERSION)`.
binary zips (`-win-x64.zip`, `-linux-x64.zip`) via `/build/upload`, then
triggers `/build/publish?platform=bevy&name=$(PROJECT)&version=$(VERSION)`.
The API's `BinaryAttachment` concern picks up the
`<name>-<version>-<slug>.zip` files automatically and registers them
as `win_x64` / `linux_x64` release assets.
+6 -4
View File
@@ -122,12 +122,14 @@ ci-upload:
for slug in $(BINARY_SLUGS); do \
[ -f "$(PROJECT)-$$VERSION-$$slug.zip" ] && BINS="$$BINS $(PROJECT)-$$VERSION-$$slug.zip"; \
done; \
sshpass -p "$(DROPAREA_SSH_PASSWORD)" scp -o StrictHostKeyChecking=no -P $(DROPAREA_PORT) \
$$FILE $$META_DST $$BINS \
$(DROPAREA_USER)@$(DROPAREA_HOST):$(DROPAREA_TARGET_PATH)/
for f in $$FILE $$META_DST $$BINS; do \
curl -fsS -H "X-Update-Secret: $(UPDATE_SECRET)" \
-F "file=@$$f" \
"$(UPDATE_SERVER)/build/upload?name=$(PROJECT)&version=$$VERSION" || exit 1; \
done
ci-update:
@VERSION=$$(cat $(VERSION_FILE)); \
curl "$(UPDATE_SERVER)/update?secret=$(UPDATE_SECRET)&name=$(PROJECT)&platform=bevy&version=$$VERSION"
curl -fsS -X POST -H "X-Update-Secret: $(UPDATE_SECRET)" "$(UPDATE_SERVER)/build/publish?name=$(PROJECT)&platform=bevy&version=$$VERSION"
.PHONY: all build run wasm export binaries binary-linux binary-win watch clean ci-version ci-export ci-binaries ci-upload ci-update
+4 -7
View File
@@ -20,14 +20,11 @@ steps:
- name: upload
image: alpine
environment:
DROPAREA_HOST: vps.teletype.hu
DROPAREA_PORT: 2223
DROPAREA_TARGET_PATH: /home/drop
DROPAREA_USER: drop
DROPAREA_SSH_PASSWORD:
from_secret: droparea_ssh_password
UPDATE_SERVER: https://teletypegames.org
UPDATE_SECRET:
from_secret: update_secret_key
commands:
- apk add --no-cache make openssh-client sshpass
- apk add --no-cache make curl
- make ci-upload
- name: update