Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/docs.yml

This file was deleted.

28 changes: 17 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ jobs:
- name: Verify catalog
run: ./scripts/verify.sh

- name: Publish OCI package
run: |
orun publish ghcr.io/sourceplane/stack-tectonic:${STACK_VERSION} \
--root . \
--version "${STACK_VERSION}"

- name: Create GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -62,8 +56,20 @@ jobs:
--title "${GITHUB_REF_NAME}" \
--generate-notes

- name: Upload registry index
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload "${GITHUB_REF_NAME}" registry/index.json --clobber

# Runs after the release so the tag and release notes are the record of
# record before the immutable artifact is pushed. The target is passed
# explicitly: with no ref, orun infers ghcr.io/<owner>/<repo>/<package>
# from the git remote, which is the wrong repository path.
- name: Publish OCI package
run: |
orun publish "ghcr.io/sourceplane/stack-tectonic:${STACK_VERSION}" \
--root . \
--version "${STACK_VERSION}"

- name: Confirm package is pullable
run: |
orun fetch "ghcr.io/sourceplane/stack-tectonic:${STACK_VERSION}" \
--output "${RUNNER_TEMP}/published" --overwrite
test -f "${RUNNER_TEMP}/published/stack.yaml"
echo "published $(ls "${RUNNER_TEMP}/published/compositions" | wc -l) composition(s)"

35 changes: 0 additions & 35 deletions .github/workflows/scorecard.yml

This file was deleted.

31 changes: 3 additions & 28 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,8 @@ permissions:
packages: read

