Standardize CI/CD: use homelab-frontend pattern (REGISTRY_PAT, docker:27-cli, all repos)

This commit is contained in:
Story Crater Bot
2026-08-23 16:05:18 -07:00
parent f459ae5a5d
commit 80f20474b6
5 changed files with 603 additions and 109 deletions
+80
View File
@@ -0,0 +1,80 @@
# Quick Start — One-Time CI/CD Setup (3 minutes)
## 🚀 Setup
### 1. Get Registry Token
```bash
# Ask for the 'rock' org token (already has write:package)
# OR create one: https://git.riotpiao.com/user/settings/tokens
# - Scope: write:package
# - Copy the token value
```
### 2. Add Secret to Repository
```bash
# Go to: https://git.riotpiao.com/rock/poimen-memory/settings/secrets
# Add: Name=REGISTRY_PAT, Value=<token>
# Save
```
### 3. Push to Trigger Build
```bash
cd ~/workplace/Poimen/memory
git commit --allow-empty -m "Trigger CI"
git push
```
---
## ✨ That's It!
After these 3 steps, every push automatically:
- ✅ Runs all tests
- ✅ Builds Docker image
- ✅ Pushes to `forgejo.riotpiao.com/rock/poimen-memory:latest`
- ✅ ArgoCD deploys to K8s
---
## 📊 Monitor
```bash
# Watch build
https://git.riotpiao.com/rock/poimen-memory/actions
# Watch deployment
kubectl get pods -n poimen -l app.kubernetes.io/name=poimen-memory -w
```
---
## 🧪 Test When Ready
```bash
# Port forward
kubectl port-forward -n poimen svc/poimen-memory 8080:80 &
# Health check
curl http://localhost:8080/health
```
---
## 🔄 Apply to Other Repos
Same pattern for `poimen`, `poimen-workflows`, etc:
1. Add `REGISTRY_PAT` secret
2. Copy `.forgejo/workflows/build.yaml` from this repo
3. Push
See `CI-SETUP.md` for details.
---
## Pattern Details
- **Based on**: homelab-frontend (proven pattern)
- **Runner**: docker:27-cli (supports buildx)
- **Tags**: commit SHA + "latest"
- **No manual steps**: Fully automated