Adds AddIngressPath and RemoveIngressPath to the Deployer interface for managing per-component ingress rules in monorepo projects. - Implement conflict retry logic for concurrent ingress updates - Add K8s client interface for testability - Add comprehensive unit tests for ingress path operations - Add component deployment and teardown methods to ComponentService - Update service templates with OpenAPI spec improvements - Add evolving-app cookbook tree for reference - Split resources.go into resources_ingress.go for path-based routing - Split component.go into component_deploy.go for deployment helpers Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
97 lines
2.9 KiB
YAML
97 lines
2.9 KiB
YAML
name: evolving-app
|
|
description: Deploy an app and then evolve it with a new feature using SDLC
|
|
version: 1
|
|
|
|
vars:
|
|
project_name: "" # Required
|
|
service_name: "api"
|
|
feature_slug: "health-check-v2"
|
|
|
|
steps:
|
|
# --- Phase 1: Bootstrap (copied from composable-app) ---
|
|
create-project:
|
|
description: Create project with monorepo skeleton
|
|
action: api
|
|
method: POST
|
|
endpoint: /project
|
|
body:
|
|
name: "{{ .vars.project_name }}"
|
|
description: "Evolving App Test"
|
|
outputs:
|
|
- project_id: .data.name
|
|
- domain: .data.domain
|
|
|
|
add-service:
|
|
description: Add backend service component
|
|
depends_on: [create-project]
|
|
action: api
|
|
method: POST
|
|
endpoint: "/projects/{{ .outputs.create-project.project_id }}/components"
|
|
body:
|
|
type: service
|
|
name: "{{ .vars.service_name }}"
|
|
template: service
|
|
outputs:
|
|
- service_path: .data.path
|
|
|
|
wait-init-pipeline:
|
|
description: Wait for initial build
|
|
depends_on: [add-service]
|
|
action: wait_pipeline
|
|
project_id: "{{ .outputs.create-project.project_id }}"
|
|
max_attempts: 60
|
|
|
|
# --- Phase 2: Evolve (Add Feature) ---
|
|
create-feature:
|
|
description: Register new feature in SDLC
|
|
depends_on: [wait-init-pipeline]
|
|
action: api
|
|
method: POST
|
|
endpoint: "/projects/{{ .outputs.create-project.project_id }}/sdlc/features"
|
|
body:
|
|
slug: "{{ .vars.feature_slug }}"
|
|
title: "Add health check V2"
|
|
|
|
generate-spec:
|
|
description: Ask Claude to spec the feature
|
|
depends_on: [create-feature]
|
|
action: api
|
|
method: POST
|
|
endpoint: "/projects/{{ .outputs.create-project.project_id }}/builds"
|
|
body:
|
|
prompt: "/spec-feature {{ .vars.feature_slug }}"
|
|
auto_commit: true
|
|
auto_push: true
|
|
git_clone_url: "https://git.threesix.ai/jordan/{{ .outputs.create-project.project_id }}.git"
|
|
outputs:
|
|
- build_id: .data.task_id
|
|
|
|
wait-feature-build:
|
|
description: Wait for the spec generation to finish
|
|
depends_on: [generate-spec]
|
|
action: shell
|
|
command: |
|
|
echo "Waiting for build {{ .outputs.generate-spec.build_id }}..."
|
|
for i in {1..60}; do
|
|
STATUS=$(curl -s "$RDEV_API_URL/builds/{{ .outputs.generate-spec.build_id }}" -H "X-API-Key: $RDEV_API_KEY" | jq -r '.data.status // .status')
|
|
echo "Attempt $i: Build status is $STATUS"
|
|
if [ "$STATUS" == "completed" ]; then exit 0; fi
|
|
if [ "$STATUS" == "failed" ]; then echo "Build failed"; exit 1; fi
|
|
sleep 5
|
|
done
|
|
echo "Timeout waiting for build"
|
|
exit 1
|
|
|
|
check-artifact:
|
|
description: Verify spec artifact was created
|
|
depends_on: [wait-feature-build]
|
|
action: api
|
|
method: GET
|
|
endpoint: "/projects/{{ .outputs.create-project.project_id }}/sdlc/features/{{ .vars.feature_slug }}/artifacts"
|
|
|
|
teardown:
|
|
- description: Delete project
|
|
action: api
|
|
method: DELETE
|
|
endpoint: "/project/{{ .outputs.create-project.project_id }}"
|