Issue #256 的两项核心能力 - #745
Draft
ljluestc wants to merge 1 commit into
Draft
Conversation
…ase action - allow selecting host groups in deploy config, deploy request, rollback, and batch execute flows - expand group IDs to host IDs recursively with de-duplication and deploy-scope filtering - add Jenkins custom release action support in ext2 with URL/auth/params/timeout - keep host-based selection compatible while enabling group-based bulk selection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
本 PR 实现了 Issue #256 的两项核心能力:
背景与问题
当前在主机数量较多时,发布配置和批量执行都需要逐台选择主机,操作成本高且容易遗漏。
同时,部分团队发布链路依赖 Jenkins,需要在发布流程中直接触发 Jenkins Job。
变更内容
一、机器组选择能力
新增机器组解析能力:
spug_api/apps/host/utils.pyparse_group_host_ids(group_ids),支持递归解析分组与子分组下的主机。发布配置接口支持
group_ids:spug_api/apps/app/views.py/api/app/deploy/支持同时传入host_ids与group_ids,后端合并去重后落库为最终host_ids。发布申请接口支持
group_ids:spug_api/apps/deploy/views.py批量执行接口支持
group_ids:spug_api/apps/exec/views.py/api/exec/do/支持机器组入参,扩展主机后继续复用现有权限校验逻辑。前端增加机器组选择入口与参数透传:
spug_web/src/pages/deploy/app/Ext1Setup1.jsspug_web/src/pages/deploy/app/Ext2Setup1.jsspug_web/src/pages/deploy/app/AddSelect.jsspug_web/src/pages/deploy/request/Ext1Form.jsspug_web/src/pages/deploy/request/Ext2Form.jsspug_web/src/pages/deploy/request/Rollback.jsspug_web/src/pages/exec/task/index.js二、Jenkins 发布支持
在 Ext2 服务端动作中新增 Jenkins 类型:
spug_api/apps/deploy/utils.pytype: "jenkins"动作处理逻辑,可触发 Jenkins Job:/build/buildWithParameters前端新增 Jenkins 动作编辑能力:
spug_web/src/pages/deploy/app/Ext2Setup2.js兼容性说明
验证情况
已完成
python3 -m compileall已覆盖并通过以下文件:spug_api/apps/app/views.pyspug_api/apps/deploy/views.pyspug_api/apps/deploy/utils.pyspug_api/apps/exec/views.pyspug_api/apps/host/utils.py当前环境未完成
npm --prefix spug_web run buildreact-app-rewired,命令未成功执行。风险与回归建议
建议回归: