docs(ci): update Gitea CI docs + add /gitea-ci workflow
- Add key settings, runner log path, detailed repo/job matrix to GITEA_LOCAL_CI.md - Add /gitea-ci Windsurf workflow: start, push all, check status, view logs - Add learning_ai_local_memory_gpt to repos.txt
This commit is contained in:
parent
acb866774c
commit
e427282234
107
.windsurf/workflows/gitea-ci.md
Normal file
107
.windsurf/workflows/gitea-ci.md
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
---
|
||||||
|
description: Start Gitea local CI, check status, or push all repos to trigger CI runs
|
||||||
|
---
|
||||||
|
|
||||||
|
# Gitea Local CI Workflow
|
||||||
|
|
||||||
|
Manages the self-hosted Gitea + act_runner CI infrastructure for all ByteLyst repos.
|
||||||
|
See `docs/devops/GITEA_LOCAL_CI.md` for full documentation.
|
||||||
|
|
||||||
|
## 1. Ensure Gitea and act_runner are running
|
||||||
|
|
||||||
|
// turbo
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew services start gitea && brew services start act_runner && sleep 2 && brew services list | grep -E "gitea|act_runner"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2. Verify Gitea is responding
|
||||||
|
|
||||||
|
// turbo
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -s http://localhost:3300/api/v1/version | python3 -c "import sys,json; print('Gitea', json.load(sys.stdin)['version'])"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 3. Push all workspace repos to Gitea to trigger CI
|
||||||
|
|
||||||
|
This pushes `main` to the `gitea` remote for every repo that has one configured.
|
||||||
|
Each push triggers the `.gitea/workflows/ci.yml` workflow on the local runner.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
REPOS_DIR="/Users/sd9235/code/mygh"
|
||||||
|
for repo in \
|
||||||
|
learning_ai_common_plat \
|
||||||
|
learning_voice_ai_agent \
|
||||||
|
learning_multimodal_memory_agents \
|
||||||
|
learning_ai_clock \
|
||||||
|
learning_ai_fastgap \
|
||||||
|
learning_ai_jarvis_jr \
|
||||||
|
learning_ai_peakpulse \
|
||||||
|
learning_ai_notes \
|
||||||
|
learning_ai_flowmonk \
|
||||||
|
learning_ai_trails \
|
||||||
|
learning_ai_local_memory_gpt; do
|
||||||
|
echo "=== $repo ==="
|
||||||
|
cd "$REPOS_DIR/$repo"
|
||||||
|
git push gitea main 2>&1 | tail -2
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
## 4. Wait for jobs to process, then check results
|
||||||
|
|
||||||
|
Wait ~2 minutes per repo for the runner (capacity=1) to process the queue, then check results.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
REPOS_DIR="/Users/sd9235/code/mygh"
|
||||||
|
for repo in \
|
||||||
|
learning_ai_common_plat \
|
||||||
|
learning_ai_clock \
|
||||||
|
learning_ai_trails \
|
||||||
|
learning_ai_flowmonk \
|
||||||
|
learning_ai_notes \
|
||||||
|
learning_ai_fastgap \
|
||||||
|
learning_ai_jarvis_jr \
|
||||||
|
learning_ai_peakpulse \
|
||||||
|
learning_ai_local_memory_gpt \
|
||||||
|
learning_voice_ai_agent \
|
||||||
|
learning_multimodal_memory_agents; do
|
||||||
|
echo "=== $repo ==="
|
||||||
|
curl -s -u "bytelyst:bytelyst123" "http://localhost:3300/api/v1/repos/bytelyst/$repo/actions/jobs" | python3 -c "
|
||||||
|
import sys, json
|
||||||
|
jobs = json.load(sys.stdin).get('jobs', [])
|
||||||
|
if not jobs:
|
||||||
|
print(' (no jobs)')
|
||||||
|
else:
|
||||||
|
max_run = max(j['run_id'] for j in jobs)
|
||||||
|
for j in jobs:
|
||||||
|
if j['run_id'] == max_run:
|
||||||
|
c = j.get('conclusion','pending')
|
||||||
|
icon = '✅' if c == 'success' else '❌' if c == 'failure' else '⏳'
|
||||||
|
print(f' {icon} {c:12} {j[\"name\"]}')
|
||||||
|
" 2>/dev/null
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
## 5. (Optional) View logs for a failing job
|
||||||
|
|
||||||
|
Replace REPO and JOB_ID with the repo name and job number from step 4.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
REPO="learning_ai_clock"
|
||||||
|
JOB_ID="76"
|
||||||
|
curl -s -u "bytelyst:bytelyst123" "http://localhost:3300/api/v1/repos/bytelyst/$REPO/actions/jobs/$JOB_ID/logs" | tail -30
|
||||||
|
```
|
||||||
|
|
||||||
|
## 6. (Optional) Stop Gitea services
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew services stop act_runner && brew services stop gitea
|
||||||
|
```
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
- **Runner not picking up jobs:** `brew services restart act_runner`
|
||||||
|
- **Stale .next/lock:** `rm -f /Users/sd9235/code/mygh/learning_ai_common_plat/dashboards/*-web/.next/lock`
|
||||||
|
- **Permission denied on tsc:** `chmod +x /Users/sd9235/code/mygh/learning_ai_common_plat/node_modules/.bin/*`
|
||||||
|
- **Check runner log:** `tail -30 /opt/homebrew/var/log/act_runner.err`
|
||||||
@ -12,6 +12,7 @@ learning_ai_peakpulse
|
|||||||
learning_ai_notes
|
learning_ai_notes
|
||||||
learning_ai_flowmonk
|
learning_ai_flowmonk
|
||||||
learning_ai_trails
|
learning_ai_trails
|
||||||
|
learning_ai_local_memory_gpt
|
||||||
learning_ai_smart_auth
|
learning_ai_smart_auth
|
||||||
learning_ai_auth_app
|
learning_ai_auth_app
|
||||||
learning_ai_productivity_web
|
learning_ai_productivity_web
|
||||||
|
|||||||
@ -44,11 +44,20 @@ git push gitea main
|
|||||||
| ------------------- | --------------------------------------------- |
|
| ------------------- | --------------------------------------------- |
|
||||||
| Gitea config | `/opt/homebrew/var/gitea/custom/conf/app.ini` |
|
| Gitea config | `/opt/homebrew/var/gitea/custom/conf/app.ini` |
|
||||||
| Runner config | `/opt/homebrew/etc/act_runner/config.yaml` |
|
| Runner config | `/opt/homebrew/etc/act_runner/config.yaml` |
|
||||||
| Runner registration | `/opt/homebrew/var/act_runner/.runner` |
|
| Runner registration | `/opt/homebrew/var/lib/act_runner/.runner` |
|
||||||
|
| Runner stderr log | `/opt/homebrew/var/log/act_runner.err` |
|
||||||
| Gitea data | `/opt/homebrew/var/gitea/data/` |
|
| Gitea data | `/opt/homebrew/var/gitea/data/` |
|
||||||
| Gitea logs | `/opt/homebrew/var/gitea/log/` |
|
| Gitea logs | `/opt/homebrew/var/gitea/log/` |
|
||||||
| Job work dir | `~/.cache/act/` |
|
| Job work dir | `~/.cache/act/` |
|
||||||
|
|
||||||
|
## Key Settings
|
||||||
|
|
||||||
|
- **Runner capacity:** 1 (sequential jobs — prevents concurrent builds conflicting on shared common-plat)
|
||||||
|
- **Runner labels:** `ubuntu-latest:host`, `macos-latest:host`, `macos-15:host`, `self-hosted:host`
|
||||||
|
- **Gitea port:** 3300 (avoids conflict with Next.js dev servers on 3000)
|
||||||
|
- **Actions URL:** `github` (Gitea resolves action references via GitHub mirror)
|
||||||
|
- **Git credential helper:** Configured globally for `localhost:3300` to auto-authenticate
|
||||||
|
|
||||||
## How It Works
|
## How It Works
|
||||||
|
|
||||||
1. You `git push gitea main` from any repo
|
1. You `git push gitea main` from any repo
|
||||||
@ -59,11 +68,29 @@ git push gitea main
|
|||||||
|
|
||||||
## Repos Configured
|
## Repos Configured
|
||||||
|
|
||||||
All 14 repos have:
|
All 14 repos have a `gitea` remote → `http://localhost:3300/bytelyst/<repo>.git`.
|
||||||
|
|
||||||
- `gitea` remote → `http://localhost:3300/bytelyst/<repo>.git`
|
11 repos with CI workflows (`.gitea/workflows/ci.yml`):
|
||||||
- `.gitea/workflows/ci.yml` — Gitea Actions workflow (adapted from GitHub Actions)
|
|
||||||
- `.github/workflows/ci.yml.disabled` — GitHub Actions disabled
|
| Repo | Jobs |
|
||||||
|
| ----------------------------------- | --------------------------------- |
|
||||||
|
| `learning_ai_common_plat` | Build, Test & Typecheck |
|
||||||
|
| `learning_ai_clock` | Backend + Web |
|
||||||
|
| `learning_ai_trails` | Backend + SDK + Web |
|
||||||
|
| `learning_ai_flowmonk` | Backend + Web |
|
||||||
|
| `learning_ai_notes` | Backend + Web + Mobile |
|
||||||
|
| `learning_ai_fastgap` | Mobile + Backend + Web |
|
||||||
|
| `learning_ai_jarvis_jr` | Backend + Web |
|
||||||
|
| `learning_ai_peakpulse` | Backend |
|
||||||
|
| `learning_ai_local_memory_gpt` | Backend + Web |
|
||||||
|
| `learning_voice_ai_agent` | Backend + Python + User Dashboard |
|
||||||
|
| `learning_multimodal_memory_agents` | Backend + Web + KMP |
|
||||||
|
|
||||||
|
3 repos without CI workflows (docs/config only):
|
||||||
|
|
||||||
|
- `learning_ai_auth_app`, `learning_ai_smart_auth`, `learning_ai_productivity_web`
|
||||||
|
|
||||||
|
GitHub Actions disabled via `.github/workflows/ci.yml.disabled` in all repos.
|
||||||
|
|
||||||
## Differences from GitHub Actions
|
## Differences from GitHub Actions
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user