jobs:
composition-fixtures:
name: Composition fixture (${{ matrix.composition }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
composition:
- cloudflare-pages
- cloudflare-pages-turbo
- cloudflare-pages-terraform
- cloudflare-pages-turbo-terraform
- cloudflare-worker
- cloudflare-worker-turbo
- terraform
- helm-chart
- helm-values
- turbo-package
- workspace
steps:
- uses: actions/checkout@v4

- name: Make helper scripts executable
run: chmod +x scripts/*.sh

- name: Verify composition fixtures
run: ./scripts/verify-composition.sh "${{ matrix.composition }}"

verify-stack:
name: Verify stack catalog
needs: composition-fixtures
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -60,5 +32,8 @@ jobs:
- name: Make helper scripts executable
run: chmod +x scripts/*.sh

# Structurally validates every composition contract, resolves the publish
# target, then packs the shipped layers and resolves them back through a
# throwaway consumer intent — the same path a consuming repo runs.
- name: Verify catalog
run: ./scripts/verify.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.workspace/
.DS_Store
error.log
101 changes: 67 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stack Tectonic

Versioned OCI catalog for reusable Orun compositions, blueprints, examples, and release metadata.
Versioned OCI catalog of reusable Orun compositions, starter examples, and release metadata.

This repository is the source of truth for the stack published to:

Expand All @@ -15,7 +15,7 @@ compositions:
sources:
- name: stack-tectonic
kind: oci
ref: oci://ghcr.io/sourceplane/stack-tectonic:0.12.0
ref: oci://ghcr.io/sourceplane/stack-tectonic:0.13.0
```

Pin the catalog in `intent.yaml`, then run it with Orun. The full consumer setup is in [docs/using-this-stack-from-oci.md](docs/using-this-stack-from-oci.md), and the default GitHub Actions workflow template is documented in [docs/remote-state-matrix-ci.md](docs/remote-state-matrix-ci.md).
Expand All @@ -27,46 +27,76 @@ stack-tectonic/
├── stack.yaml
├── README.md
├── docs/
├── blueprints/
├── compositions/
├── examples/
├── scripts/
├── registry/
└── .github/workflows/
```

`orun publish` ships the layers a consumer actually resolves: `stack.yaml`, `compositions/`, and `examples/`.

## Composition layout

Every composition lives under `compositions/<name>/` and is decomposed into four kinds of file:

```text
compositions/<name>/
├── composition.yaml # kind: Composition — schemaRef, defaultJob, defaultProfile, jobs[], profiles[]
├── schema.yaml # kind: ComponentSchema — JSON Schema (draft-07) for component parameters
├── jobs/<job>.yaml # kind: JobTemplate — declares capabilities[] and the steps[] that implement them
└── profiles/<p>.yaml # kind: ExecutionProfile — selects a subset of a job's capabilities
```

Each step in a job template is tagged with a `capability`, and a profile lists the capabilities it
includes. That is how a plan-only lane and a release lane share one job template instead of
duplicating steps. Components pick a profile per environment:

```yaml
spec:
type: cloudflare-pages
subscribe:
environments:
- name: staging
profile: verify
- name: production
profile: deploy
```

## Compositions

| Composition | Category | Purpose |
| --- | --- | --- |
| `cloudflare-pages` | hosting | Direct-upload Cloudflare Pages delivery |
| `cloudflare-pages-turbo` | hosting | Pages delivery from pnpm and Turbo monorepos |
| `cloudflare-pages-terraform` | platform | Terraform-managed Cloudflare Pages projects |
| `cloudflare-pages-turbo-terraform` | platform | Monorepo Pages delivery plus Terraform reconciliation |
| `cloudflare-worker` | edge | Cloudflare Worker validation and deploy jobs |
| `cloudflare-worker-turbo` | edge | Worker delivery from pnpm and Turbo monorepos |
| `terraform` | infrastructure | Terraform fmt, init, and validate jobs |
| `helm-chart` | kubernetes | Helm chart verification |
| `helm-values` | kubernetes | Helm values validation |
| `turbo-package` | developer-experience | Shared package verification in Turbo workspaces |
| `workspace` | developer-experience | Workspace-backed provider smoke jobs |

Every composition now lives under `compositions/<name>/` so docs, examples, tests, and future registry metadata can grow beside the contract instead of around a flat root.

## Blueprints

| Blueprint | Uses | Focus |
| --- | --- | --- |
| `nextjs-cloudflare` | `workspace`, `turbo-package`, `cloudflare-pages-turbo`, `cloudflare-pages-terraform` | Edge-hosted Next.js monorepos with Terraform-managed Pages |
| `edge-worker-platform` | `workspace`, `terraform`, `cloudflare-worker`, `helm-values` | Worker-first delivery with infra and environment overlays |
| Composition | Category | Profiles (default first) | Purpose |
| --- | --- | --- | --- |
| `cloudflare-domain` | dns | `apply`, `plan-only` | Cloudflare zones plus Pages/Worker custom domain attachments, managed with Terraform |
| `cloudflare-pages` | hosting | `verify`, `pull-request`, `deploy` | Cloudflare Pages build, verify, and direct-upload deploy pipeline |
| `cloudflare-pages-turbo` | hosting | `verify`, `pull-request`, `deploy` | Cloudflare Pages deployment built from a pnpm and Turbo monorepo |
| `cloudflare-pages-terraform` | platform | `verify`, `pull-request`, `release` | Cloudflare Pages deployment managed with Terraform |
| `cloudflare-pages-turbo-terraform` | platform | `verify`, `pull-request`, `release` | Turbo monorepo Pages build reconciled with Terraform |
| `cloudflare-worker` | edge | `verify`, `pull-request`, `deploy` | Cloudflare Worker build, verify, and deploy pipeline |
| `cloudflare-worker-turbo` | edge | `verify`, `pull-request`, `deploy` | Cloudflare Worker delivery from a Turborepo build |
| `cloudflare-workers-assets-turbo` | edge | `verify`, `pull-request`, `deploy` | Worker + Static Assets single-bundle delivery for apps that emit a Worker entrypoint plus an `ASSETS` directory |
| `terraform` | infrastructure | `apply`, `plan-only`, `local` | Terraform validation and planning for multi-tenant SaaS infrastructure components |
| `db-migrate` | data | `apply`, `plan` | Database migration runner — plan on pull requests, apply on merge |
| `publish-stack` | release | `dry-run`, `verify`, `release` | Publish an Orun stack to an OCI registry with dry-run validation |
| `turbo-package` | developer-experience | `verify`, `quick-check` | Shared package verification in a pnpm and Turbo workspace |

Most compositions carry their own `README.md` with parameter and profile detail beside the contract.

## Trust signals

- `scripts/verify-composition.sh` enforces that every exported composition keeps real examples and smoke fixtures beside its contract.
- `scripts/verify.sh` validates generated docs and scores, checks every composition fixture, and runs the stack OCI dry-run publish path.
- `scripts/score.sh` generates `registry/index.json` with maturity scores and grades.
- Composition fixtures are excerpted or adapted from `example-platform-repo` so the catalog documents real repo shapes instead of synthetic placeholders.
- GitHub workflows split per-composition fixture checks, full catalog verification, docs checks, scorecard generation, and releases into separate pipelines.
- `scripts/verify.sh` is the single catalog gate. It structurally validates every
`compositions/*/composition.yaml` (`metadata.name` and `spec.type` must equal the directory name,
and `schema.yaml` plus `jobs/` must exist), resolves the publish target with
`orun publish --dry-run`, then stages and packs the shipped layers and resolves the packed
artifact back through a throwaway consumer intent using `kind: archive`, asserting every
composition exports.
- Packing and re-resolving is the part that carries weight: `orun publish --dry-run` only resolves
the manifest and target, so on its own it is no evidence the package is loadable by a consumer.
- `.github/workflows/verify.yml` runs that script on every pull request and every push to `main`.
- `.github/workflows/release.yml` runs the same script before publishing a tag.
- Where a composition ships a smoke fixture under `compositions/<name>/tests/`, it is excerpted or
adapted from a real consumer repository so the contract is documented with a real repo shape
instead of a synthetic placeholder. Five of the twelve have one today; see
[docs/roadmap.md](docs/roadmap.md).

## Docs

Expand All @@ -81,9 +111,12 @@ Every composition now lives under `compositions/<name>/` so docs, examples, test

## Release flow

1. Update `stack.yaml`.
1. Update `metadata.version` in `stack.yaml`.
2. Run `./scripts/verify.sh`.
3. Merge to `main`.
4. Push a matching tag like `v0.12.0`.
4. Push a matching tag like `v0.13.0`.

The release workflow publishes the OCI package, creates the GitHub release, and uploads the generated registry index.
The release workflow asserts the tag matches `stack.yaml`, reruns `./scripts/verify.sh`, creates the
GitHub release, then publishes the OCI package and confirms it is pullable with `orun fetch`. The
package is pushed after the release is created so the tag and release notes are the record of record
before the immutable artifact exists.
16 changes: 0 additions & 16 deletions blueprints/edge-worker-platform/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions blueprints/edge-worker-platform/blueprint.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions blueprints/edge-worker-platform/examples/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions blueprints/nextjs-cloudflare/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions blueprints/nextjs-cloudflare/blueprint.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions blueprints/nextjs-cloudflare/examples/README.md

This file was deleted.

Loading
Loading