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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

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

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,49 @@ 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
with:
fetch-depth: 0

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Initialize orun workspace
uses: sourceplane/kiox-action@v2.1.2

Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Sumo Platform Ops Stack
# Stack Tectonic

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

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

`oci://ghcr.io/sourceplane/sumo-platform-ops-stack:<version>`
`oci://ghcr.io/sourceplane/stack-tectonic:<version>`

## Use the OCI package in `intent.yaml`

Expand All @@ -13,17 +13,17 @@ Pin the catalog as a composition source in the consumer repository:
```yaml
compositions:
sources:
- name: sumo-platform-ops
- name: stack-tectonic
kind: oci
ref: oci://ghcr.io/sourceplane/sumo-platform-ops-stack:0.10.0
ref: oci://ghcr.io/sourceplane/stack-tectonic:0.11.0
```

Keep the `orun` runtime pinned separately in `kiox.yaml`, then plan or run against that intent. The full consumer workflow is in [docs/using-this-stack-from-oci.md](docs/using-this-stack-from-oci.md).

## Catalog layout

```text
sumo-platform-ops-stack/
stack-tectonic/
├── stack.yaml
├── README.md
├── docs/
Expand Down Expand Up @@ -62,10 +62,11 @@ Every composition now lives under `compositions/<name>/` so docs, examples, test

## Trust signals

- `scripts/verify.sh` validates docs metadata and runs the stack OCI dry-run publish path.
- `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.
- GitHub workflows split verification, docs checks, scorecard generation, and releases into separate pipelines.
- Current scores are intentionally conservative until each composition has runnable examples and deeper smoke coverage.
- 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.

## Docs

Expand All @@ -81,6 +82,6 @@ Every composition now lives under `compositions/<name>/` so docs, examples, test
1. Update `stack.yaml`.
2. Run `./scripts/verify.sh`.
3. Merge to `main`.
4. Push a matching tag like `v0.10.0`.
4. Push a matching tag like `v0.11.0`.

The release workflow publishes the OCI package, creates the GitHub release, and uploads the generated registry index.
18 changes: 11 additions & 7 deletions compositions/cloudflare-pages-terraform/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cloudflare-pages-terraform

`cloudflare-pages-terraform` is an exported Orun composition in the Sumo Platform Ops catalog.
`cloudflare-pages-terraform` is an exported Orun composition in the Stack Tectonic catalog.

## Purpose

Expand All @@ -12,12 +12,16 @@ Verify static site builds locally and reconcile a Git-backed Cloudflare Pages pr
- **Path:** `compositions/cloudflare-pages-terraform`
- **Definition:** `compositions.yaml`

## Catalog status
## Example fixtures

This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract.
These sample assets are excerpted or adapted from `example-platform-repo` so the contract is documented with realistic consumer-repo shapes.

## Next steps
- `examples/docs-site-git`

- add runnable example assets under `examples/`
- add composition-specific smoke coverage under `tests/`
- keep the contract description in `compositions.yaml` aligned with the repo scorecard
## Test fixtures

- `tests/smoke`

## Verification

`./scripts/verify-composition.sh cloudflare-pages-terraform` checks that this composition keeps its contract, fixture, and generated-doc scaffolding intact.
4 changes: 2 additions & 2 deletions compositions/cloudflare-pages-terraform/examples/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Examples for cloudflare-pages-terraform

Put consumer-facing example assets for `cloudflare-pages-terraform` here.
These fixtures are excerpted or adapted from `example-platform-repo` to show how `cloudflare-pages-terraform` looks inside a consumer repository.

The scorecard only counts example assets beyond this placeholder README.
- `examples/docs-site-git`
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: sourceplane.io/v1
kind: Component

metadata:
name: docs-site-git-source

spec:
type: cloudflare-pages-terraform
domain: platform-docs
subscribe:
environments:
- production
inputs:
siteDir: ../../website
installCommand: npm ci
buildCommand: npm run docs:build
cloudflareBuildCommand: npm ci && npm run docs:build
outputDir: docs-build
rootDir: website
nodeVersion: "20"
terraformDir: .
terraformVersion: 1.9.8
projectName: example-platform-docs-terraform
productionBranch: main
repoOwner: sourceplane
repoName: example-platform-repo
labels:
team: platform
layer: foundation
surface: docs
runtime: cloudflare
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
terraform {
required_version = ">= 1.6.0"

required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 4.32"
}
}
}

variable "account_id" {
description = "Cloudflare account identifier used by the Pages project"
type = string
}

