From 356ed470d46a49b17517ff6a15dae6fa3b5921a9 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Thu, 6 Aug 2026 07:56:10 +0200 Subject: [PATCH] Serve the CI pipeline from the update server (marker config) --- .woodpecker.yaml | 34 +++------------------------------- Makefile | 42 +----------------------------------------- 2 files changed, 4 insertions(+), 72 deletions(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 9239669..328eafb 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -1,31 +1,3 @@ -steps: - - name: version - image: alpine - commands: - - 'apk add --no-cache make' - - 'make ci-version' - - - name: build - image: git.teletypegames.org/internal/c64-builder:latest - commands: - - 'make ci-build' - - - name: artifact - image: alpine - environment: - UPDATE_SERVER: https://teletypegames.org - UPDATE_SECRET: - from_secret: update_secret_key - commands: - - 'apk add --no-cache make curl' - - 'make ci-artifact' - - - name: publish - image: alpine - environment: - UPDATE_SERVER: https://teletypegames.org - UPDATE_SECRET: - from_secret: update_secret_key - commands: - - 'apk add --no-cache make curl' - - 'make ci-publish' +# The CI pipeline is served by the update server: GET /build/config?platform=c64 +platform: c64 +name: rabbit diff --git a/Makefile b/Makefile index 6fe1e76..f9ff2bc 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,6 @@ UNAME_S := $(shell uname -s) # CI/CD variables VERSION_FILE = .version -UPDATE_SERVER ?= https://teletypegames.org all: build @@ -45,43 +44,4 @@ rebuild: clear build rebuildrun: clear build run -# ----------------------------------------- -# CI/CD Pipeline targets -# ----------------------------------------- - -ci-version: - @VERSION=$$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' $(METADATA) | head -n 1); \ - if [ -z "$$VERSION" ]; then \ - echo "ERROR: no \"version\" field in $(METADATA)!"; \ - exit 1; \ - fi; \ - BRANCH=$${CI_COMMIT_BRANCH:-$${WOODPECKER_BRANCH}}; \ - BRANCH=$$(echo "$$BRANCH" | tr '/' '-'); \ - if [ "$$BRANCH" != "main" ] && [ "$$BRANCH" != "master" ] && [ -n "$$BRANCH" ]; then \ - VERSION=dev-$$VERSION-$$BRANCH; \ - fi; \ - echo "VERSION is: $$VERSION"; \ - echo $$VERSION > $(VERSION_FILE) - -ci-build: build - @VERSION=$$(cat $(VERSION_FILE)); \ - echo "==> Creating versioned files for $$VERSION"; \ - cp $(TARGET) $(PROJECT)-$$VERSION.prg; \ - cp $(METADATA) $(PROJECT)-$$VERSION.metadata.json; \ - ls -lh $(PROJECT)-$$VERSION.* - -ci-artifact: - @VERSION=$$(cat $(VERSION_FILE)); \ - echo "==> Uploading artifacts for version $$VERSION"; \ - for f in $(PROJECT)-$$VERSION.prg $(PROJECT)-$$VERSION.metadata.json; do \ - curl -fsS -H "X-Update-Secret: $(UPDATE_SECRET)" \ - -F "file=@$$f" \ - "$(UPDATE_SERVER)/build/upload?name=$(PROJECT)&version=$$VERSION" || exit 1; \ - done - -ci-publish: - @VERSION=$$(cat $(VERSION_FILE)); \ - echo "==> Publishing version $$VERSION"; \ - curl -fsS -X POST -H "X-Update-Secret: $(UPDATE_SECRET)" "$(UPDATE_SERVER)/build/publish?name=$(PROJECT)&platform=c64&version=$$VERSION" - -.PHONY: all deps build run clear rebuild rebuildrun ci-version ci-build ci-artifact ci-publish +.PHONY: all deps build run clear rebuild rebuildrun