Skip to content

Commit aeb459f

Browse files
committed
fix(ci): make scaffold e2e hermetic vs the official runtime image + add changeset
The docker e2e builds examples/docker, whose runtime stage is now FROM ghcr.io/objectstack-ai/objectstack — a tag that doesn't exist until the first release publishes it. Build that base locally from docker/Dockerfile inside the job instead of pulling: kills the chicken-and-egg AND makes every PR exercise the official runtime Dockerfile itself. Also trigger the e2e on docker/** changes, and add the feature changeset (minor on @objectstack/cli). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0162o68e5w3bpUBEVRQboUGG
1 parent 2bdec7e commit aeb459f

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@objectstack/cli': minor
3+
---
4+
5+
feat(docker): official runtime image `ghcr.io/objectstack-ai/objectstack`
6+
7+
ObjectStack now ships an official, versioned Docker runtime image instead of
8+
only a copy-me example. The image packages Node 22 + a pinned
9+
`@objectstack/cli` + `os start` (non-root `node` user, `/api/v1/health`
10+
HEALTHCHECK, `OS_ARTIFACT_PATH` / `OS_PORT=8080` preset), published
11+
multi-arch (amd64/arm64) on every release with tags mirroring the CLI
12+
version (`X.Y.Z` / `X.Y` / `X` / `latest`).
13+
14+
Deploying an app is now:
15+
16+
```dockerfile
17+
FROM ghcr.io/objectstack-ai/objectstack:<version>
18+
COPY --chown=node:node dist/objectstack.json /srv/app/objectstack.json
19+
```
20+
21+
or, with no image build at all, `docker run` the official image with the
22+
artifact mounted (or `OS_ARTIFACT_PATH` pointing at an `https://` URL).
23+
`examples/docker` and the Self-Hosted Deployment docs now build on the
24+
official image; the self-built runtime Dockerfile remains documented for
25+
air-gapped registries.

.github/workflows/scaffold-e2e.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020
paths:
2121
- 'packages/create-objectstack/**'
2222
- 'examples/docker/**'
23+
- 'docker/**'
2324
- '.github/workflows/scaffold-e2e.yml'
2425
schedule:
2526
- cron: '23 3 * * *'
@@ -114,13 +115,24 @@ jobs:
114115
curl -fsS http://localhost:8080/api/v1/ready
115116
kill "$SERVER_PID"
116117
118+
- name: Build official runtime image from this checkout
119+
# examples/docker builds FROM ghcr.io/objectstack-ai/objectstack.
120+
# Build that base HERE from docker/Dockerfile instead of pulling, so
121+
# (a) PRs exercise the official runtime Dockerfile itself, and
122+
# (b) the e2e stays hermetic — no dependency on a prior release
123+
# having published the tag (chicken-and-egg on the very first one).
124+
run: |
125+
docker build -t ghcr.io/objectstack-ai/objectstack:latest \
126+
--build-arg OS_CLI_VERSION=latest \
127+
"$GITHUB_WORKSPACE/docker"
128+
117129
- name: Docker build and run (examples/docker)
118130
run: |
119131
cd "$RUNNER_TEMP/e2e-app"
120132
cp "$GITHUB_WORKSPACE"/examples/docker/Dockerfile \
121133
"$GITHUB_WORKSPACE"/examples/docker/docker-compose.yml \
122134
"$GITHUB_WORKSPACE"/examples/docker/.dockerignore .
123-
docker build -t e2e-app .
135+
docker build --pull=false -t e2e-app .
124136
docker run -d --name e2e -p 18080:8080 \
125137
-e OS_SECRET_KEY="$(openssl rand -hex 32)" \
126138
-e OS_AUTH_SECRET="$(openssl rand -hex 32)" \

0 commit comments

Comments
 (0)