ci: verify agent harness workspace on Jenkins
This commit is contained in:
48
Jenkinsfile
vendored
Normal file
48
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
pipeline {
|
||||
agent { label 'agent-harness' }
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
skipDefaultCheckout(true)
|
||||
timestamps()
|
||||
}
|
||||
|
||||
triggers {
|
||||
cron('TZ=Asia/Seoul\nH 8 * * 1-5')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Verify Workspace') {
|
||||
steps {
|
||||
powershell '''
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($env:KRI_DEV_ROOT)) {
|
||||
throw 'KRI_DEV_ROOT must point to the existing KRI multi-repository workspace root.'
|
||||
}
|
||||
|
||||
$harnessRoot = Join-Path $env:KRI_DEV_ROOT '_________AgentHarnessBase'
|
||||
$verificationScript = Join-Path $harnessRoot 'scripts\verify-workspace.ps1'
|
||||
|
||||
if (-not (Test-Path -LiteralPath $verificationScript -PathType Leaf)) {
|
||||
throw "Workspace verification script not found: $verificationScript"
|
||||
}
|
||||
|
||||
& $verificationScript -WorkspaceRoot $env:KRI_DEV_ROOT
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
echo 'All registered Agent Harness documents are current.'
|
||||
}
|
||||
failure {
|
||||
echo 'Agent Harness drift or an invalid workspace registration was detected.'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user