-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
249 lines (215 loc) · 7.01 KB
/
Taskfile.yml
File metadata and controls
249 lines (215 loc) · 7.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
version: "3"
vars:
COMPOSE_FILE: deploy/docker-compose.yml
tasks:
default:
desc: List available tasks
cmds:
- task --list
generate:
desc: Run all code generators
cmds:
- task: generate:api
generate:api:
desc: Generate Go types and server interface from OpenAPI spec
dir: core
cmds:
- go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config api/oapi-codegen.yaml api/openapi.yaml
sources:
- api/openapi.yaml
- api/oapi-codegen.yaml
generates:
- api/gen/server.gen.go
build:
desc: Build everything (containers, server, MCP, enclave, CLI, shell shim, UI, docs)
cmds:
- task: build:docker
- task: build:server
- task: build:mcp
- task: build:enclave
- task: build:cli
- task: build:sh
- task: build:ui
- task: build:docs
build:docker:
desc: Build all Docker containers
cmds:
- docker compose -f {{.COMPOSE_FILE}} build
build:server:
desc: Build the Go server binary locally
vars:
VERSION: dev
COMMIT:
sh: git rev-parse --short HEAD
cmds:
- go build -ldflags "-X github.com/ALRubinger/aileron/core/version.Version={{.VERSION}} -X github.com/ALRubinger/aileron/core/version.Commit={{.COMMIT}}" -o build/server ./core/server
build:mcp:
desc: Build the Aileron MCP server binary locally
vars:
VERSION: dev
COMMIT:
sh: git rev-parse --short HEAD
cmds:
- go build -ldflags "-X github.com/ALRubinger/aileron/core/version.Version={{.VERSION}} -X github.com/ALRubinger/aileron/core/version.Commit={{.COMMIT}}" -o build/aileron-mcp ./cmd/aileron-mcp
build:enclave:
desc: Build the enclave binary locally
vars:
VERSION: dev
COMMIT:
sh: git rev-parse --short HEAD
cmds:
- go build -ldflags "-X github.com/ALRubinger/aileron/core/version.Version={{.VERSION}} -X github.com/ALRubinger/aileron/core/version.Commit={{.COMMIT}}" -o build/aileron-enclave ./cmd/aileron-enclave
build:cli:
desc: Build the aileron CLI binary locally
vars:
VERSION: dev
COMMIT:
sh: git rev-parse --short HEAD
cmds:
- go build -ldflags "-X github.com/ALRubinger/aileron/core/version.Version={{.VERSION}} -X github.com/ALRubinger/aileron/core/version.Commit={{.COMMIT}}" -o build/aileron ./cmd/aileron
build:sh:
desc: Build the aileron-sh shell shim binary locally
cmds:
- go build -o build/aileron-sh ./cmd/aileron-sh
build:ui:
desc: Install UI dependencies and build
dir: ui
cmds:
- pnpm install
- pnpm run build
build:docs:
desc: Install docs dependencies and build
dir: docs
cmds:
- pnpm install
- mkdir -p public
- cp ../core/api/openapi.yaml public/openapi.yaml
- pnpm run build
mcp:setup:
desc: Build and register the Aileron MCP server with Claude Code
cmds:
- task: build:mcp
- claude mcp add --scope project aileron -e AILERON_URL=http://localhost:8080 -- ./build/aileron-mcp
up:
desc: Start all services via Docker Compose
cmds:
- test -f deploy/.env || cp deploy/.env.example deploy/.env
- docker compose -f {{.COMPOSE_FILE}} up {{.CLI_ARGS}}
down:
desc: Stop all services
cmds:
- docker compose -f {{.COMPOSE_FILE}} down {{.CLI_ARGS}}
clean:
desc: Stop services and remove volumes
cmds:
- docker compose -f {{.COMPOSE_FILE}} down -v --remove-orphans
- rm -rf build
- rm -rf ui/.svelte-kit ui/build ui/node_modules
- rm -rf docs/.astro docs/dist docs/node_modules
- rm -f docs/public/openapi.yaml
logs:
desc: Tail service logs
cmds:
- docker compose -f {{.COMPOSE_FILE}} logs -f {{.CLI_ARGS}}
ps:
desc: Show running services
cmds:
- docker compose -f {{.COMPOSE_FILE}} ps
dev:ui:
desc: Run the UI dev server locally
dir: ui
cmds:
- pnpm dev
dev:docs:
desc: Run the docs dev server locally
dir: docs
cmds:
- mkdir -p public
- cp ../core/api/openapi.yaml public/openapi.yaml
- pnpm dev
lint:
desc: Run linters
cmds:
- task: lint:go
- task: lint:ui
- task: lint:docs
lint:go:
desc: Vet Go code
cmds:
- go vet ./core/... ./enclave/... ./cmd/aileron/... ./cmd/aileron-enclave/... ./cmd/aileron-mcp/... ./cmd/aileron-sh/...
lint:ui:
desc: Check the UI for type errors
dir: ui
cmds:
- pnpm check
lint:docs:
desc: Check the docs site for type errors
dir: docs
cmds:
- pnpm check
test:
desc: Run all tests
cmds:
- task: test:go
- task: test:ui
test:ui:
desc: Run UI unit and component tests
dir: ui
cmds:
- pnpm install
- pnpm test
test:go:
desc: Run Go tests
cmds:
- go test ./core/... ./enclave/... ./cmd/aileron/... ./cmd/aileron-enclave/... ./cmd/aileron-mcp/... ./cmd/aileron-sh/...
test:integration:
desc: Run integration tests against running services
cmds:
- go test -tags=integration -race ./test/integration/...
env:
AILERON_API_URL: http://localhost:8080
AILERON_UI_URL: http://localhost:3000
test:integration:coverage:
desc: Start a coverage-instrumented stack, run integration tests, and emit coverage-integration.txt
cmds:
- mkdir -p gocoverdir && chmod 777 gocoverdir
- docker compose -f {{.COMPOSE_FILE}} -f deploy/docker-compose.coverage.yml up -d --build --wait
- go test -tags=integration -race ./test/integration/...
- docker compose -f {{.COMPOSE_FILE}} -f deploy/docker-compose.coverage.yml stop server
- go tool covdata textfmt -i=gocoverdir -o=coverage-integration.txt
- docker compose -f {{.COMPOSE_FILE}} -f deploy/docker-compose.coverage.yml down -v
env:
AILERON_API_URL: http://localhost:8080
AILERON_UI_URL: http://localhost:3000
ci:
desc: Run the full CI pipeline locally
cmds:
- task: generate
- task: lint
- task: test
- task: build:docker
- task: up -- -d --build --wait
- task: test:integration
- task: down
release:snapshot:
desc: Test GoReleaser locally (snapshot, no publish)
cmds:
- goreleaser release --snapshot --clean
health:
desc: Check the server health endpoint
cmds:
- curl -s http://localhost:8080/v1/health | head -c 500 && echo
check:oauth-callback:
desc: Verify stable OAuth callback domain configuration
cmds:
- |
if [ -z "${AILERON_OAUTH_CALLBACK_BASE_URL}" ]; then
echo "AILERON_OAUTH_CALLBACK_BASE_URL is not set — using dynamic callback URLs (default)"
else
echo "Stable callback URL: ${AILERON_OAUTH_CALLBACK_BASE_URL}"
echo "Trusted origins: ${AILERON_TRUSTED_ORIGINS:-<not set>}"
echo ""
echo "Register these URIs with your OAuth providers:"
echo " Google: ${AILERON_OAUTH_CALLBACK_BASE_URL}/auth/google/callback"
echo " GitHub: ${AILERON_OAUTH_CALLBACK_BASE_URL}/auth/github/callback"
fi