Files
ci-ai/workflows/ci-failure.example.yml
Tarik Moussa 2ae14a51e4 feat: self-hosted LLM backend — point all workflows at the Jetson (Ollama, model=coder)
The Jetson Orin Nano (JetPack 7.2, Ollama on GPU) is live, so ci-ai runs fully
self-hosted: no Anthropic key, no cloud, no per-PR cost. AI_PROVIDER=ollama,
AI_BASE_URL=http://192.168.178.103:11434/v1. The Pi runner reaches it LAN-direct
(SNAT to .48, allowed by the Jetson UFW). Removed the dead ANTHROPIC_API_KEY
secret declarations.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 21:58:07 +02:00

42 lines
1.6 KiB
YAML

# Feature C — KI-Analyse fehlgeschlagener CI-Jobs.
# KEIN eigenständiger Workflow, sondern ein MUSTER: diesen if:failure()-Job ans
# Ende eines echten Build/Test-Workflows hängen (needs: auf die CI-Jobs setzen).
# Er nimmt das geteilte Job-Log und lässt die KI die Ursache erklären.
#
# Beispiel-Einbettung in einen vorhandenen Workflow:
#
# jobs:
# build:
# runs-on: eulernest
# container: ghcr.io/catthehacker/ubuntu:act-latest
# steps:
# - uses: actions/checkout@v4
# - name: Build
# run: |
# set -o pipefail
# make 2>&1 | tee /tmp/ci.log # <-- Log mitschneiden
#
# explain-on-failure:
# needs: [build]
# if: failure()
# runs-on: eulernest
# container: python:3.12-slim
# steps:
# - name: Tooling
# run: apt-get update -qq && apt-get install -y -qq --no-install-recommends git ca-certificates
# - name: KI-Analyse
# env:
# AI_PROVIDER: ollama
# AI_MODEL: coder
# AI_BASE_URL: http://192.168.178.103:11434/v1
# GITEA_TOKEN: ${{ github.token }}
# GITEA_API: https://git.eulernest.eu/api/v1
# run: |
# git clone --depth 1 https://git.eulernest.eu/user2595/ci-ai.git /opt/ci-ai
# python /opt/ci-ai/scripts/ai_explain.py ci-failure /tmp/ci.log
#
# Hinweis: /tmp wird zwischen Jobs NICHT automatisch geteilt. Für echtes Cross-
# Job-Log-Sharing das Log als actions/upload-artifact hochladen und im Folge-Job
# wieder herunterladen — ODER (einfacher) den explain-Schritt als if:failure()
# direkt in DENSELBEN Job hängen, wie in security.example.yml gezeigt.