ai-code-battle/manifests/acb-eventsensor.yml
jedarden 9771c5dd00 ci: update acb-eventsensor.yml to match deployed forgejo-webhooks EventSource
The staging manifest now reflects the actual deployed state in declarative-config:
- EventSource name: forgejo-webhooks (was acb-webhook)
- Endpoint: /ai-code-battle (was /push)
- Namespace: argo-events (was argo-workflows)
- Includes all three triggers: acb-images-build, acb-site-build, acb-bots-build
- Adds Forgejo webhook registration instructions

The forgejo-webhooks EventSource and updated webhook IngressRoute were added
to declarative-config to complete the CI wiring for jedarden/ai-code-battle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 23:32:54 -04:00

135 lines
4 KiB
YAML

# Argo Events resources for AI Code Battle CI triggers
# Deployed to: declarative-config/k8s/iad-ci/argo-events/
#
# Components:
# 1. forgejo-eventsource.yml — Forgejo generic webhook listener for push events
# 2. ai-code-battle-sensor.yml — routes push events to the appropriate WorkflowTemplates
#
# The sensor triggers on every push to master:
# - acb-images-build: builds all Go service images (matchmaker, worker, evolver, etc.)
# - acb-site-build: builds web SPA and wraps as container image artifact
# - acb-bots-build: builds all 6 strategy bot images, pushes to Docker Hub,
# updates declarative-config deployment tags
#
# Webhook to register in Forgejo (jedarden/ai-code-battle):
# Settings → Webhooks → Add Webhook → Gitea
# URL: https://webhooks-ci.ardenone.com/ai-code-battle
# Content type: application/json
# Trigger: Push events
#
---
# EventSource (deployed as forgejo-eventsource.yml in declarative-config)
apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
name: forgejo-webhooks
namespace: argo-events
spec:
eventBusName: default
webhook:
ai-code-battle:
port: "12000"
endpoint: /ai-code-battle
method: POST
service:
ports:
- port: 12000
targetPort: 12000
---
# Sensor (deployed as ai-code-battle-sensor.yml in declarative-config)
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: ai-code-battle-ci-sensor
namespace: argo-events
spec:
eventBusName: default
dependencies:
- name: acb-push
eventSourceName: forgejo-webhooks
eventName: ai-code-battle
filters:
data:
- path: headers.X-Forgejo-Event
type: string
value:
- push
- path: body.ref
type: string
value:
- refs/heads/master
triggers:
- template:
name: acb-images-trigger
argoWorkflow:
operation: submit
source:
resource:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: acb-images-build-
namespace: argo-workflows
spec:
workflowTemplateRef:
name: acb-images-build
arguments:
parameters:
- name: commit-sha
value: ""
parameters:
- src:
dependencyName: acb-push
dataKey: body.after
dest: spec.arguments.parameters.0.value
conditions: acb-push
- template:
name: acb-site-trigger
argoWorkflow:
operation: submit
source:
resource:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: acb-site-build-
namespace: argo-workflows
spec:
workflowTemplateRef:
name: acb-site-build
arguments:
parameters:
- name: commit-sha
value: ""
parameters:
- src:
dependencyName: acb-push
dataKey: body.after
dest: spec.arguments.parameters.0.value
conditions: acb-push
- template:
name: acb-bots-trigger
argoWorkflow:
operation: submit
source:
resource:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: acb-bots-build-
namespace: argo-workflows
spec:
workflowTemplateRef:
name: acb-bots-build
arguments:
parameters:
- name: commit-sha
value: ""
parameters:
- src:
dependencyName: acb-push
dataKey: body.after
dest: spec.arguments.parameters.0.value
conditions: acb-push