Files
ai-agent-harness/docs/jenkins.md

2.4 KiB

Jenkins Workspace Verification

The root Jenkinsfile runs a read-only verify --all against the existing Windows multi-repository workspace. It detects stale generated documents, missing registered repositories, invalid profiles, and contract composition failures. It never composes files or performs Git operations.

Windows node setup

Configure one Jenkins Windows node with:

  • the label agent-harness;
  • Node.js 20 or newer on PATH;
  • every registered repository available in the established workspace layout;
  • the node environment variable KRI_DEV_ROOT set to the absolute multi-repository workspace root.

Do not store the absolute workspace path, credentials, or tokens in this repository. The node-level environment variable owns the machine-specific path.

The local central harness clone must remain at _________AgentHarnessBase directly below KRI_DEV_ROOT. The pipeline deliberately skips the default Jenkins checkout and reads this existing clone so the relative paths in workspace.yml resolve to the sibling repositories.

Jenkins job setup

Create a Pipeline job using Pipeline script from SCM:

  • repository: the central Agent Harness repository;
  • branch: master;
  • script path: Jenkinsfile.

Assign the job only to the node carrying the agent-harness label. The pipeline runs automatically once per weekday at a hashed minute during the 08:00 hour in Asia/Seoul, and it may also be run manually.

The job does not fetch or update the repositories under KRI_DEV_ROOT. Keep that workspace synchronized using the existing repository update process before relying on the scheduled result.

Local verification

From the central harness repository:

npm.cmd run verify:workspace

To supply the workspace root explicitly:

.\scripts\verify-workspace.ps1 -WorkspaceRoot <workspace-root>

Both forms execute the committed dist\cli.cjs bundle and require no package installation.

Failure handling

Treat a failed build as a drift report, not as authorization for automatic repair:

  1. identify the missing, invalid, or stale project in the console output;
  2. update the authoritative .agent source when a rule changed;
  3. run plan and obtain approval for the affected repositories;
  4. run the narrowest applicable compose command;
  5. run verify again and commit each repository independently after approval.

The Jenkins job must not compose documents, commit, push, pull, fetch, or modify credentials.