Some checks failed
Build and Push to Harbor / build-and-push (push) Has been cancelled
This commit implements a full webhook-triggered CI/CD pipeline: **Flux Components:** - Flux Receiver for Gitea webhooks (generic type, NodePort 30090) - Notification Provider for notify.caffeinetux.com - Alerts for git updates, builds, and deployments **Build Automation:** - Webhook listener deployment that triggers on git push - Automatic Kaniko build jobs with git metadata - Images tagged with both 'latest' and commit SHA - Build notifications sent at start and completion **Workflow:** 1. Push to Gitea → Webhooks trigger Flux receiver & build listener 2. Build listener creates Kaniko job with commit info 3. Kaniko builds and pushes to Harbor (latest + SHA tags) 4. Flux auto-deploys latest image to cluster 5. Notifications sent to notify.caffeinetux.com at each stage **Configuration:** - Token: APMvTuncQJmm6vd - Webhook path: /hook/548969c2b24c717fe9e5af8c78ddfeec40d3024c270c7e85ac8f986259aeec9a - Build trigger: http://<node-ip>:30091/webhook - Comprehensive setup documentation in WEBHOOK_SETUP_GUIDE.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
---
|
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
kind: Kustomization
|
|
metadata:
|
|
name: neon-vortex-build
|
|
namespace: flux-system
|
|
spec:
|
|
interval: 1m
|
|
path: ./
|
|
prune: false
|
|
sourceRef:
|
|
kind: GitRepository
|
|
name: neon-vortex
|
|
namespace: flux-system
|
|
targetNamespace: default
|
|
patches:
|
|
- patch: |
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: neon-vortex-build
|
|
namespace: default
|
|
spec:
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
git-commit: "${GIT_COMMIT:-unknown}"
|
|
spec:
|
|
initContainers:
|
|
- name: git-clone
|
|
env:
|
|
- name: GIT_COMMIT
|
|
value: "${GIT_COMMIT:-main}"
|
|
containers:
|
|
- name: kaniko
|
|
args:
|
|
- "--dockerfile=/workspace/htlm/Dockerfile"
|
|
- "--context=/workspace/htlm"
|
|
- "--destination=images.caffeinetux.com/apps/neon-vortex:latest"
|
|
- "--destination=images.caffeinetux.com/apps/neon-vortex:${GIT_COMMIT:-latest}"
|
|
- "--cache=true"
|
|
- "--cache-repo=images.caffeinetux.com/apps/neon-vortex/cache"
|
|
target:
|
|
kind: Job
|
|
name: neon-vortex-build
|
|
postBuild:
|
|
substituteFrom:
|
|
- kind: ConfigMap
|
|
name: git-commit-info
|
|
optional: true
|
|
healthChecks:
|
|
- apiVersion: batch/v1
|
|
kind: Job
|
|
name: neon-vortex-build
|
|
namespace: default
|