leniu-dev 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/auto-test-generator.md +315 -0
- package/.claude/agents/bug-analyzer.md +103 -0
- package/.claude/agents/code-reviewer.md +122 -0
- package/.claude/agents/code-scanner.md +145 -0
- package/.claude/agents/image-reader.md +154 -0
- package/.claude/agents/loki-runner.md +80 -0
- package/.claude/agents/mysql-runner.md +81 -0
- package/.claude/agents/project-manager.md +159 -0
- package/.claude/agents/requirements-analyzer.md +175 -0
- package/.claude/agents/task-fetcher.md +75 -0
- package/.claude/audio/completed.wav +0 -0
- package/.claude/commands/add-todo.md +255 -0
- package/.claude/commands/auto-test.md +252 -0
- package/.claude/commands/check.md +210 -0
- package/.claude/commands/crud.md +454 -0
- package/.claude/commands/dev.md +532 -0
- package/.claude/commands/init-config.md +154 -0
- package/.claude/commands/init-docs.md +681 -0
- package/.claude/commands/next.md +281 -0
- package/.claude/commands/opsx-apply.md +147 -0
- package/.claude/commands/opsx-archive.md +105 -0
- package/.claude/commands/opsx-bulk-archive.md +237 -0
- package/.claude/commands/opsx-continue.md +109 -0
- package/.claude/commands/opsx-explore.md +281 -0
- package/.claude/commands/opsx-ff.md +92 -0
- package/.claude/commands/opsx-new.md +65 -0
- package/.claude/commands/opsx-onboard.md +397 -0
- package/.claude/commands/opsx-sync.md +129 -0
- package/.claude/commands/opsx-verify.md +159 -0
- package/.claude/commands/progress.md +264 -0
- package/.claude/commands/release.md +109 -0
- package/.claude/commands/start.md +199 -0
- package/.claude/commands/sync.md +307 -0
- package/.claude/commands/update-status.md +428 -0
- package/.claude/docs/Mixin/344/275/277/347/224/250/346/214/207/345/215/227.md +299 -0
- package/.claude/docs/README.md +167 -0
- package/.claude/docs//345/211/215/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +599 -0
- package/.claude/docs//345/220/216/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +726 -0
- package/.claude/docs//345/267/245/344/275/234/346/265/201/345/274/200/345/217/221/346/214/207/345/215/227.md +714 -0
- package/.claude/docs//345/267/245/345/205/267/347/261/273/344/275/277/347/224/250/346/214/207/345/215/227.md +463 -0
- package/.claude/docs//346/225/260/346/215/256/345/272/223/350/256/276/350/256/241/350/247/204/350/214/203.md +390 -0
- package/.claude/docs//346/226/260/345/212/237/350/203/275/345/274/200/345/217/221/346/265/201/347/250/213/350/247/204/350/214/203.md +688 -0
- package/.claude/docs//346/226/260/351/241/271/347/233/256/345/274/200/345/217/221/346/265/201/347/250/213.md +365 -0
- package/.claude/docs//346/241/206/346/236/266/350/257/264/346/230/216.md +393 -0
- package/.claude/docs//350/267/257/347/224/261/351/205/215/347/275/256/346/214/207/345/215/227.md +246 -0
- package/.claude/framework-config.json +73 -0
- package/.claude/hooks/lib/notify.js +310 -0
- package/.claude/hooks/pre-tool-use.js +117 -0
- package/.claude/hooks/skill-forced-eval.js +161 -0
- package/.claude/hooks/stop.js +55 -0
- package/.claude/notify-config.json +9 -0
- package/.claude/settings.json +57 -0
- package/.claude/skills/add-skill/SKILL.md +488 -0
- package/.claude/skills/analyze-requirements/SKILL.md +112 -0
- package/.claude/skills/api-development/SKILL.md +315 -0
- package/.claude/skills/architecture-design/SKILL.md +152 -0
- package/.claude/skills/auto-test/SKILL.md +625 -0
- package/.claude/skills/auto-test/references/api-conventions.md +260 -0
- package/.claude/skills/backend-annotations/SKILL.md +248 -0
- package/.claude/skills/banana-image/CHANGELOG.md +37 -0
- package/.claude/skills/banana-image/README.md +146 -0
- package/.claude/skills/banana-image/SKILL.md +171 -0
- package/.claude/skills/banana-image/assets/logo.png +0 -0
- package/.claude/skills/banana-image/references/advanced-usage.md +189 -0
- package/.claude/skills/banana-image/scripts/apply_template.py +125 -0
- package/.claude/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.claude/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.claude/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.claude/skills/banana-image/scripts/package.json +18 -0
- package/.claude/skills/banana-image/scripts/requirements.txt +10 -0
- package/.claude/skills/banana-image/templates/poster.json +22 -0
- package/.claude/skills/banana-image/templates/product.json +17 -0
- package/.claude/skills/banana-image/templates/social.json +22 -0
- package/.claude/skills/banana-image/templates/thumbnail.json +17 -0
- package/.claude/skills/brainstorm/SKILL.md +216 -0
- package/.claude/skills/bug-detective/SKILL.md +295 -0
- package/.claude/skills/bug-detective/references/error-patterns.md +242 -0
- package/.claude/skills/chrome-cdp/SKILL.md +81 -0
- package/.claude/skills/chrome-cdp/scripts/cdp.mjs +838 -0
- package/.claude/skills/chrome-cdp/scripts/run-cdp.sh +7 -0
- package/.claude/skills/code-patterns/SKILL.md +163 -0
- package/.claude/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.claude/skills/codex-code-review/SKILL.md +327 -0
- package/.claude/skills/collaborating-with-codex/SKILL.md +180 -0
- package/.claude/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.claude/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.claude/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.claude/skills/crud-development/SKILL.md +328 -0
- package/.claude/skills/data-permission/SKILL.md +221 -0
- package/.claude/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.claude/skills/database-ops/SKILL.md +210 -0
- package/.claude/skills/error-handler/SKILL.md +310 -0
- package/.claude/skills/file-oss-management/SKILL.md +260 -0
- package/.claude/skills/file-oss-management/references/entities.md +105 -0
- package/.claude/skills/file-oss-management/references/service-impl.md +104 -0
- package/.claude/skills/fix-bug/SKILL.md +269 -0
- package/.claude/skills/git-workflow/SKILL.md +179 -0
- package/.claude/skills/jenkins-deploy/SKILL.md +134 -0
- package/.claude/skills/jenkins-deploy/assets/env_param.template.json +51 -0
- package/.claude/skills/jenkins-deploy/assets/jk_build.py +400 -0
- package/.claude/skills/json-serialization/SKILL.md +341 -0
- package/.claude/skills/lanhu-design/SKILL.md +99 -0
- package/.claude/skills/leniu-api-development/SKILL.md +319 -0
- package/.claude/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.claude/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.claude/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.claude/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.claude/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.claude/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.claude/skills/leniu-crud-development/SKILL.md +404 -0
- package/.claude/skills/leniu-crud-development/references/templates.md +597 -0
- package/.claude/skills/leniu-customization-location/SKILL.md +410 -0
- package/.claude/skills/leniu-data-permission/SKILL.md +341 -0
- package/.claude/skills/leniu-database-ops/SKILL.md +426 -0
- package/.claude/skills/leniu-error-handler/SKILL.md +462 -0
- package/.claude/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.claude/skills/leniu-java-entity/SKILL.md +237 -0
- package/.claude/skills/leniu-java-entity/references/templates.md +237 -0
- package/.claude/skills/leniu-java-logging/SKILL.md +229 -0
- package/.claude/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.claude/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.claude/skills/leniu-java-mq/SKILL.md +338 -0
- package/.claude/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.claude/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.claude/skills/leniu-java-task/SKILL.md +367 -0
- package/.claude/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.claude/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.claude/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.claude/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.claude/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.claude/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.claude/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.claude/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.claude/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.claude/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.claude/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.claude/skills/leniu-report-scenario/references/export.md +553 -0
- package/.claude/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.claude/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.claude/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.claude/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.claude/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.claude/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.claude/skills/leniu-security-guard/SKILL.md +306 -0
- package/.claude/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.claude/skills/loki-log-query/SKILL.md +430 -0
- package/.claude/skills/mysql-debug/SKILL.md +406 -0
- package/.claude/skills/performance-doctor/SKILL.md +297 -0
- package/.claude/skills/project-navigator/SKILL.md +211 -0
- package/.claude/skills/redis-cache/SKILL.md +282 -0
- package/.claude/skills/redis-cache/references/listeners.md +23 -0
- package/.claude/skills/scheduled-jobs/SKILL.md +277 -0
- package/.claude/skills/security-guard/SKILL.md +245 -0
- package/.claude/skills/security-guard/references/encrypt-config.md +103 -0
- package/.claude/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.claude/skills/sms-mail/SKILL.md +346 -0
- package/.claude/skills/sms-mail/references/mail-config.md +88 -0
- package/.claude/skills/sms-mail/references/sms-config.md +74 -0
- package/.claude/skills/social-login/SKILL.md +328 -0
- package/.claude/skills/social-login/references/provider-configs.md +118 -0
- package/.claude/skills/store-pc/SKILL.md +366 -0
- package/.claude/skills/sync-back-merge/SKILL.md +66 -0
- package/.claude/skills/task-tracker/SKILL.md +307 -0
- package/.claude/skills/tech-decision/SKILL.md +393 -0
- package/.claude/skills/tenant-management/SKILL.md +272 -0
- package/.claude/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.claude/skills/test-development/SKILL.md +301 -0
- package/.claude/skills/test-development/references/parameterized-examples.md +119 -0
- package/.claude/skills/ui-pc/SKILL.md +438 -0
- package/.claude/skills/utils-toolkit/SKILL.md +354 -0
- package/.claude/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.claude/skills/websocket-sse/SKILL.md +350 -0
- package/.claude/skills/workflow-engine/SKILL.md +249 -0
- package/.claude/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.claude/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.claude/templates/env-config.md +27 -0
- package/.claude/templates//345/276/205/345/212/236/346/270/205/345/215/225/346/250/241/346/235/277.md +56 -0
- package/.claude/templates//351/234/200/346/261/202/346/226/207/346/241/243/346/250/241/346/235/277.md +85 -0
- package/.claude/templates//351/241/271/347/233/256/347/212/266/346/200/201/346/250/241/346/235/277.md +43 -0
- package/.codex/skills/add-skill/SKILL.md +488 -0
- package/.codex/skills/add-todo/SKILL.md +269 -0
- package/.codex/skills/analyze-requirements/SKILL.md +112 -0
- package/.codex/skills/api-development/SKILL.md +315 -0
- package/.codex/skills/architecture-design/SKILL.md +152 -0
- package/.codex/skills/auto-test/SKILL.md +453 -0
- package/.codex/skills/auto-test/references/api-conventions.md +260 -0
- package/.codex/skills/backend-annotations/SKILL.md +248 -0
- package/.codex/skills/banana-image/CHANGELOG.md +37 -0
- package/.codex/skills/banana-image/README.md +146 -0
- package/.codex/skills/banana-image/SKILL.md +171 -0
- package/.codex/skills/banana-image/assets/logo.png +0 -0
- package/.codex/skills/banana-image/references/advanced-usage.md +189 -0
- package/.codex/skills/banana-image/scripts/apply_template.py +125 -0
- package/.codex/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.codex/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.codex/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.codex/skills/banana-image/scripts/package.json +18 -0
- package/.codex/skills/banana-image/scripts/requirements.txt +10 -0
- package/.codex/skills/banana-image/templates/poster.json +22 -0
- package/.codex/skills/banana-image/templates/product.json +17 -0
- package/.codex/skills/banana-image/templates/social.json +22 -0
- package/.codex/skills/banana-image/templates/thumbnail.json +17 -0
- package/.codex/skills/brainstorm/SKILL.md +216 -0
- package/.codex/skills/bug-detective/SKILL.md +295 -0
- package/.codex/skills/bug-detective/references/error-patterns.md +242 -0
- package/.codex/skills/check/SKILL.md +367 -0
- package/.codex/skills/code-patterns/SKILL.md +163 -0
- package/.codex/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.codex/skills/collaborating-with-codex/SKILL.md +180 -0
- package/.codex/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.codex/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.codex/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.codex/skills/crud/SKILL.md +265 -0
- package/.codex/skills/crud-development/SKILL.md +328 -0
- package/.codex/skills/data-permission/SKILL.md +221 -0
- package/.codex/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.codex/skills/database-ops/SKILL.md +210 -0
- package/.codex/skills/dev/SKILL.md +187 -0
- package/.codex/skills/error-handler/SKILL.md +310 -0
- package/.codex/skills/file-oss-management/SKILL.md +260 -0
- package/.codex/skills/file-oss-management/references/entities.md +105 -0
- package/.codex/skills/file-oss-management/references/service-impl.md +104 -0
- package/.codex/skills/fix-bug/SKILL.md +269 -0
- package/.codex/skills/git-workflow/SKILL.md +179 -0
- package/.codex/skills/init-docs/SKILL.md +194 -0
- package/.codex/skills/jenkins-deploy/SKILL.md +134 -0
- package/.codex/skills/json-serialization/SKILL.md +341 -0
- package/.codex/skills/lanhu-design/SKILL.md +99 -0
- package/.codex/skills/leniu-api-development/SKILL.md +319 -0
- package/.codex/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.codex/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.codex/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.codex/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.codex/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.codex/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.codex/skills/leniu-crud-development/SKILL.md +404 -0
- package/.codex/skills/leniu-crud-development/references/templates.md +597 -0
- package/.codex/skills/leniu-customization-location/SKILL.md +410 -0
- package/.codex/skills/leniu-data-permission/SKILL.md +341 -0
- package/.codex/skills/leniu-database-ops/SKILL.md +426 -0
- package/.codex/skills/leniu-error-handler/SKILL.md +462 -0
- package/.codex/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.codex/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.codex/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.codex/skills/leniu-java-entity/SKILL.md +237 -0
- package/.codex/skills/leniu-java-entity/references/templates.md +237 -0
- package/.codex/skills/leniu-java-logging/SKILL.md +229 -0
- package/.codex/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.codex/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.codex/skills/leniu-java-mq/SKILL.md +338 -0
- package/.codex/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.codex/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.codex/skills/leniu-java-task/SKILL.md +367 -0
- package/.codex/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.codex/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.codex/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.codex/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.codex/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.codex/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.codex/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.codex/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.codex/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.codex/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.codex/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.codex/skills/leniu-report-scenario/references/export.md +553 -0
- package/.codex/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.codex/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.codex/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.codex/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.codex/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.codex/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.codex/skills/leniu-security-guard/SKILL.md +306 -0
- package/.codex/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.codex/skills/loki-log-query/SKILL.md +430 -0
- package/.codex/skills/loki-log-query/environments.json +45 -0
- package/.codex/skills/mysql-debug/SKILL.md +406 -0
- package/.codex/skills/next/SKILL.md +137 -0
- package/.codex/skills/openspec-apply-change/SKILL.md +165 -0
- package/.codex/skills/openspec-archive-change/SKILL.md +122 -0
- package/.codex/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/.codex/skills/openspec-continue-change/SKILL.md +126 -0
- package/.codex/skills/openspec-explore/SKILL.md +299 -0
- package/.codex/skills/openspec-ff-change/SKILL.md +109 -0
- package/.codex/skills/openspec-new-change/SKILL.md +82 -0
- package/.codex/skills/openspec-onboard/SKILL.md +414 -0
- package/.codex/skills/openspec-sync-specs/SKILL.md +146 -0
- package/.codex/skills/openspec-verify-change/SKILL.md +176 -0
- package/.codex/skills/performance-doctor/SKILL.md +297 -0
- package/.codex/skills/progress/SKILL.md +193 -0
- package/.codex/skills/project-navigator/SKILL.md +211 -0
- package/.codex/skills/redis-cache/SKILL.md +282 -0
- package/.codex/skills/redis-cache/references/listeners.md +23 -0
- package/.codex/skills/scheduled-jobs/SKILL.md +277 -0
- package/.codex/skills/security-guard/SKILL.md +245 -0
- package/.codex/skills/security-guard/references/encrypt-config.md +103 -0
- package/.codex/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.codex/skills/skill-creator/LICENSE.txt +202 -0
- package/.codex/skills/skill-creator/SKILL.md +479 -0
- package/.codex/skills/skill-creator/agents/analyzer.md +274 -0
- package/.codex/skills/skill-creator/agents/comparator.md +202 -0
- package/.codex/skills/skill-creator/agents/grader.md +223 -0
- package/.codex/skills/skill-creator/assets/eval_review.html +146 -0
- package/.codex/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.codex/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.codex/skills/skill-creator/references/schemas.md +430 -0
- package/.codex/skills/skill-creator/scripts/__init__.py +0 -0
- package/.codex/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.codex/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.codex/skills/skill-creator/scripts/improve_description.py +248 -0
- package/.codex/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.codex/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.codex/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.codex/skills/skill-creator/scripts/run_loop.py +332 -0
- package/.codex/skills/skill-creator/scripts/utils.py +47 -0
- package/.codex/skills/sms-mail/SKILL.md +346 -0
- package/.codex/skills/sms-mail/references/mail-config.md +88 -0
- package/.codex/skills/sms-mail/references/sms-config.md +74 -0
- package/.codex/skills/social-login/SKILL.md +328 -0
- package/.codex/skills/social-login/references/provider-configs.md +118 -0
- package/.codex/skills/start/SKILL.md +154 -0
- package/.codex/skills/store-pc/SKILL.md +366 -0
- package/.codex/skills/sync/SKILL.md +149 -0
- package/.codex/skills/sync-back-merge/SKILL.md +66 -0
- package/.codex/skills/task-tracker/SKILL.md +307 -0
- package/.codex/skills/tech-decision/SKILL.md +393 -0
- package/.codex/skills/tenant-management/SKILL.md +272 -0
- package/.codex/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.codex/skills/test-development/SKILL.md +301 -0
- package/.codex/skills/test-development/references/parameterized-examples.md +119 -0
- package/.codex/skills/ui-pc/SKILL.md +438 -0
- package/.codex/skills/update-status/SKILL.md +159 -0
- package/.codex/skills/utils-toolkit/SKILL.md +354 -0
- package/.codex/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.codex/skills/websocket-sse/SKILL.md +350 -0
- package/.codex/skills/workflow-engine/SKILL.md +249 -0
- package/.codex/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.codex/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.cursor/agents/bug-analyzer.md +102 -0
- package/.cursor/agents/code-reviewer.md +122 -0
- package/.cursor/agents/code-scanner.md +145 -0
- package/.cursor/agents/image-reader.md +154 -0
- package/.cursor/agents/loki-runner.md +80 -0
- package/.cursor/agents/mysql-runner.md +81 -0
- package/.cursor/agents/project-manager.md +159 -0
- package/.cursor/agents/requirements-analyzer.md +141 -0
- package/.cursor/agents/task-fetcher.md +75 -0
- package/.cursor/audio/completed.wav +0 -0
- package/.cursor/commands/opsx-apply.md +152 -0
- package/.cursor/commands/opsx-archive.md +157 -0
- package/.cursor/commands/opsx-bulk-archive.md +242 -0
- package/.cursor/commands/opsx-continue.md +114 -0
- package/.cursor/commands/opsx-explore.md +174 -0
- package/.cursor/commands/opsx-ff.md +94 -0
- package/.cursor/commands/opsx-new.md +69 -0
- package/.cursor/commands/opsx-onboard.md +525 -0
- package/.cursor/commands/opsx-sync.md +134 -0
- package/.cursor/commands/opsx-verify.md +164 -0
- package/.cursor/hooks/cursor-pre-tool-use.js +122 -0
- package/.cursor/hooks/cursor-skill-eval.js +466 -0
- package/.cursor/hooks/lib/notify.js +310 -0
- package/.cursor/hooks/stop.js +55 -0
- package/.cursor/hooks.json +23 -0
- package/.cursor/mcp.json +22 -0
- package/.cursor/rules/skill-activation.mdc +99 -0
- package/.cursor/skills/add-skill/SKILL.md +488 -0
- package/.cursor/skills/analyze-requirements/SKILL.md +112 -0
- package/.cursor/skills/api-development/SKILL.md +315 -0
- package/.cursor/skills/architecture-design/SKILL.md +152 -0
- package/.cursor/skills/auto-test/SKILL.md +453 -0
- package/.cursor/skills/auto-test/references/api-conventions.md +260 -0
- package/.cursor/skills/backend-annotations/SKILL.md +248 -0
- package/.cursor/skills/banana-image/CHANGELOG.md +37 -0
- package/.cursor/skills/banana-image/README.md +146 -0
- package/.cursor/skills/banana-image/SKILL.md +171 -0
- package/.cursor/skills/banana-image/assets/logo.png +0 -0
- package/.cursor/skills/banana-image/references/advanced-usage.md +189 -0
- package/.cursor/skills/banana-image/scripts/apply_template.py +125 -0
- package/.cursor/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.cursor/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.cursor/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.cursor/skills/banana-image/scripts/package.json +18 -0
- package/.cursor/skills/banana-image/scripts/requirements.txt +10 -0
- package/.cursor/skills/banana-image/templates/poster.json +22 -0
- package/.cursor/skills/banana-image/templates/product.json +17 -0
- package/.cursor/skills/banana-image/templates/social.json +22 -0
- package/.cursor/skills/banana-image/templates/thumbnail.json +17 -0
- package/.cursor/skills/brainstorm/SKILL.md +216 -0
- package/.cursor/skills/bug-detective/SKILL.md +295 -0
- package/.cursor/skills/bug-detective/references/error-patterns.md +242 -0
- package/.cursor/skills/code-patterns/SKILL.md +163 -0
- package/.cursor/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.cursor/skills/collaborating-with-codex/SKILL.md +180 -0
- package/.cursor/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.cursor/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.cursor/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.cursor/skills/crud-development/SKILL.md +328 -0
- package/.cursor/skills/data-permission/SKILL.md +221 -0
- package/.cursor/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.cursor/skills/database-ops/SKILL.md +210 -0
- package/.cursor/skills/error-handler/SKILL.md +310 -0
- package/.cursor/skills/file-oss-management/SKILL.md +260 -0
- package/.cursor/skills/file-oss-management/references/entities.md +105 -0
- package/.cursor/skills/file-oss-management/references/service-impl.md +104 -0
- package/.cursor/skills/fix-bug/SKILL.md +269 -0
- package/.cursor/skills/git-workflow/SKILL.md +179 -0
- package/.cursor/skills/jenkins-deploy/SKILL.md +134 -0
- package/.cursor/skills/json-serialization/SKILL.md +341 -0
- package/.cursor/skills/lanhu-design/SKILL.md +99 -0
- package/.cursor/skills/leniu-api-development/SKILL.md +319 -0
- package/.cursor/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.cursor/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.cursor/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.cursor/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.cursor/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.cursor/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.cursor/skills/leniu-crud-development/SKILL.md +404 -0
- package/.cursor/skills/leniu-crud-development/references/templates.md +597 -0
- package/.cursor/skills/leniu-customization-location/SKILL.md +410 -0
- package/.cursor/skills/leniu-data-permission/SKILL.md +341 -0
- package/.cursor/skills/leniu-database-ops/SKILL.md +426 -0
- package/.cursor/skills/leniu-error-handler/SKILL.md +462 -0
- package/.cursor/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.cursor/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.cursor/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.cursor/skills/leniu-java-entity/SKILL.md +237 -0
- package/.cursor/skills/leniu-java-entity/references/templates.md +237 -0
- package/.cursor/skills/leniu-java-logging/SKILL.md +229 -0
- package/.cursor/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.cursor/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.cursor/skills/leniu-java-mq/SKILL.md +338 -0
- package/.cursor/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.cursor/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.cursor/skills/leniu-java-task/SKILL.md +367 -0
- package/.cursor/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.cursor/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.cursor/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.cursor/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.cursor/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.cursor/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.cursor/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.cursor/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.cursor/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.cursor/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.cursor/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.cursor/skills/leniu-report-scenario/references/export.md +553 -0
- package/.cursor/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.cursor/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.cursor/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.cursor/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.cursor/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.cursor/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.cursor/skills/leniu-security-guard/SKILL.md +306 -0
- package/.cursor/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.cursor/skills/loki-log-query/SKILL.md +430 -0
- package/.cursor/skills/loki-log-query/environments.json +45 -0
- package/.cursor/skills/mysql-debug/SKILL.md +406 -0
- package/.cursor/skills/openspec-apply-change/SKILL.md +165 -0
- package/.cursor/skills/openspec-archive-change/SKILL.md +122 -0
- package/.cursor/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/.cursor/skills/openspec-continue-change/SKILL.md +126 -0
- package/.cursor/skills/openspec-explore/SKILL.md +299 -0
- package/.cursor/skills/openspec-ff-change/SKILL.md +109 -0
- package/.cursor/skills/openspec-new-change/SKILL.md +82 -0
- package/.cursor/skills/openspec-onboard/SKILL.md +414 -0
- package/.cursor/skills/openspec-sync-specs/SKILL.md +146 -0
- package/.cursor/skills/openspec-verify-change/SKILL.md +176 -0
- package/.cursor/skills/performance-doctor/SKILL.md +297 -0
- package/.cursor/skills/project-navigator/SKILL.md +211 -0
- package/.cursor/skills/redis-cache/SKILL.md +282 -0
- package/.cursor/skills/redis-cache/references/listeners.md +23 -0
- package/.cursor/skills/scheduled-jobs/SKILL.md +277 -0
- package/.cursor/skills/security-guard/SKILL.md +245 -0
- package/.cursor/skills/security-guard/references/encrypt-config.md +103 -0
- package/.cursor/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.cursor/skills/skill-creator/LICENSE.txt +202 -0
- package/.cursor/skills/skill-creator/SKILL.md +479 -0
- package/.cursor/skills/skill-creator/agents/analyzer.md +274 -0
- package/.cursor/skills/skill-creator/agents/comparator.md +202 -0
- package/.cursor/skills/skill-creator/agents/grader.md +223 -0
- package/.cursor/skills/skill-creator/assets/eval_review.html +146 -0
- package/.cursor/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.cursor/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.cursor/skills/skill-creator/references/schemas.md +430 -0
- package/.cursor/skills/skill-creator/scripts/__init__.py +0 -0
- package/.cursor/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.cursor/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.cursor/skills/skill-creator/scripts/improve_description.py +248 -0
- package/.cursor/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.cursor/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.cursor/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.cursor/skills/skill-creator/scripts/run_loop.py +332 -0
- package/.cursor/skills/skill-creator/scripts/utils.py +47 -0
- package/.cursor/skills/sms-mail/SKILL.md +346 -0
- package/.cursor/skills/sms-mail/references/mail-config.md +88 -0
- package/.cursor/skills/sms-mail/references/sms-config.md +74 -0
- package/.cursor/skills/social-login/SKILL.md +328 -0
- package/.cursor/skills/social-login/references/provider-configs.md +118 -0
- package/.cursor/skills/store-pc/SKILL.md +366 -0
- package/.cursor/skills/sync-back-merge/SKILL.md +66 -0
- package/.cursor/skills/task-tracker/SKILL.md +307 -0
- package/.cursor/skills/tech-decision/SKILL.md +393 -0
- package/.cursor/skills/tenant-management/SKILL.md +272 -0
- package/.cursor/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.cursor/skills/test-development/SKILL.md +301 -0
- package/.cursor/skills/test-development/references/parameterized-examples.md +119 -0
- package/.cursor/skills/ui-pc/SKILL.md +438 -0
- package/.cursor/skills/utils-toolkit/SKILL.md +354 -0
- package/.cursor/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.cursor/skills/websocket-sse/SKILL.md +350 -0
- package/.cursor/skills/workflow-engine/SKILL.md +249 -0
- package/.cursor/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.cursor/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.cursor/templates/env-config.md +27 -0
- package/AGENTS.md +275 -0
- package/CLAUDE.md +285 -0
- package/README.md +104 -0
- package/bin/index.js +3069 -0
- package/init.sh +178 -0
- package/package.json +40 -0
- package/scripts/build-skills.js +180 -0
- package/src/platform-map.json +100 -0
- package/src/skills/add-skill/SKILL.md +488 -0
- package/src/skills/add-todo/SKILL.md +269 -0
- package/src/skills/analyze-requirements/SKILL.md +112 -0
- package/src/skills/api-development/SKILL.md +315 -0
- package/src/skills/architecture-design/SKILL.md +152 -0
- package/src/skills/backend-annotations/SKILL.md +248 -0
- package/src/skills/banana-image/CHANGELOG.md +37 -0
- package/src/skills/banana-image/README.md +146 -0
- package/src/skills/banana-image/SKILL.md +171 -0
- package/src/skills/banana-image/assets/logo.png +0 -0
- package/src/skills/banana-image/references/advanced-usage.md +189 -0
- package/src/skills/banana-image/scripts/apply_template.py +125 -0
- package/src/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/src/skills/banana-image/scripts/batch_prep.py +82 -0
- package/src/skills/banana-image/scripts/package-lock.json +1437 -0
- package/src/skills/banana-image/scripts/package.json +18 -0
- package/src/skills/banana-image/scripts/requirements.txt +10 -0
- package/src/skills/banana-image/templates/poster.json +22 -0
- package/src/skills/banana-image/templates/product.json +17 -0
- package/src/skills/banana-image/templates/social.json +22 -0
- package/src/skills/banana-image/templates/thumbnail.json +17 -0
- package/src/skills/brainstorm/SKILL.md +216 -0
- package/src/skills/bug-detective/SKILL.md +295 -0
- package/src/skills/bug-detective/references/error-patterns.md +242 -0
- package/src/skills/check/SKILL.md +367 -0
- package/src/skills/code-patterns/SKILL.md +163 -0
- package/src/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/src/skills/codex-code-review/SKILL.md +327 -0
- package/src/skills/collaborating-with-codex/SKILL.md +180 -0
- package/src/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/src/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/src/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/src/skills/crud/SKILL.md +265 -0
- package/src/skills/crud-development/SKILL.md +328 -0
- package/src/skills/data-permission/SKILL.md +221 -0
- package/src/skills/data-permission/references/custom-data-scope.md +90 -0
- package/src/skills/database-ops/SKILL.md +210 -0
- package/src/skills/dev/SKILL.md +187 -0
- package/src/skills/error-handler/SKILL.md +310 -0
- package/src/skills/file-oss-management/SKILL.md +260 -0
- package/src/skills/file-oss-management/references/entities.md +105 -0
- package/src/skills/file-oss-management/references/service-impl.md +104 -0
- package/src/skills/fix-bug/SKILL.md +269 -0
- package/src/skills/git-workflow/SKILL.md +179 -0
- package/src/skills/init-docs/SKILL.md +194 -0
- package/src/skills/json-serialization/SKILL.md +341 -0
- package/src/skills/leniu-api-development/SKILL.md +319 -0
- package/src/skills/leniu-api-development/references/real-examples.md +273 -0
- package/src/skills/leniu-architecture-design/SKILL.md +383 -0
- package/src/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/src/skills/leniu-brainstorm/SKILL.md +242 -0
- package/src/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/src/skills/leniu-code-patterns/SKILL.md +411 -0
- package/src/skills/leniu-crud-development/SKILL.md +404 -0
- package/src/skills/leniu-crud-development/references/templates.md +597 -0
- package/src/skills/leniu-customization-location/SKILL.md +410 -0
- package/src/skills/leniu-data-permission/SKILL.md +341 -0
- package/src/skills/leniu-database-ops/SKILL.md +426 -0
- package/src/skills/leniu-error-handler/SKILL.md +462 -0
- package/src/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/src/skills/leniu-java-code-style/SKILL.md +510 -0
- package/src/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/src/skills/leniu-java-entity/SKILL.md +237 -0
- package/src/skills/leniu-java-entity/references/templates.md +237 -0
- package/src/skills/leniu-java-export/SKILL.md +570 -0
- package/src/skills/leniu-java-logging/SKILL.md +229 -0
- package/src/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/src/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/src/skills/leniu-java-mq/SKILL.md +338 -0
- package/src/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/src/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/src/skills/leniu-java-report-query-param/SKILL.md +291 -0
- package/src/skills/leniu-java-task/SKILL.md +367 -0
- package/src/skills/leniu-java-total-line/SKILL.md +196 -0
- package/src/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
- package/src/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
- package/src/skills/leniu-mealtime/SKILL.md +215 -0
- package/src/skills/leniu-redis-cache/SKILL.md +331 -0
- package/src/skills/leniu-report-customization/SKILL.md +415 -0
- package/src/skills/leniu-report-customization/references/table-fields.md +93 -0
- package/src/skills/leniu-report-standard-customization/SKILL.md +391 -0
- package/src/skills/leniu-report-standard-customization/references/analysis-module.md +64 -0
- package/src/skills/leniu-report-standard-customization/references/table-fields.md +113 -0
- package/src/skills/leniu-security-guard/SKILL.md +306 -0
- package/src/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/src/skills/loki-log-query/SKILL.md +400 -0
- package/src/skills/loki-log-query/environments.json +45 -0
- package/src/skills/mysql-debug/SKILL.md +400 -0
- package/src/skills/next/SKILL.md +137 -0
- package/src/skills/openspec-apply-change/SKILL.md +165 -0
- package/src/skills/openspec-archive-change/SKILL.md +122 -0
- package/src/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/src/skills/openspec-continue-change/SKILL.md +126 -0
- package/src/skills/openspec-explore/SKILL.md +299 -0
- package/src/skills/openspec-ff-change/SKILL.md +109 -0
- package/src/skills/openspec-new-change/SKILL.md +82 -0
- package/src/skills/openspec-onboard/SKILL.md +414 -0
- package/src/skills/openspec-sync-specs/SKILL.md +146 -0
- package/src/skills/openspec-verify-change/SKILL.md +176 -0
- package/src/skills/performance-doctor/SKILL.md +297 -0
- package/src/skills/progress/SKILL.md +193 -0
- package/src/skills/project-navigator/SKILL.md +211 -0
- package/src/skills/redis-cache/SKILL.md +282 -0
- package/src/skills/redis-cache/references/listeners.md +23 -0
- package/src/skills/scheduled-jobs/SKILL.md +277 -0
- package/src/skills/security-guard/SKILL.md +245 -0
- package/src/skills/security-guard/references/encrypt-config.md +103 -0
- package/src/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/src/skills/skill-creator/LICENSE.txt +202 -0
- package/src/skills/skill-creator/SKILL.md +479 -0
- package/src/skills/skill-creator/agents/analyzer.md +274 -0
- package/src/skills/skill-creator/agents/comparator.md +202 -0
- package/src/skills/skill-creator/agents/grader.md +223 -0
- package/src/skills/skill-creator/assets/eval_review.html +146 -0
- package/src/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/src/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/src/skills/skill-creator/references/schemas.md +430 -0
- package/src/skills/skill-creator/scripts/__init__.py +0 -0
- package/src/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/src/skills/skill-creator/scripts/generate_report.py +326 -0
- package/src/skills/skill-creator/scripts/improve_description.py +248 -0
- package/src/skills/skill-creator/scripts/package_skill.py +136 -0
- package/src/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/src/skills/skill-creator/scripts/run_eval.py +310 -0
- package/src/skills/skill-creator/scripts/run_loop.py +332 -0
- package/src/skills/skill-creator/scripts/utils.py +47 -0
- package/src/skills/sms-mail/SKILL.md +346 -0
- package/src/skills/sms-mail/references/mail-config.md +88 -0
- package/src/skills/sms-mail/references/sms-config.md +74 -0
- package/src/skills/social-login/SKILL.md +328 -0
- package/src/skills/social-login/references/provider-configs.md +118 -0
- package/src/skills/start/SKILL.md +154 -0
- package/src/skills/store-pc/SKILL.md +366 -0
- package/src/skills/sync/SKILL.md +149 -0
- package/src/skills/sync-back-merge/SKILL.md +66 -0
- package/src/skills/task-tracker/SKILL.md +307 -0
- package/src/skills/tech-decision/SKILL.md +393 -0
- package/src/skills/tenant-management/SKILL.md +272 -0
- package/src/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/src/skills/test-development/SKILL.md +301 -0
- package/src/skills/test-development/references/parameterized-examples.md +119 -0
- package/src/skills/ui-pc/SKILL.md +438 -0
- package/src/skills/update-status/SKILL.md +159 -0
- package/src/skills/utils-toolkit/SKILL.md +354 -0
- package/src/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/src/skills/websocket-sse/SKILL.md +350 -0
- package/src/skills/workflow-engine/SKILL.md +249 -0
- package/src/skills/yunxiao-task-management/SKILL.md +401 -0
- package/src/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"portainer_api_url": {
|
|
3
|
+
"dev": "https://devops-dev.xnzn.net/api",
|
|
4
|
+
"dev16": "https://xnzn-dev.xnzn.net/api",
|
|
5
|
+
"test": "https://devops-test.xnzn.net/api"
|
|
6
|
+
},
|
|
7
|
+
"portainer_user_name": {
|
|
8
|
+
"dev": "__PORTAINER_DEV_USER__",
|
|
9
|
+
"dev16": "__PORTAINER_DEV16_USER__",
|
|
10
|
+
"test": "__PORTAINER_TEST_USER__"
|
|
11
|
+
},
|
|
12
|
+
"portainer_user_pwd": {
|
|
13
|
+
"dev": "__PORTAINER_DEV_PWD__",
|
|
14
|
+
"dev16": "__PORTAINER_DEV16_PWD__",
|
|
15
|
+
"test": "__PORTAINER_TEST_PWD__"
|
|
16
|
+
},
|
|
17
|
+
"portainer_endpoints": {
|
|
18
|
+
"dev": "2",
|
|
19
|
+
"dev16": "1",
|
|
20
|
+
"test": "2"
|
|
21
|
+
},
|
|
22
|
+
"portainer_server_suffix": {
|
|
23
|
+
"dev": "_yunshitang-api",
|
|
24
|
+
"dev16": "_yunshitang-api-offline",
|
|
25
|
+
"test": "_yunshitang-api"
|
|
26
|
+
},
|
|
27
|
+
"core_job": {
|
|
28
|
+
"dev": "dev-tengyun-core",
|
|
29
|
+
"test": "test-tengyun-core"
|
|
30
|
+
},
|
|
31
|
+
"core_job_custom": {
|
|
32
|
+
"dev": "dev-后端-core",
|
|
33
|
+
"test": "test-后端-core"
|
|
34
|
+
},
|
|
35
|
+
"api_job": {
|
|
36
|
+
"dev": "dev-tengyun-yunshitang-api",
|
|
37
|
+
"test": "test-tengyun-yunshitang-api"
|
|
38
|
+
},
|
|
39
|
+
"api_job_custom": {
|
|
40
|
+
"dev": "dev-后端-api",
|
|
41
|
+
"test": "test-后端-api"
|
|
42
|
+
},
|
|
43
|
+
"jenkins_user_id": {
|
|
44
|
+
"dev": "__JENKINS_DEV_USER__",
|
|
45
|
+
"test": "__JENKINS_TEST_USER__"
|
|
46
|
+
},
|
|
47
|
+
"jenkins_api_token": {
|
|
48
|
+
"dev": "__JENKINS_DEV_TOKEN__",
|
|
49
|
+
"test": "__JENKINS_TEST_TOKEN__"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
# 简单调用jenkins api,构建项目并触发webhook
|
|
2
|
+
import html
|
|
3
|
+
import json
|
|
4
|
+
import os
|
|
5
|
+
import sys
|
|
6
|
+
import time
|
|
7
|
+
|
|
8
|
+
import jenkins
|
|
9
|
+
import requests
|
|
10
|
+
|
|
11
|
+
# 预设默认值(可修改)
|
|
12
|
+
cd_env = '' # dev或test
|
|
13
|
+
|
|
14
|
+
# dev和test环境独立配置
|
|
15
|
+
jenkins_server_url = 'https://ci.xnzn.net' # jenkins地址
|
|
16
|
+
portainer_server_suffix = '' # portainer服务名后缀
|
|
17
|
+
core_timeout = 60 * 10 # core构建超时时间
|
|
18
|
+
api_timeout = 60 * 5 # api构建超时时间
|
|
19
|
+
portainer_user_name = '' # portainer用户名
|
|
20
|
+
portainer_user_pwd = '' # portainer密码
|
|
21
|
+
portainer_api_url = ''
|
|
22
|
+
portainer_endpoints = ''
|
|
23
|
+
jenkins_user_id = ''
|
|
24
|
+
jenkins_api_token = ''
|
|
25
|
+
core_job = ''
|
|
26
|
+
api_job = ''
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# ~~~~~~~~~~~~~~~~~ 配置文件查找 ~~~~~~~~~~~~~~~~~~~~~~~~
|
|
30
|
+
|
|
31
|
+
def find_config_file(filename, search_paths):
|
|
32
|
+
"""按优先级查找配置文件:本地 > 全局"""
|
|
33
|
+
for p in search_paths:
|
|
34
|
+
filepath = os.path.join(p, filename)
|
|
35
|
+
if os.path.exists(filepath):
|
|
36
|
+
return filepath
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# 配置文件搜索路径
|
|
41
|
+
project_dir = os.getcwd()
|
|
42
|
+
home_claude_dir = os.path.join(os.path.expanduser('~'), '.claude')
|
|
43
|
+
|
|
44
|
+
# jenkins-config.json 搜索路径:项目本地 .claude/ > 全局 ~/.claude/
|
|
45
|
+
config_search_paths = [
|
|
46
|
+
os.path.join(project_dir, '.claude'),
|
|
47
|
+
home_claude_dir,
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
# last_cd_env.json 搜索路径:项目本地 jenkins/
|
|
51
|
+
state_dir = os.path.join(project_dir, 'jenkins')
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# 执行job方法,通过等待时间来判断是否构建成功
|
|
55
|
+
def do_job_by_time(server, job_name, param_branch, param_env, wait_time):
|
|
56
|
+
queue_num = server.build_job(name=job_name,
|
|
57
|
+
parameters={'BRANCH': param_branch, 'VERSION': param_env},
|
|
58
|
+
token=jenkins_api_token)
|
|
59
|
+
print('创建queue... {queue_num}')
|
|
60
|
+
time.sleep(wait_time)
|
|
61
|
+
queue_info = server.get_queue_item(queue_num)
|
|
62
|
+
|
|
63
|
+
print('等待时间到,queue信息:' + str(queue_info))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# 执行job方法,通过请求判断结束,进度更准确
|
|
67
|
+
def do_job(server, job_name, param_branch, param_env, wait_time):
|
|
68
|
+
|
|
69
|
+
queue_num = server.build_job(name=job_name,
|
|
70
|
+
parameters={'BRANCH': param_branch, 'VERSION': param_env},
|
|
71
|
+
token=jenkins_api_token)
|
|
72
|
+
print(f'创建队列... {queue_num}')
|
|
73
|
+
job_number = None
|
|
74
|
+
# 记录开始构建时间
|
|
75
|
+
start_time = time.time()
|
|
76
|
+
|
|
77
|
+
while True:
|
|
78
|
+
time.sleep(10)
|
|
79
|
+
if time.time() - start_time > wait_time:
|
|
80
|
+
print("构建超时,结束")
|
|
81
|
+
exit(1)
|
|
82
|
+
queue_info = server.get_queue_item(queue_num)
|
|
83
|
+
if queue_info['why'] is not None:
|
|
84
|
+
why = queue_info['why']
|
|
85
|
+
print(f'队列等待执行器...{why}')
|
|
86
|
+
elif 'executable' in queue_info:
|
|
87
|
+
job_number = queue_info['executable']['number']
|
|
88
|
+
print(f'开始执行任务...{job_number}')
|
|
89
|
+
break
|
|
90
|
+
else:
|
|
91
|
+
print('执行结束')
|
|
92
|
+
break
|
|
93
|
+
|
|
94
|
+
# 间隔x秒查询构建结果
|
|
95
|
+
while True:
|
|
96
|
+
time.sleep(10)
|
|
97
|
+
|
|
98
|
+
# 如果超过3分钟,直接结束
|
|
99
|
+
if time.time() - start_time > wait_time:
|
|
100
|
+
print("构建超时,结束")
|
|
101
|
+
exit(1)
|
|
102
|
+
headers = {
|
|
103
|
+
"n": str(job_number),
|
|
104
|
+
}
|
|
105
|
+
# 如果job_name包含 '/',则在把'/'替换为/job/
|
|
106
|
+
if '/' in job_name:
|
|
107
|
+
job_name_url = job_name.replace('/', '/job/')
|
|
108
|
+
url = f'{jenkins_server_url}/job/{job_name_url}/buildHistory/ajax'
|
|
109
|
+
else:
|
|
110
|
+
url = f'{jenkins_server_url}/job/{job_name}/buildHistory/ajax'
|
|
111
|
+
|
|
112
|
+
req = requests.Request(method='POST', url=url, headers=headers)
|
|
113
|
+
response = server.jenkins_open(req)
|
|
114
|
+
# 解析response包含的html
|
|
115
|
+
html_str = html.unescape(response)
|
|
116
|
+
if 'Expected build number' in html_str: # 正在等待中
|
|
117
|
+
print(f'\r等待中...', end='')
|
|
118
|
+
continue
|
|
119
|
+
elif ('预计剩余时间' in html_str) or ('Estimated remaining time' in html_str): # 是否包含 预计剩余时间
|
|
120
|
+
try:
|
|
121
|
+
# 取出 '<td style="width:' 和 '%;" class="progress-bar-done"></td>' 之间的字符串
|
|
122
|
+
progress = html_str.split('<td style="width:')[1].split('%;" class="progress-bar-done"></td>')[0]
|
|
123
|
+
# 打印进度更新最后一行
|
|
124
|
+
print(f'\r构建中...{progress}%', end='')
|
|
125
|
+
except IndexError:
|
|
126
|
+
print("无法从HTML字符串中提取进度信息")
|
|
127
|
+
except Exception as e:
|
|
128
|
+
print(f"发生错误: {e}")
|
|
129
|
+
continue
|
|
130
|
+
else:
|
|
131
|
+
print(f"\r构建结束,耗时 {(time.time() - start_time):.2f} 秒", end='\n')
|
|
132
|
+
# 查询构建结果
|
|
133
|
+
build_info = server.get_build_info(job_name, job_number)
|
|
134
|
+
if build_info['result'] == 'SUCCESS':
|
|
135
|
+
print(f"构建成功 {html.unescape(build_info['url'])}")
|
|
136
|
+
else:
|
|
137
|
+
print(f"构建失败({build_info['result']}) {html.unescape(build_info['url'])}")
|
|
138
|
+
print(f"原始 build_info:{build_info}")
|
|
139
|
+
print(f"原始 html:{html_str}")
|
|
140
|
+
return False
|
|
141
|
+
break
|
|
142
|
+
return True
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
# 获取 Portainer JWT Token
|
|
146
|
+
def get_jwt_token():
|
|
147
|
+
login_url = f"{portainer_api_url}/auth"
|
|
148
|
+
login_data = {
|
|
149
|
+
"Username": portainer_user_name,
|
|
150
|
+
"Password": portainer_user_pwd,
|
|
151
|
+
}
|
|
152
|
+
response = requests.post(login_url, data=json.dumps(login_data))
|
|
153
|
+
token = response.json()["jwt"]
|
|
154
|
+
print('获取token成功')
|
|
155
|
+
return token
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
# 获取 Service ID
|
|
159
|
+
def get_server_id(token):
|
|
160
|
+
headers = {
|
|
161
|
+
"Authorization": f"Bearer {token}",
|
|
162
|
+
"Content-Type": "application/json"
|
|
163
|
+
}
|
|
164
|
+
url = portainer_api_url + f'/endpoints/{portainer_endpoints}/docker/services'
|
|
165
|
+
services_response = requests.get(url, headers=headers)
|
|
166
|
+
services = services_response.json()
|
|
167
|
+
|
|
168
|
+
service_name = cd_env + portainer_server_suffix
|
|
169
|
+
# Find service with matching name
|
|
170
|
+
target_service_id = None
|
|
171
|
+
for service in services:
|
|
172
|
+
if service["Spec"]["Name"] == service_name:
|
|
173
|
+
target_service_id = service["ID"]
|
|
174
|
+
break
|
|
175
|
+
|
|
176
|
+
print(f'查询{service_name}的service_id:{target_service_id}')
|
|
177
|
+
return target_service_id
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
# 获取 Service 的 WebHook
|
|
181
|
+
def get_service_web_hook():
|
|
182
|
+
pt_token = get_jwt_token()
|
|
183
|
+
service_id = get_server_id(pt_token)
|
|
184
|
+
|
|
185
|
+
headers = {
|
|
186
|
+
"Authorization": f"Bearer {pt_token}",
|
|
187
|
+
"Content-Type": "application/json"
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
url = portainer_api_url + f'/webhooks?filters=%7B%22ResourceID%22:%22{service_id}%22,%22EndpointID%22:{portainer_endpoints}%7D'
|
|
191
|
+
services_response = requests.get(url, headers=headers)
|
|
192
|
+
webhook_json = services_response.json()
|
|
193
|
+
target_webhook_token = None
|
|
194
|
+
# 是否存在webhook
|
|
195
|
+
if len(webhook_json) > 0:
|
|
196
|
+
target_webhook_token = webhook_json[0]['Token']
|
|
197
|
+
print('获取webhook_token:' + target_webhook_token)
|
|
198
|
+
|
|
199
|
+
# 尝试调用请求创建webhook
|
|
200
|
+
if target_webhook_token is None:
|
|
201
|
+
payload = {"ResourceID": service_id, "EndpointID": 2, "WebhookType": 1, "registryID": 0}
|
|
202
|
+
services_response = requests.post(portainer_api_url + "/webhooks", headers=headers, data=json.dumps(payload))
|
|
203
|
+
webhook_json = services_response.json()
|
|
204
|
+
if webhook_json is not None and 'Token' in webhook_json:
|
|
205
|
+
target_webhook_token = webhook_json['Token']
|
|
206
|
+
print('创建webhook_token结果:' + target_webhook_token)
|
|
207
|
+
|
|
208
|
+
return target_webhook_token
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
# 启动webhook(dev1-15)
|
|
212
|
+
def trigger_webhook():
|
|
213
|
+
|
|
214
|
+
wh_token = get_service_web_hook()
|
|
215
|
+
|
|
216
|
+
if wh_token is None:
|
|
217
|
+
print(f"{cd_env}环境没有配置webhook,结束")
|
|
218
|
+
exit(0)
|
|
219
|
+
else:
|
|
220
|
+
print("开始触发webhook")
|
|
221
|
+
r = requests.post(portainer_api_url + '/webhooks/' + wh_token)
|
|
222
|
+
print("webhook触发结果:" + str(r.status_code))
|
|
223
|
+
|
|
224
|
+
# 通过service id 更新
|
|
225
|
+
def update_portainer():
|
|
226
|
+
|
|
227
|
+
pt_token = get_jwt_token()
|
|
228
|
+
service_id = get_server_id(pt_token)
|
|
229
|
+
|
|
230
|
+
headers = {
|
|
231
|
+
"Authorization": f"Bearer {pt_token}",
|
|
232
|
+
"Content-Type": "application/json"
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
# 调用更新(PUT请求):
|
|
236
|
+
url = portainer_api_url + f'/endpoints/{portainer_endpoints}/forceupdateservice'
|
|
237
|
+
payload = {
|
|
238
|
+
"serviceID": service_id,
|
|
239
|
+
"pullImage": True,
|
|
240
|
+
}
|
|
241
|
+
services_response = requests.put(url, headers=headers, data=json.dumps(payload))
|
|
242
|
+
update_rsp_json = services_response.json()
|
|
243
|
+
print('更新结果:' + str(update_rsp_json))
|
|
244
|
+
|
|
245
|
+
# ~~~~~~~~~~~~~~~~~~ 开始输入 ~~~~~~~~~~~~~~~~~~~~~~~
|
|
246
|
+
|
|
247
|
+
# 打印欢迎信息
|
|
248
|
+
print('\n~~~~~~~~~~~~~~')
|
|
249
|
+
print('正在使用jenkins+portainer构建工具,目前支持dev和test环境的自动化构建+更新')
|
|
250
|
+
print('~~~~~~~~~~~~~~\n')
|
|
251
|
+
|
|
252
|
+
# 查找环境配置文件(jenkins-config.json)
|
|
253
|
+
config_file = find_config_file('jenkins-config.json', config_search_paths)
|
|
254
|
+
if config_file is None:
|
|
255
|
+
print('❌ 未找到 jenkins-config.json')
|
|
256
|
+
print(f' 请将配置文件放到以下任一位置:')
|
|
257
|
+
for p in config_search_paths:
|
|
258
|
+
print(f' - {os.path.join(p, "jenkins-config.json")}')
|
|
259
|
+
print(f'\n 或运行: npx ai-engineering-init config --type jenkins')
|
|
260
|
+
exit(1)
|
|
261
|
+
print(f'配置文件: {config_file}')
|
|
262
|
+
|
|
263
|
+
# 确保构建状态目录存在
|
|
264
|
+
os.makedirs(state_dir, exist_ok=True)
|
|
265
|
+
state_file = os.path.join(state_dir, 'last_cd_env.json')
|
|
266
|
+
|
|
267
|
+
# 读取上一次构建的环境(如果不存在则使用默认值)
|
|
268
|
+
if os.path.exists(state_file):
|
|
269
|
+
with open(state_file, 'r', encoding='utf-8') as f:
|
|
270
|
+
cd_env_json = json.load(f)
|
|
271
|
+
else:
|
|
272
|
+
cd_env_json = {
|
|
273
|
+
"build_mode": "1",
|
|
274
|
+
"cd_env": "dev1",
|
|
275
|
+
"core_param_branch": "master",
|
|
276
|
+
"api_param_branch": "master",
|
|
277
|
+
"api_param_folder": None
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
# 从终端获取用户输入模式
|
|
281
|
+
build_mode = input(f"请输入模式 0-只构建 1-全构建+更新 2-构建api+更新 3-只更新(预设{cd_env_json['build_mode']}):", ) or cd_env_json['build_mode']
|
|
282
|
+
|
|
283
|
+
# 从终端获取用户输入cd_env
|
|
284
|
+
cd_env = input(f"请输入环境(预设:{cd_env_json['cd_env']}):", ) or cd_env_json['cd_env']
|
|
285
|
+
|
|
286
|
+
# 从终端获取用户输入的分支
|
|
287
|
+
core_param_branch = input(f"请输入core分支(预设:{cd_env_json['core_param_branch']}):") or cd_env_json['core_param_branch']
|
|
288
|
+
|
|
289
|
+
# 从终端输入api分支
|
|
290
|
+
api_param_branch = input(f"请输入api分支(预设:{cd_env_json['api_param_branch']}):") or cd_env_json['api_param_branch']
|
|
291
|
+
|
|
292
|
+
# 从终端输入api文件夹名
|
|
293
|
+
api_param_folder = input(f"请输入定制工程文件夹名(空格或None表示不需要,预设:{cd_env_json['api_param_folder']}):") or cd_env_json['api_param_folder']
|
|
294
|
+
|
|
295
|
+
# 校验模式:
|
|
296
|
+
if build_mode is None or build_mode not in ('0', '1', '2', '3'):
|
|
297
|
+
print("模式错误,结束")
|
|
298
|
+
exit(1)
|
|
299
|
+
# 校验环境,如果不是dev或test开头的,直接退出
|
|
300
|
+
if cd_env is None or not cd_env.startswith('dev') and not cd_env.startswith('test'):
|
|
301
|
+
print("环境错误,结束")
|
|
302
|
+
exit(1)
|
|
303
|
+
# 校验分支
|
|
304
|
+
if core_param_branch is None:
|
|
305
|
+
print("分支错误,结束")
|
|
306
|
+
exit(1)
|
|
307
|
+
if api_param_branch is None:
|
|
308
|
+
print("分支错误,结束")
|
|
309
|
+
exit(1)
|
|
310
|
+
if api_param_folder is None or api_param_folder == '' or api_param_folder == ' ' or api_param_folder == 'none' or api_param_folder == 'None':
|
|
311
|
+
api_param_folder = None
|
|
312
|
+
# 如果dev44及以上环境,只能使用模式0:
|
|
313
|
+
if cd_env.startswith('dev') and int(cd_env[3:]) >= 44 and build_mode != '0':
|
|
314
|
+
print("dev43及以上环境只能使用模式0,结束")
|
|
315
|
+
exit(1)
|
|
316
|
+
|
|
317
|
+
# 保存到本地状态文件
|
|
318
|
+
cd_env_json['cd_env'] = cd_env
|
|
319
|
+
cd_env_json['core_param_branch'] = core_param_branch
|
|
320
|
+
cd_env_json['api_param_branch'] = api_param_branch
|
|
321
|
+
cd_env_json['api_param_folder'] = api_param_folder
|
|
322
|
+
cd_env_json['build_mode'] = build_mode
|
|
323
|
+
json.dump(cd_env_json, open(state_file, 'w', encoding='utf-8'), ensure_ascii=False)
|
|
324
|
+
|
|
325
|
+
# 根据环境输入,设置前缀
|
|
326
|
+
env_prefix = 'dev' if cd_env.startswith('dev') else 'test'
|
|
327
|
+
|
|
328
|
+
# 读取环境配置(从全局或本地 jenkins-config.json)
|
|
329
|
+
with open(config_file, 'r', encoding='utf-8') as f:
|
|
330
|
+
env_param = json.load(f)
|
|
331
|
+
|
|
332
|
+
jenkins_user_id = env_param['jenkins_user_id'][env_prefix]
|
|
333
|
+
jenkins_api_token = env_param['jenkins_api_token'][env_prefix]
|
|
334
|
+
core_job = env_param['core_job'][env_prefix]
|
|
335
|
+
api_job = env_param['api_job'][env_prefix]
|
|
336
|
+
if api_param_folder is not None:
|
|
337
|
+
core_job = api_param_folder + '/' + env_param['core_job_custom'][env_prefix]
|
|
338
|
+
api_job = api_param_folder + '/' + env_param['api_job_custom'][env_prefix]
|
|
339
|
+
|
|
340
|
+
# portainer配置(如果cd_env > dev15,使用另一套配置)
|
|
341
|
+
if cd_env.startswith('dev') and int(cd_env[3:]) > 15:
|
|
342
|
+
portainer_user_name = env_param['portainer_user_name']['dev16']
|
|
343
|
+
portainer_user_pwd = env_param['portainer_user_pwd']['dev16']
|
|
344
|
+
portainer_api_url = env_param['portainer_api_url']['dev16']
|
|
345
|
+
portainer_endpoints = env_param['portainer_endpoints']['dev16']
|
|
346
|
+
portainer_server_suffix = env_param['portainer_server_suffix']['dev16']
|
|
347
|
+
else:
|
|
348
|
+
portainer_api_url = env_param['portainer_api_url'][env_prefix]
|
|
349
|
+
portainer_user_name = env_param['portainer_user_name'][env_prefix]
|
|
350
|
+
portainer_user_pwd = env_param['portainer_user_pwd'][env_prefix]
|
|
351
|
+
portainer_endpoints = env_param['portainer_endpoints'][env_prefix]
|
|
352
|
+
portainer_server_suffix = env_param['portainer_server_suffix'][env_prefix]
|
|
353
|
+
|
|
354
|
+
# ~~~~~~~~~~~~~~~~~ 开始打包 ~~~~~~~~~~~~~~~~~~~~~~~~
|
|
355
|
+
|
|
356
|
+
print('\n~~~~~~~~~~~~~~\n')
|
|
357
|
+
print('开始打包')
|
|
358
|
+
print("链接jenkins:" + jenkins_server_url)
|
|
359
|
+
|
|
360
|
+
# 实例化jenkins对象,连接远程的jenkins master server
|
|
361
|
+
j_server = jenkins.Jenkins(url=jenkins_server_url, username=jenkins_user_id, password=jenkins_api_token)
|
|
362
|
+
print("jenkins信息:" + j_server.get_whoami()['fullName'])
|
|
363
|
+
|
|
364
|
+
# 通过参数构建core
|
|
365
|
+
if int(build_mode) < 2:
|
|
366
|
+
print('开始构建core:' + core_job + ' ' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
|
|
367
|
+
rs = do_job(j_server, core_job, core_param_branch, cd_env, core_timeout)
|
|
368
|
+
if rs is False:
|
|
369
|
+
print('构建core失败,结束')
|
|
370
|
+
exit(1)
|
|
371
|
+
time.sleep(10)
|
|
372
|
+
|
|
373
|
+
if int(build_mode) < 3:
|
|
374
|
+
print('开始构建api:' + api_job + ' ' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
|
|
375
|
+
rs = do_job(j_server, api_job, api_param_branch, cd_env, api_timeout)
|
|
376
|
+
if rs is False:
|
|
377
|
+
print('构建api失败,结束')
|
|
378
|
+
exit(1)
|
|
379
|
+
time.sleep(2)
|
|
380
|
+
|
|
381
|
+
print('结束打包' + ' ' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
|
|
382
|
+
|
|
383
|
+
# ~~~~~~~~~~~~~~~~~ 开始更新 ~~~~~~~~~~~~~~~~~~~~~~~~
|
|
384
|
+
|
|
385
|
+
# 开始更新portainer
|
|
386
|
+
if int(build_mode) == 0:
|
|
387
|
+
print('\n~~~~~~~ 请自行更新portainer ~~~~~~~\n')
|
|
388
|
+
else:
|
|
389
|
+
print('\n~~~~~~~~~~~~~~\n')
|
|
390
|
+
print('开始更新portainer:' + portainer_api_url + ' ' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
|
|
391
|
+
# portainer配置(如果cd_env > dev15,使用update)
|
|
392
|
+
if cd_env.startswith('dev') and int(cd_env[3:]) > 15:
|
|
393
|
+
# 通过update更新
|
|
394
|
+
update_portainer()
|
|
395
|
+
else:
|
|
396
|
+
# 触发webhook
|
|
397
|
+
trigger_webhook()
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
exit(0)
|