zioinfo-mail/workspace/guardia-manager/Jenkinsfile
DESKTOP-TKLFCPR\ython 515604b116 feat(cicd+tests): Jenkins pipeline + unit/integration test suite
CI/CD:
- Jenkinsfile for zioinfo-web/guardia-itsm/guardia-manager/guardia-docs
- Jenkins jobs created (4 repos, pipeline-type)
- Global env vars: ITSM_BASE_URL, GITEA_URL, SERVER_HOST
- ITSM messenger notification in post{} block

Test Harness:
- .claude/agents/unit-tester.md
- .claude/agents/integration-tester.md
- .claude/skills/test-orchestrator/SKILL.md

Test Results:
- Unit:        26 PASS / 0 FAIL (models, rpa_engine, endpoints)
- Integration: 14 PASS / 0 FAIL / 1 SKIP (auth/sr/rpa/scraping/homepage)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 00:22:10 +09:00

32 lines
1.3 KiB
Groovy

pipeline {
agent any
environment {
STATIC = '/var/www/manager'
NOTIFY = "${ITSM_BASE_URL}/api/messenger/webhook"
}
options { buildDiscarder(logRotator(numToKeepStr: '5')); timeout(time: 15, unit: 'MINUTES') }
stages {
stage('Checkout') { steps { checkout scm } }
stage('Build') {
steps {
dir('frontend') {
sh 'npm ci 2>/dev/null || npm install'
sh 'npm run build'
}
}
}
stage('Deploy') {
when { branch 'main' }
steps {
sh """
cp -r frontend/dist/. ${STATIC}/
systemctl restart guardia-manager 2>/dev/null || true
"""
}
}
}
post {
success { sh "curl -sf -X POST ${NOTIFY} -H 'Content-Type:application/json' -d '{\"event\":\"build_result\",\"room\":\"ops\",\"success\":true,\"result_summary\":\"✅ guardia-manager 배포 완료\"}' 2>/dev/null || true" }
failure { sh "curl -sf -X POST ${NOTIFY} -H 'Content-Type:application/json' -d '{\"event\":\"build_result\",\"room\":\"ops\",\"success\":false,\"result_summary\":\"❌ guardia-manager 빌드 실패\"}' 2>/dev/null || true" }
}
}