Simplify CI/CD pipeline with CronJob-based build trigger
Some checks failed
Build and Push to Harbor / build-and-push (push) Has been cancelled

- Add CronJob that polls git repository every 2 minutes for changes
- Automatically triggers Kaniko build jobs when new commits detected
- Images tagged with both 'latest' and 'v1.0.<commit-sha>' for versioning
- Remove complex Tekton/Flux image automation dependencies
- Add comprehensive simple CI/CD setup documentation

This provides a reliable, simple CI/CD pipeline:
1. Push code to Gitea
2. CronJob detects changes within 2 minutes
3. Kaniko builds and pushes to Harbor
4. Flux deploys latest image automatically

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Neon Vortex
2025-11-22 21:59:33 -05:00
parent 473de53cff
commit d919cbd263
6 changed files with 550 additions and 2 deletions

View File

@@ -0,0 +1,36 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: neon-vortex-build
namespace: flux-system
spec:
interval: 5m
path: ./
prune: false
sourceRef:
kind: GitRepository
name: neon-vortex
targetNamespace: default
patches:
- patch: |
apiVersion: batch/v1
kind: Job
metadata:
name: neon-vortex-build
namespace: default
spec:
template:
metadata:
name: neon-vortex-build
target:
kind: Job
name: neon-vortex-build
postBuild:
substitute:
GIT_COMMIT: "unknown"
healthChecks:
- apiVersion: batch/v1
kind: Job
name: neon-vortex-build
namespace: default