variable "project_name" {
description = "Cloudflare Pages project name"
type = string
}

variable "production_branch" {
description = "Git branch used for production deployments"
type = string
}

variable "repo_owner" {
description = "GitHub owner connected to the Cloudflare Pages project"
type = string
}

variable "repo_name" {
description = "GitHub repository connected to the Cloudflare Pages project"
type = string
}

variable "build_command" {
description = "Build command Cloudflare Pages runs for the site"
type = string
}

variable "destination_dir" {
description = "Directory Cloudflare Pages publishes after the build"
type = string
}

variable "root_dir" {
description = "Repository-root relative directory Cloudflare Pages builds from"
type = string
}

resource "cloudflare_pages_project" "docs" {
account_id = var.account_id
name = var.project_name
production_branch = var.production_branch

source {
type = "github"

config {
owner = var.repo_owner
repo_name = var.repo_name
production_branch = var.production_branch
deployments_enabled = true
production_deployment_enabled = true
preview_deployment_setting = "all"
pr_comments_enabled = true
}
}

build_config {
build_caching = true
build_command = var.build_command
destination_dir = var.destination_dir
root_dir = var.root_dir
}
}

output "pages_project_name" {
value = cloudflare_pages_project.docs.name
description = "Cloudflare Pages project name"
}

output "pages_subdomain" {
value = cloudflare_pages_project.docs.subdomain
description = "Cloudflare Pages subdomain assigned to the project"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: Deployment Paths
---

## Wrangler direct upload {#wrangler-direct-upload}

The `cloudflare-pages` composition builds the site in CI and then uses `wrangler pages deploy` to
push the generated `docs-build/` directory to a Direct Upload Pages project.

Key inputs:

- `siteDir`
- `installCommand`
- `buildCommand`
- `outputDir`
- `projectName`
- `productionBranch`

That path is useful when you want deployment to follow the build artifact produced by Gluon.

## Turbo worker deploy {#turbo-worker-deploy}

The `cloudflare-worker-turbo` composition installs pnpm, runs workspace-level install, build, and
typecheck commands, then uses the app-local Wrangler config to publish a Worker from `apps/*`.

Key inputs:

- `workspaceDir`
- `appDir`
- `installCommand`
- `buildCommand`
- `typecheckCommand`
- `deployCommand`
- `pnpmVersion`

That path is useful when each Worker app owns its own `component.yaml` and `wrangler.jsonc`, but the
real install and build still need to happen from the monorepo root.

## Turbo Pages direct upload {#turbo-pages-direct-upload}

The `cloudflare-pages-turbo` composition follows the same workspace-root install and build pattern,
then direct-uploads an app-specific output directory such as `apps/web-console/dist`.

Key inputs:

- `workspaceDir`
- `appDir`
- `installCommand`
- `buildCommand`
- `outputDir`
- `projectName`
- `pnpmVersion`

That path is useful when the Pages app lives under `apps/`, the component manifest should stay next
to the app, and Gluon should still own the final build artifact.

## Terraform Git source {#terraform-git-source}

The `cloudflare-pages-terraform` composition validates the same local site build, then reconciles a
`cloudflare_pages_project` resource that points Cloudflare Pages at this GitHub repository.

Key inputs:

- `terraformDir`
- `rootDir`
- `cloudflareBuildCommand`
- `repoOwner`
- `repoName`
- `projectName`

That path is useful when you want the Pages project itself versioned as infrastructure and let
Cloudflare build from Git after the project is connected.

## Turbo Pages Terraform {#turbo-pages-terraform}

The `cloudflare-pages-turbo-terraform` composition keeps the component manifest inside an `apps/*`
directory, performs the local pnpm and Turbo build from the workspace root, and then points Terraform
at an `infra/*` directory that owns the Cloudflare Pages project contract.

Key inputs:

- `workspaceDir`
- `appDir`
- `outputDir`
- `destinationDir`
- `rootDir`
- `terraformDir`
- `cloudflareBuildCommand`
- `pnpmVersion`

That path is useful when platform teams want app-local manifests for discovery and ownership, but
still want the Cloudflare Pages project itself versioned under infrastructure code.

## Choosing between them

- Use Wrangler when Gluon should own the build artifact and publish it directly.
- Use Terraform when Gluon should manage the Pages project contract and let Cloudflare own the Git-triggered deploys.
- Use the Turbo variants when the reusable manifest should live inside an app or package directory while the install and build still need the monorepo root.
Loading
Loading