diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml
index a4c00272fbe..db418975aff 100644
--- a/.github/workflows/agent.yml
+++ b/.github/workflows/agent.yml
@@ -35,7 +35,7 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('src/agent/agent/go.sum') }}
- run: make BUILD_OUT_TAG=out clean all
working-directory: src/agent/agent/
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
if: ${{ inputs.upload == 'true' }}
with:
name: agent
diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml
index 69af7fdec74..91014b65291 100644
--- a/.github/workflows/backend.yml
+++ b/.github/workflows/backend.yml
@@ -55,7 +55,7 @@ jobs:
run: |
./gradlew clean test build :core:worker:worker-agent:shadowJar \
-DmysqlURL=127.0.0.1:${{ job.services.mysql.ports['3306'] }} -DmysqlUser=root -DmysqlPasswd=root --no-daemon
- - uses: actions/upload-artifact@v1
+ - uses: actions/upload-artifact@v4
if: ${{ inputs.upload == 'true' }}
with:
name: backend-jar
@@ -95,7 +95,7 @@ jobs:
run: |
./gradlew clean test build :core:worker:worker-agent:shadowJar -Ddevops.assemblyMode=KUBERNETES \
-DmysqlURL=127.0.0.1:${{ job.services.mysql.ports['3306'] }} -DmysqlUser=root -DmysqlPasswd=root --no-daemon
- - uses: actions/upload-artifact@v1
+ - uses: actions/upload-artifact@v4
if: ${{ inputs.upload == 'true' }}
with:
name: backend-docker
diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml
index 8dd62b68c93..222066952d8 100644
--- a/.github/workflows/frontend.yml
+++ b/.github/workflows/frontend.yml
@@ -5,7 +5,7 @@ name: Frontend CI
on:
push:
- branches: [master]
+ branches: ["*"]
paths:
- "src/frontend/**"
pull_request:
@@ -47,7 +47,7 @@ jobs:
export NODE_OPTIONS=--openssl-legacy-provider
pnpm public
working-directory: src/frontend
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
if: ${{ inputs.upload == 'true' }}
with:
name: frontend
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index db4b0eb2eeb..1bd2cc31aa6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -30,17 +30,17 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: download frontend
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v4.1.7
with:
name: frontend
path: src/frontend/frontend
- name: download agent
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v4.1.7
with:
name: agent
path: src/agent/agent/bin/
- name: download backend
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v4.1.7
with:
name: backend-jar
path: src/backend/ci/release
@@ -49,7 +49,7 @@ jobs:
version="$(basename $GITHUB_REF)"
echo "version=$version" >> $GITHUB_OUTPUT
ci_ms_wip="sign,monitoring" ci_pkg_dir=/dev/shm/ci ./scripts/packager-ci.sh "$version" bkci-slim.tar.gz
- - uses: actions/upload-artifact@v1
+ - uses: actions/upload-artifact@v4
with:
name: bkci-slim
path: bkci-slim.tar.gz
@@ -61,17 +61,17 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: download frontend
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v4.1.7
with:
name: frontend
path: src/frontend/frontend
- name: download agent
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v4.1.7
with:
name: agent
path: src/agent/agent/bin/
- name: download bkci
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v4.1.7
with:
name: backend-docker
path: src/backend/ci/release
@@ -120,7 +120,7 @@ jobs:
version="$(basename $GITHUB_REF)"
helm package . --version $version --app-version $version
mv bk-ci-$version.tgz bk-ci-charts.tgz
- - uses: actions/upload-artifact@v1
+ - uses: actions/upload-artifact@v4
with:
name: bkci-chart
path: helm-charts/core/ci/bk-ci-charts.tgz
@@ -131,12 +131,12 @@ jobs:
needs: [package-zip, package-helm]
steps:
- name: download bkci-slim
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v4.1.7
with:
name: bkci-slim
path: ./
- name: download bkci-chart
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v4.1.7
with:
name: bkci-chart
path: ./
diff --git a/CHANGELOG/CHANGELOG-3.0.md b/CHANGELOG/CHANGELOG-3.0.md
new file mode 100644
index 00000000000..36d6e65831f
--- /dev/null
+++ b/CHANGELOG/CHANGELOG-3.0.md
@@ -0,0 +1,223 @@
+
+- [v3.0.0](#v300)
+ - [Changelog since v2.1.0](#changelog-since-v210)
+
+
+
+
+
+
+# v3.0.0
+## Changelog since v2.1.0
+#### 新增
+##### 流水线
+- pipeline as code
+ - [新增] feat:草稿版本UI展示 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9861)
+ - [新增] 流水线版本管理机制 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8161)
+ - [新增]【PAC】feat:开启PAC模式的代码库支持自动同步代码库YAML变更到蓝盾 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8130)
+ - [新增] pac ui编辑流水线 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8125)
+ - [新增] Code 方式创建的流水线,变量面板-输出变量未获取到问题优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10755)
+ - [新增] 新建/编辑流水线时支持调试流水线 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8164)
+ - [新增] 上下文使用范围限定 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10655)
+ - [新增] 【PAC】feat:流水线常量 Code 语法和规范 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9971)
+ - [新增] 发布流水线页面「静态」流水线组优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9962)
+ - [新增] 动态流水线组支持根据代码库/.ci下的一级目录进行条件分组 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9682)
+ - [新增] 【PAC】feat:支持code 方式禁用流水线 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9788)
+ - [新增] 流水线维护过程中记录操作日志 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8197)
+ - [新增] 【PAC】跨项目复用构建资源池,支持Code配置 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10225)
+ - [新增] 【PAC】feat:自定义构建号格式支持 Code 方式定义 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10210)
+ - [新增] 编辑变量交互优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9652)
+ - [新增] 流水线构建详情页支持一键展开/收起 job [链接](http://github.com/TencentBlueKing/bk-ci/issues/9775)
+ - [新增] 支持蓝盾新表达式运行条件 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10467)
+ - [新增] 发布流水线页面,PAC模式增加说明 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10482)
+ - [新增] [PAC] code互转对api用户的影响 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9813)
+ - [新增] 调试记录提示和入口优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10720)
+ - [新增] 流水线变量支持手动拖拽调整顺序 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10458)
+ - [新增] 流水线备注支持 上下文方式 设置和引用 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10459)
+ - [新增] 拉取构件支持流水线调试模式 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10291)
+ - [新增] 【PAC】feat:查看流水线 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8195)
+- [新增] 支持流水线指标监控 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9860)
+- [新增] 流水线权限代持功能重构 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10356)
+ - [新增] 增加权限代持人变量 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10890)
+- [新增] 流水线模板设置优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10857)
+- [新增] 流水线执行历史支持根据触发人筛选 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10752)
+- [新增] 流水线通知方式未生效时的交互优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10615)
+- [新增] 工蜂MR触发器支持设置监听的action [链接](http://github.com/TencentBlueKing/bk-ci/issues/8949)
+- [新增] MR 事件触发器支持 WIP [链接](http://github.com/TencentBlueKing/bk-ci/issues/10683)
+- [新增] P4触发器支持 Code 编写 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10551)
+- [新增] Git事件触发器自定义触发条件支持通过 Code 方式定义 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10497)
+- [新增] 流水线日志颜色优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9934)
+- [新增] openapi 触发流水线运行时,支持传入触发材料 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10302)
+- [新增] 日志需要展示特殊字符 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10097)
+- [新增] 流水线重命名优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10399)
+- [新增] SVN事件触发的路径匹配规则增加兜底逻辑 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10510)
+- [新增] 流水线执行历史列表增加「执行耗时」字段 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10251)
+- [新增] 【蓝盾-产品-已评审】流水线支持展示运行进度 [链接](http://github.com/TencentBlueKing/bk-ci/issues/7932)
+- [新增] 构建历史列表支持展示构建信息字段 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10724)
+- [新增] 流水线支持POJO 属性按顺序导出 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10728)
+- [新增] 流水线“文件”类型的变量优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10400)
+- [新增] 定时触发器支持指定代码库和分支 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10300)
+- [新增] 流水线模板管理编辑和实例管理优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10626)
+- [新增] 保存流水线时校验引用到的子流水线权限 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10259)
+- [新增] 流水线引擎动态配置管理 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10647)
+- [新增] 支持在父流水线中查看异步执行的子流水线的状态 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10260)
+- [新增] 新增下拉/复选类型变量时,预定义的选项支持批量输入跟输入key [链接](http://github.com/TencentBlueKing/bk-ci/issues/10290)
+- [新增] 补全内置变量列表 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10436)
+- [新增] 流水线构建详情页,每个 job/step 上的耗时直接显示 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10311)
+- [新增] 回收站支持流水线名词搜索 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10408)
+- [新增] 流水线列表最近执行展示内容优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10600)
+- [新增] 制品下载无反应问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10555)
+- [新增] 子流水线调用插件参数传递方式优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9943)
+- [新增] 流水线设置查看页面并发分组配置缺失问题fix [链接](http://github.com/TencentBlueKing/bk-ci/issues/10516)
+- [新增] 日志复制出来的空格异常 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10540)
+- [新增] 流水线版本描述,增加长度限制 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10520)
+- [新增] 构建详情页面,版本号hover可以展示对应的版本描述 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10524)
+##### 代码库
+- [新增] 关联工蜂代码库时,支持开启 Pipeline as Code 模式 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8115)
+- [新增] 代码库优化一期功能点 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9347)
+- [新增] github pr检查输出质量红线报告 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10607)
+- [新增] 【openapi】关联代码库到蓝盾的api支持开启 PAC [链接](http://github.com/TencentBlueKing/bk-ci/issues/10770)
+- [新增] 已开启 PAC 模式的代码库,支持关闭 PAC [链接](http://github.com/TencentBlueKing/bk-ci/issues/9993)
+- [新增] 代码库触发事件结果展示优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10307)
+- [新增] github check run应该支持GONGFENGSCAN渠道的流水线 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10704)
+##### 质量红线
+- [新增] 流水线中有多个CodeCC插件时,质量红线跳转链接要能跳转到相应任务 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10605)
+- [新增] quality新增matchRuleList的app接口 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10610)
+##### 环境管理
+- [新增] 构建环境中的节点,支持停用/启用 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10258)
+- [新增] 第三方构建机上下线记录清理 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10237)
+- [新增] 装WINDOWS构建机,且点击install.bat完成安装,刷新节点没有显示 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10725)
+- [新增] 支持批量安装 Agent [链接](http://github.com/TencentBlueKing/bk-ci/issues/10024)
+##### 权限中心
+- [新增] 支持管理员查看项目成员 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9620)
+- [新增] 用户组相关接口优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10463)
+- [新增] 根据组织ID拉取用户列表 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10513)
+- [新增] 申请权限页面优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10145)
+##### 项目管理
+- [新增] 项目查看页面运营产品未显示名称问题优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10668)
+- [新增] 新增项目级事件回调 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10146)
+##### 研发商店
+- [新增] 支持插件开发者设置默认的超时时间和默认的失败时的策略 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10019)
+- [新增] 新增修改研发商店组件初始化项目的接口 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10126)
+- [新增] 插件上传文件失败时重试 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10214)
+- [新增] 研发商店-工作台-容器镜像,验证失败时的状态icon错位 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10696)
+- [新增] 修复更新组件关联初始化项目信息时未删除关联的调试项目信息 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10621)
+- [新增] 整合微拓展资源调度能力 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10122)
+##### 日志服务
+- [新增] Log的Service接口补充subtag 查询条件 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10536)
+##### 调度
+- [新增] 优化dockerhost dockerRun容器日志获取接口 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10811)
+- [新增] kubernetes-manager 支持docker inspect image [链接](http://github.com/TencentBlueKing/bk-ci/issues/8862)
+- [新增] 构建环境Agent并发上限为0不生效 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10740)
+- [新增] 构建资源类型为第三方构建集群时支持指定Job并发数 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9810)
+- [新增] 调整dockerhost默认容器超时时间 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10645)
+- [新增] 第三方构建机构建资源锁定策略优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10449)
+- [新增] 获取job执行最大并发/项目活跃用户度量数据 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10232)
+##### Agent
+- [新增] Worker杀掉当前进程父进程导致Agent误报 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10362)
+- [新增] Agent启动时对相同Id不同IP的重复安装做告警 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10264)
+- [新增] Agent清理进程为worker兜底 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10234)
+##### Stream
+- [新增] [stream] 优化大仓触发耗时 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10861)
+- [新增] [stream] 优化触发流程,减少触发时长 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10753)
+- [新增] stream开启CI时,必填组织架构和运营产品 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10231)
+- [新增] [stream]新增获取组成员 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10711)
+##### 网关
+- [新增] 网关在auth_request时可以处理302的异常跳转 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10295)
+- [新增] 网关默认tag不写死 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10334)
+##### 其他
+- [新增] 压缩http返回json串 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10323)
+- [新增] 蓝鲸7.2版本的改动 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10558)
+- [新增] sql doc 文档更新 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9974)
+- [新增] bk-apigw接口认证方式调整 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10802)
+- [新增] 修复swagger的扫包方式 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10806)
+- [新增] 全局配置title/footer/logo/favicon/产品名称 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10678)
+- [新增] 蓝盾网关信任安全域名的cors-header [链接](http://github.com/TencentBlueKing/bk-ci/issues/10767)
+- [新增] 修复iam初始化脚本 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10658)
+- [新增] openapi 访问无权限时新增文案 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10638)
+- [新增] 依赖的服务未部署时的交互优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10612)
+- [新增] 提高滚动发布的速度 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10236)
+- [新增] 优化审计相关逻辑 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10671)
+- [新增] 优化open接口切面校验 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10426)
+
+#### 优化
+##### 流水线
+- [优化] 流水线执行历史表格优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10769)
+- [优化] 流水线实例复制功能没有复制相应实例的参数值 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10580)
+- [优化] 表达式解析器增加对流水线变量处理的兼容 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10609)
+- [优化] 禁用流水线功能优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8190)
+- [优化] UI 方式下新增/编辑变量页面改版 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8185)
+- [优化] 插件执行错误码优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10326)
+##### 环境管理
+- [优化] 环境管理添加部分错误码 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10788)
+- [优化] 环境管理部分代码优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10641)
+- [优化] er:环境管理部分代码优化2 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10263)
+##### 研发商店
+- [优化] 支持java插件target引用变量来设置jar包执行路径 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10643)
+- [优化] 研发商店敏感接口权限校验优化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10418)
+- [优化] 研发商店插件运行支持通过task.json中的execution.target字段指定运行参数 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10072)
+- [优化] 研发商店通用化接口封装 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10123)
+- [优化] 研发商店logo上传暂不支持svg图片,防止xss攻击 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10374)
+##### Agent
+- [修复] windwos启动构建进程时偶现142问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10179)
+##### 其他
+- [优化] 获取db集群名称方法支持db集群列表实现可配置化 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10372)
+
+#### 修复
+##### 流水线
+- [修复] 修正取消正在运行中构建可能产生的慢逻辑 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10874)
+- [修复] 人工审核未勾选通知方式不应进行通知 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10183)
+- [修复] 触发时前端手动跳过的矩阵依然运行 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10751)
+- [修复] 新构建详情页插件渲染问题修复 [链接](http://github.com/TencentBlueKing/bk-ci/issues/9185)
+- [修复] git事件触发插件支持第三方服务changeFiles值总是为null [链接](http://github.com/TencentBlueKing/bk-ci/issues/10255)
+- [修复] 构建历史接口的调试记录查询问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10814)
+- [修复] 流水线触发器配置查看时可编辑 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10827)
+- [修复] 文件类型变量问题修复 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10822)
+- [修复] 流水线Job异步开机后随即用户取消流水线,异步开机异常导致流水线状态刷新异常 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10816)
+- [修复] 为job分配多个容器并发执行业务逻辑会导致构建取消 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10517)
+- [修复] 归档构件的制品页,显示有误,路径不完整,缺少文件大小 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10667)
+- [修复] 修复矩阵code校验时存在的并发问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10771)
+- [修复] stream 流水线MR触发时分支变量值有误 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10707)
+- [修复] 有时候取消final stage后,构建未彻底结束 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10619)
+- [修复] 归档报告插件创建token没有实现 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10693)
+- [修复] 合作版工蜂force push触发流水线失败 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10680)
+- [修复] 保存流水线模板权限问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10681)
+- [修复] 忽略工蜂webhook测试请求 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10666)
+- [修复] 流水线删除后,执行中的任务没终止 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8483)
+- [修复] 新详情页的部分展示问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10557)
+- [修复] 前端detail接口中返回草稿版本有误 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10545)
+- [修复] 前序取消状态导致finally stage结束异常 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10533)
+- [修复] 删除流水线接口异常 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10542)
+- [修复] 新详情页显示问题修复 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10395)
+- [修复] 解决stage审核参数值类型不一致问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10095)
+- [修复] 回收站搜索不可用 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8440)
+- [修复] 子流水线插件执行超时,但是没有把子流水线停掉 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10331)
+- [修复] 流水线版本保存记录未及时清理 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10244)
+- [修复] 变量只读导致无法重写 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10245)
+##### 代码库
+- [修复] 关联代码库已关联pac的项目名关闭弹框后未清空 [链接](http://github.com/TencentBlueKing/bk-ci/issues/8146)
+##### 项目管理
+- [修复] 开源社区,项目管理界面 开源版权限需放开 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10382)
+- [修复] 社区版simple权限中心前端应该隐藏最大授权范围 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10040)
+- [修复] 项目最大可授权范围 序列化对比问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10649)
+- [修复] 禁用项目不应该统计用户数 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10634)
+- [修复] 修复CodeCC平台灰度标签设置不正确 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10434)
+##### 研发商店
+- [修复] 研发商店应用首个版本处于测试中,查询接口按实例ID查询不到测试中的应用版本 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10691)
+- [修复] 调低SampleFirstStoreHostDecorateImpl的优先级配置 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10401)
+- [修复] [社区]上架失败&流水线执行页面白屏问题[v2.1.0+] [链接](http://github.com/TencentBlueKing/bk-ci/issues/10357)
+- [修复] 研发商店通用接口国际化配置调整 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10640)
+- [修复] 开源版插件升级版本未刷新LATEST_TEST_FLAG标识状态 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10701)
+##### 调度
+- [修复] 无编译环境构建机执行带审核插件的矩阵job问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10599)
+- [修复] 重试重新调度导致复用无法解锁 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10675)
+##### Agent
+- [修复] 修复arm64mac进程无法清理的问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10252)
+- [修复] Agent复用在流水线重试的场景下存在问题 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10877)
+- [修复] agent没有区域信息时默认没有bkrepo的网关 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10778)
+- [修复] Agent复用同级节点时跳过了复用锁 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10795)
+- [修复] Agent复用时取消后不能退出队列 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10589)
+##### 其他
+- [修复] 2.1版本process服务启动失败 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10271)
+- [修复] 同步差异代码 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10319)
+- [修复] 修复npm依赖漏洞 [链接](http://github.com/TencentBlueKing/bk-ci/issues/10604)
diff --git a/CHANGELOG/README.md b/CHANGELOG/README.md
index abecde491c7..53f27a6a715 100644
--- a/CHANGELOG/README.md
+++ b/CHANGELOG/README.md
@@ -8,4 +8,4 @@
- [CHANGELOG-2.0.md](./CHANGELOG-2.0.md)
- [CHANGELOG-2.0.md](./CHANGELOG-2.0.md)
- [CHANGELOG-2.1.md](./CHANGELOG-2.1.md)
-- [CHANGELOG-2.1.md](./CHANGELOG-2.1.md)
+- [CHANGELOG-3.0.md](./CHANGELOG-3.0.md)
diff --git a/docs/overview/db/devops_ci_artifactory.md b/docs/overview/db/devops_ci_artifactory.md
index aa233af1dff..b13839df9a4 100644
--- a/docs/overview/db/devops_ci_artifactory.md
+++ b/docs/overview/db/devops_ci_artifactory.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_artifactory
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_artifactory 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_auth.md b/docs/overview/db/devops_ci_auth.md
index a3b30e4d45c..ae8fd164cb8 100644
--- a/docs/overview/db/devops_ci_auth.md
+++ b/docs/overview/db/devops_ci_auth.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_auth
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_auth 的数据库文档
| 表名 | 说明 |
@@ -27,8 +27,12 @@
| T_AUTH_OAUTH2_SCOPE | 授权范围表 |
| T_AUTH_OAUTH2_SCOPE_OPERATION | 授权操作信息表 |
| T_AUTH_RESOURCE | 资源表 |
+| T_AUTH_RESOURCE_AUTHORIZATION | 资源授权管理表 |
| T_AUTH_RESOURCE_GROUP | 资源关联用户组表 |
+| T_AUTH_RESOURCE_GROUP_APPLY | 用户组申请记录表 |
| T_AUTH_RESOURCE_GROUP_CONFIG | 资源用户组配置表 |
+| T_AUTH_RESOURCE_GROUP_MEMBER | 资源组成员 |
+| T_AUTH_RESOURCE_SYNC | 同步 IAM 资源 |
| T_AUTH_RESOURCE_TYPE | 权限资源类型表 |
| T_AUTH_STRATEGY | 权限策略表 |
| T_AUTH_TEMPORARY_VERIFY_RECORD | 迁移-鉴权记录表 |
@@ -375,6 +379,25 @@
| 11 | CREATE_USER | varchar | 64 | 0 | N | N | | 创建者 |
| 12 | UPDATE_USER | varchar | 64 | 0 | N | N | | 修改人 |
+**表名:** T_AUTH_RESOURCE_AUTHORIZATION
+
+**说明:** 资源授权管理表
+
+**数据列:**
+
+| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
+| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
+| 1 | ID | bigint | 20 | 0 | N | Y | | 主键 ID |
+| 2 | PROJECT_CODE | varchar | 32 | 0 | N | N | | 项目 ID |
+| 3 | RESOURCE_TYPE | varchar | 32 | 0 | N | N | | 资源类型 |
+| 4 | RESOURCE_CODE | varchar | 255 | 0 | N | N | | 资源 ID |
+| 5 | RESOURCE_NAME | varchar | 255 | 0 | N | N | | 资源名 |
+| 6 | HANDOVER_FROM | varchar | 64 | 0 | N | N | | 授予人 |
+| 7 | HANDOVER_FROM_CN_NAME | varchar | 64 | 0 | N | N | | 授予人中文名称 |
+| 8 | HANDOVER_TIME | timestamp | 19 | 0 | N | N | CURRENT_TIMESTAMP | 授予时间 |
+| 9 | CREATE_TIME | timestamp | 19 | 0 | Y | N | CURRENT_TIMESTAMP | 创建时间 |
+| 10 | UPDATE_TIME | timestamp | 19 | 0 | Y | N | CURRENT_TIMESTAMP | 更新时间 |
+
**表名:** T_AUTH_RESOURCE_GROUP
**说明:** 资源关联用户组表
@@ -395,6 +418,25 @@
| 10 | RELATION_ID | varchar | 32 | 0 | N | N | | 关联的 IAM 组 ID |
| 11 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
| 12 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |
+| 13 | DESCRIPTION | varchar | 512 | 0 | Y | N | | 用户组描述 |
+| 14 | IAM_TEMPLATE_ID | int | 10 | 0 | Y | N | | 人员模板 ID |
+
+**表名:** T_AUTH_RESOURCE_GROUP_APPLY
+
+**说明:** 用户组申请记录表
+
+**数据列:**
+
+| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
+| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
+| 1 | ID | bigint | 20 | 0 | N | Y | | 主键 ID |
+| 2 | PROJECT_CODE | varchar | 64 | 0 | N | N | | 项目 ID |
+| 3 | MEMBER_ID | varchar | 64 | 0 | N | N | | 成员 ID |
+| 4 | IAM_GROUP_ID | int | 10 | 0 | N | N | | IAM 组 ID |
+| 5 | STATUS | int | 10 | 0 | Y | N | 0 | 状态,0-审批中,1-审批成功,2-审批超时 |
+| 6 | NUMBER_OF_CHECKS | int | 10 | 0 | Y | N | 0 | 检查次数,用于同步组数据 |
+| 7 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
+| 8 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |
**表名:** T_AUTH_RESOURCE_GROUP_CONFIG
@@ -416,6 +458,42 @@
| 10 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
| 11 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |
+**表名:** T_AUTH_RESOURCE_GROUP_MEMBER
+
+**说明:** 资源组成员
+
+**数据列:**
+
+| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
+| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
+| 1 | ID | bigint | 20 | 0 | N | Y | | 主键 ID |
+| 2 | PROJECT_CODE | varchar | 64 | 0 | N | N | | 项目 ID |
+| 3 | RESOURCE_TYPE | varchar | 32 | 0 | N | N | | 资源类型 |
+| 4 | RESOURCE_CODE | varchar | 255 | 0 | N | N | | 资源 ID |
+| 5 | GROUP_CODE | varchar | 32 | 0 | N | N | | 用户组标识 |
+| 6 | IAM_GROUP_ID | int | 10 | 0 | N | N | | IAM 组 ID |
+| 7 | MEMBER_ID | varchar | 64 | 0 | N | N | | 成员 ID |
+| 8 | MEMBER_NAME | varchar | 512 | 0 | N | N | | 成员名 |
+| 9 | MEMBER_TYPE | varchar | 32 | 0 | N | N | | 成员类型,用户/组织/模板 |
+| 10 | EXPIRED_TIME | datetime | 19 | 0 | N | N | | 过期时间 |
+| 11 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
+| 12 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |
+
+**表名:** T_AUTH_RESOURCE_SYNC
+
+**说明:** 同步 IAM 资源
+
+**数据列:**
+
+| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
+| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
+| 1 | PROJECT_CODE | varchar | 64 | 0 | N | Y | | 项目 ID |
+| 2 | STATUS | int | 10 | 0 | Y | N | 0 | 迁移状态,0-同步中,1-同步成功,2-同步失败 |
+| 3 | ERROR_MESSAGE | text | 65535 | 0 | Y | N | | 错误信息 |
+| 4 | TOTAL_TIME | bigint | 20 | 0 | Y | N | | 总耗时 |
+| 5 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
+| 6 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |
+
**表名:** T_AUTH_RESOURCE_TYPE
**说明:** 权限资源类型表
diff --git a/docs/overview/db/devops_ci_dispatch.md b/docs/overview/db/devops_ci_dispatch.md
index 1f54524f78c..6d2b38941b0 100644
--- a/docs/overview/db/devops_ci_dispatch.md
+++ b/docs/overview/db/devops_ci_dispatch.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_dispatch
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_dispatch 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_environment.md b/docs/overview/db/devops_ci_environment.md
index f6f82037fee..ccd99671861 100644
--- a/docs/overview/db/devops_ci_environment.md
+++ b/docs/overview/db/devops_ci_environment.md
@@ -2,11 +2,12 @@
**数据库名:** devops_ci_environment
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_environment 的数据库文档
| 表名 | 说明 |
| :---: | :---: |
+| T_AGENT_BATCH_INSTALL_TOKEN | |
| T_AGENT_FAILURE_NOTIFY_USER | |
| T_AGENT_PIPELINE_REF | |
| T_AGENT_SHARE_PROJECT | |
@@ -21,6 +22,20 @@
| T_NODE | 节点信息表 |
| T_PROJECT_CONFIG | |
+**表名:** T_AGENT_BATCH_INSTALL_TOKEN
+
+**说明:**
+
+**数据列:**
+
+| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
+| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
+| 1 | PROJECT_ID | varchar | 64 | 0 | N | Y | | 项目 ID |
+| 2 | USER_ID | varchar | 64 | 0 | N | Y | | token 用户 |
+| 3 | TOKEN | varchar | 64 | 0 | N | N | | Base64 编码后 TOKEN |
+| 4 | CREATED_TIME | datetime | 19 | 0 | N | N | | 创建时间 |
+| 5 | EXPIRED_TIME | datetime | 19 | 0 | N | N | | 过期时间 |
+
**表名:** T_AGENT_FAILURE_NOTIFY_USER
**说明:**
diff --git a/docs/overview/db/devops_ci_image.md b/docs/overview/db/devops_ci_image.md
index 88dcb3cf826..026cda3dba6 100644
--- a/docs/overview/db/devops_ci_image.md
+++ b/docs/overview/db/devops_ci_image.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_image
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_image 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_log.md b/docs/overview/db/devops_ci_log.md
index 2cde1010584..3a8c4f23dfe 100644
--- a/docs/overview/db/devops_ci_log.md
+++ b/docs/overview/db/devops_ci_log.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_log
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_log 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_notify.md b/docs/overview/db/devops_ci_notify.md
index 23faa1c80be..342c4c6aaa8 100644
--- a/docs/overview/db/devops_ci_notify.md
+++ b/docs/overview/db/devops_ci_notify.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_notify
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_notify 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_op.md b/docs/overview/db/devops_ci_op.md
index 061645ae86c..a303de8b68d 100644
--- a/docs/overview/db/devops_ci_op.md
+++ b/docs/overview/db/devops_ci_op.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_op
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_op 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_openapi.md b/docs/overview/db/devops_ci_openapi.md
index ac602f24397..169895172c6 100644
--- a/docs/overview/db/devops_ci_openapi.md
+++ b/docs/overview/db/devops_ci_openapi.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_openapi
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_openapi 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_plugin.md b/docs/overview/db/devops_ci_plugin.md
index ecaacc564ae..ac496d2a91b 100644
--- a/docs/overview/db/devops_ci_plugin.md
+++ b/docs/overview/db/devops_ci_plugin.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_plugin
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_plugin 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_process.md b/docs/overview/db/devops_ci_process.md
index 82aba3c8d41..6a304b0b10d 100644
--- a/docs/overview/db/devops_ci_process.md
+++ b/docs/overview/db/devops_ci_process.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_process
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_process 的数据库文档
| 表名 | 说明 |
@@ -177,6 +177,7 @@
| 14 | CONTAINER_HASH_ID | varchar | 64 | 0 | Y | N | | 容器全局唯一 ID |
| 15 | MATRIX_GROUP_FLAG | bit | 1 | 0 | Y | N | | 是否为构建矩阵 |
| 16 | MATRIX_GROUP_ID | varchar | 64 | 0 | Y | N | | 所属的矩阵组 ID |
+| 17 | JOB_ID | varchar | 128 | 0 | Y | N | | jobid |
**表名:** T_PIPELINE_BUILD_DETAIL
@@ -403,6 +404,7 @@
| 16 | START_TIME | datetime | 23 | 0 | Y | N | | 开始时间 |
| 17 | END_TIME | datetime | 23 | 0 | Y | N | | 结束时间 |
| 18 | TIMESTAMPS | text | 65535 | 0 | Y | N | | 运行中产生的时间戳集合 |
+| 19 | ASYNC_STATUS | varchar | 32 | 0 | Y | N | | 插件异步执行状态 |
**表名:** T_PIPELINE_BUILD_STAGE
@@ -491,6 +493,7 @@
| 28 | PLATFORM_ERROR_CODE | int | 10 | 0 | Y | N | | 对接平台错误码 |
| 29 | CONTAINER_HASH_ID | varchar | 64 | 0 | Y | N | | 构建 Job 唯一标识 |
| 30 | STEP_ID | varchar | 64 | 0 | Y | N | | 标识上下文的自定义 ID |
+| 31 | JOB_ID | varchar | 128 | 0 | Y | N | | jobid |
**表名:** T_PIPELINE_BUILD_TEMPLATE_ACROSS_INFO
@@ -595,6 +598,7 @@
| 16 | PIPELINE_NAME_PINYIN | varchar | 1300 | 0 | Y | N | | 流水线名称拼音 |
| 17 | LATEST_START_TIME | datetime | 23 | 0 | Y | N | | 最近启动时间 |
| 18 | LATEST_VERSION_STATUS | varchar | 64 | 0 | Y | N | | 最新分布版本状态 |
+| 19 | LOCKED | bit | 1 | 0 | Y | N | b'0' | 是否锁定,PACv3.0 新增锁定,取代原来 setting 表中的 LOCK |
**表名:** T_PIPELINE_JOB_MUTEX_GROUP
@@ -775,7 +779,8 @@
| 18 | STATUS | varchar | 16 | 0 | Y | N | | 版本状态 |
| 19 | BRANCH_ACTION | varchar | 32 | 0 | Y | N | | 分支状态 |
| 20 | DESCRIPTION | text | 65535 | 0 | Y | N | | 版本变更说明 |
-| 21 | UPDATE_TIME | timestamp | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |
+| 21 | UPDATER | varchar | 64 | 0 | Y | N | | 最近更新人 |
+| 22 | UPDATE_TIME | timestamp | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |
**表名:** T_PIPELINE_RULE
diff --git a/docs/overview/db/devops_ci_project.md b/docs/overview/db/devops_ci_project.md
index 69eaef1ea59..a8be36ea8d3 100644
--- a/docs/overview/db/devops_ci_project.md
+++ b/docs/overview/db/devops_ci_project.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_project
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_project 的数据库文档
| 表名 | 说明 |
@@ -392,6 +392,7 @@
| 26 | new_window | bit | 1 | 0 | Y | N | b'0' | 是否打开新标签页 |
| 27 | new_windowUrl | varchar | 200 | 0 | Y | N | | 新标签页地址 |
| 28 | cluster_type | varchar | 32 | 0 | N | N | | 集群类型 |
+| 29 | DOC_URL | varchar | 255 | 0 | N | N | | 文档链接 |
**表名:** T_SERVICE_TYPE
diff --git a/docs/overview/db/devops_ci_quality.md b/docs/overview/db/devops_ci_quality.md
index 1d302f1919b..dc2183cf289 100644
--- a/docs/overview/db/devops_ci_quality.md
+++ b/docs/overview/db/devops_ci_quality.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_quality
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_quality 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_repository.md b/docs/overview/db/devops_ci_repository.md
index c567433a243..0779c6f3556 100644
--- a/docs/overview/db/devops_ci_repository.md
+++ b/docs/overview/db/devops_ci_repository.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_repository
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_repository 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_sign.md b/docs/overview/db/devops_ci_sign.md
index 681561a0748..590d3b62ee5 100644
--- a/docs/overview/db/devops_ci_sign.md
+++ b/docs/overview/db/devops_ci_sign.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_sign
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_sign 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_store.md b/docs/overview/db/devops_ci_store.md
index d4065da48ff..8b7ba6c3d78 100644
--- a/docs/overview/db/devops_ci_store.md
+++ b/docs/overview/db/devops_ci_store.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_store
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_store 的数据库文档
| 表名 | 说明 |
diff --git a/docs/overview/db/devops_ci_ticket.md b/docs/overview/db/devops_ci_ticket.md
index be91dbe7aa7..14c3936daaf 100644
--- a/docs/overview/db/devops_ci_ticket.md
+++ b/docs/overview/db/devops_ci_ticket.md
@@ -2,7 +2,7 @@
**数据库名:** devops_ci_ticket
-**文档版本:** 1.0.2
+**文档版本:** 1.0.4
**文档描述:** devops_ci_ticket 的数据库文档
| 表名 | 说明 |
diff --git a/helm-charts/core/ci/Chart.lock b/helm-charts/core/ci/Chart.lock
index 16713a585e1..a1070e53a50 100644
--- a/helm-charts/core/ci/Chart.lock
+++ b/helm-charts/core/ci/Chart.lock
@@ -27,4 +27,4 @@ dependencies:
repository: file://./local_chart/kubernetes-management
version: 0.0.45
digest: sha256:bb11b7ac0e3487504f5563cd2b170d04038fc8971aaecbaca3dc5ecdcb792a43
-generated: "2024-06-21T18:05:57.191350067+08:00"
+generated: "2024-08-15T12:18:41.358254786+08:00"
diff --git a/helm-charts/core/ci/base/values.yaml b/helm-charts/core/ci/base/values.yaml
index 0094c6c3794..900c9f1e4d8 100644
--- a/helm-charts/core/ci/base/values.yaml
+++ b/helm-charts/core/ci/base/values.yaml
@@ -393,7 +393,7 @@ kubernetes-manager:
targetCPU: 80
targetMemory: 80
# 使用的镜像
- image: bkci/bkci-kubernetes-manager:0.0.31
+ image: bkci/bkci-kubernetes-manager:0.0.33
# 决定每次helm部署时的构建机所在的命名空间,同时dockerInitSh也在那里,为空时默认为 {{ .Release.Namespace }}
builderNamespace:
redis:
@@ -412,11 +412,13 @@ kubernetes-manager:
apiToken:
key: Devops-Token
value: landun
- rsaPrivateKey: |
+ rsaPrivateKey: ""
volumeMount:
# 流水线构建工作空间和agent日志在容器内的挂载点
dataPath: /data/devops/workspace
logPath: /data/devops/logs
+ docker:
+ enable: true
dockerInit:
# 是否使用当前chart的 dockerinit.sh
useDockerInit: true
diff --git a/helm-charts/core/ci/charts/kubernetes-manager-0.0.45.tgz b/helm-charts/core/ci/charts/kubernetes-manager-0.0.45.tgz
index bf049c9fea9..510864f540d 100644
Binary files a/helm-charts/core/ci/charts/kubernetes-manager-0.0.45.tgz and b/helm-charts/core/ci/charts/kubernetes-manager-0.0.45.tgz differ
diff --git a/helm-charts/core/ci/local_chart/kubernetes-management/templates/deployment.yaml b/helm-charts/core/ci/local_chart/kubernetes-management/templates/deployment.yaml
index 3038bb8ebd8..26c681cde45 100644
--- a/helm-charts/core/ci/local_chart/kubernetes-management/templates/deployment.yaml
+++ b/helm-charts/core/ci/local_chart/kubernetes-management/templates/deployment.yaml
@@ -76,6 +76,14 @@ spec:
value: {{ .Values.multiCluster.enabled | quote }}
- name: DEFAULT_NAMESPACE
value: {{ .Values.multiCluster.defaultNamespace }}
+ {{- if .Values.kubernetesManager.docker.enable }}
+ - name: DOCKER_HOST
+ value: tcp://localhost:2375
+ {{- end}}
+ {{- if .Values.kubernetesManager.debug }}
+ - name: KUBERNETES_MANAGER_DEBUG_ENABLE
+ value: "true"
+ {{- end}}
workingDir: /data/workspace/kubernetes-manager
livenessProbe:
tcpSocket:
@@ -99,8 +107,22 @@ spec:
mountPath: /data/workspace/kubernetes-manager/config
readOnly: true
{{- end}}
- {{- if .Values.configmap.enabled}}
+ {{- if .Values.kubernetesManager.docker.enable }}
+ - name: kuberentes-manager-docker
+ image: {{ .Values.kubernetesManager.docker.image }}
+ command: ["dockerd", "--host", "tcp://localhost:2375"]
+ {{- if .Values.kubernetesManager.docker.resources }}
+ resources: {{- toYaml .Values.kubernetesManager.docker.resources | nindent 12 }}
+ {{- end }}
+ securityContext:
+ privileged: true
+ volumeMounts:
+ - name: docker-graph-storage
+ mountPath: /var/lib/docker
+ {{- end }}
+
volumes:
+ {{- if .Values.configmap.enabled}}
- name: kubernetes-manager-config
configMap:
name: kubernetes-manager
@@ -110,6 +132,10 @@ spec:
{{- if .Values.kubeConfig.useKubeConfig}}
- key: kubeConfig.yaml
path: kubeConfig.yaml
- {{- end}}
+ {{- end}}
+ {{- if .Values.kubernetesManager.docker.enable }}
+ - name: docker-graph-storage
+ emptyDir: {}
+ {{- end}}
{{- end}}
{{- end -}}
diff --git a/helm-charts/core/ci/local_chart/kubernetes-management/templates/kubernetes-manager-configmap.yaml b/helm-charts/core/ci/local_chart/kubernetes-management/templates/kubernetes-manager-configmap.yaml
index a8dd052b646..c2a930b027a 100644
--- a/helm-charts/core/ci/local_chart/kubernetes-management/templates/kubernetes-manager-configmap.yaml
+++ b/helm-charts/core/ci/local_chart/kubernetes-management/templates/kubernetes-manager-configmap.yaml
@@ -135,6 +135,9 @@ data:
rsaPrivateKey: |
{{- .Values.kubernetesManager.apiserver.auth.rsaPrivateKey | nindent 10 }}
+ docker:
+ enable: {{ .Values.kubernetesManager.docker.enable }}
+
{{ if .Values.kubeConfig.useKubeConfig -}}
kubeConfig.yaml: |
{{- .Values.kubeConfig.content | nindent 4 }}
diff --git a/helm-charts/core/ci/local_chart/kubernetes-management/values.yaml b/helm-charts/core/ci/local_chart/kubernetes-management/values.yaml
index c11f424f3c2..93aef6e5a23 100644
--- a/helm-charts/core/ci/local_chart/kubernetes-management/values.yaml
+++ b/helm-charts/core/ci/local_chart/kubernetes-management/values.yaml
@@ -94,6 +94,7 @@ service:
# kubernetesManager Deployment
kubernetesManager:
enabled: true
+ debug: false
replicas: 1
resources:
requests:
@@ -147,11 +148,23 @@ kubernetesManager:
apiToken:
key: Devops-Token
value: landun
- rsaPrivateKey: |
+ rsaPrivateKey: ""
volumeMount:
# 流水线构建工作空间和agent日志在容器内的挂载点
dataPath: /data/devops/workspace
logPath: /data/devops/logs
+ # manager使用docker相关配置,会启用特权模式容器
+ docker:
+ enable: false
+ image: docker:24.0.1-dind
+ resources:
+ requests:
+ cpu: 50m
+ memory: 512Mi
+ limits:
+ cpu: 100m
+ memory: 1024Mi
+
dockerInit:
# 是否使用当前chart的 dockerinit.sh
useDockerInit: true
diff --git a/helm-charts/core/ci/templates/artifactory/statefulset.yaml b/helm-charts/core/ci/templates/artifactory/statefulset.yaml
index 6f7038d5ab0..0947e9d7fb9 100644
--- a/helm-charts/core/ci/templates/artifactory/statefulset.yaml
+++ b/helm-charts/core/ci/templates/artifactory/statefulset.yaml
@@ -160,7 +160,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- name: storage
{{- if and .Values.persistence.enabled (eq .Values.config.bkCiArtifactoryRealm "local") }}
diff --git a/helm-charts/core/ci/templates/auth/deployment.yaml b/helm-charts/core/ci/templates/auth/deployment.yaml
index e9d8dd5ed19..e048980070d 100644
--- a/helm-charts/core/ci/templates/auth/deployment.yaml
+++ b/helm-charts/core/ci/templates/auth/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/bklog.yaml b/helm-charts/core/ci/templates/bklog.yaml
index 1754ea65616..e26e31b1e44 100644
--- a/helm-charts/core/ci/templates/bklog.yaml
+++ b/helm-charts/core/ci/templates/bklog.yaml
@@ -17,7 +17,7 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: Helm
path:
- - /data/logs/*-.log
+ - /data/workspace/*/logs/service.log
encoding: 'utf-8'
multiline:
pattern: '^[0-2][0-9][0-9][0-9].[0-1][0-9].[0-3][0-9]'
diff --git a/helm-charts/core/ci/templates/dispatch/deployment.yaml b/helm-charts/core/ci/templates/dispatch/deployment.yaml
index 63b8c4eb7b0..6dcbb649f47 100644
--- a/helm-charts/core/ci/templates/dispatch/deployment.yaml
+++ b/helm-charts/core/ci/templates/dispatch/deployment.yaml
@@ -144,7 +144,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/environment/deployment.yaml b/helm-charts/core/ci/templates/environment/deployment.yaml
index 9b5d850242f..2ecf20e91d8 100644
--- a/helm-charts/core/ci/templates/environment/deployment.yaml
+++ b/helm-charts/core/ci/templates/environment/deployment.yaml
@@ -144,7 +144,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/init/init.iam-rbac.yaml b/helm-charts/core/ci/templates/init/init.iam-rbac.yaml
index dd9d035f73e..052741d1e3d 100644
--- a/helm-charts/core/ci/templates/init/init.iam-rbac.yaml
+++ b/helm-charts/core/ci/templates/init/init.iam-rbac.yaml
@@ -50,6 +50,19 @@ spec:
sed -i 's/bk-ci.service.consul/{{ include "bkci.names.fullname" . }}-gateway.{{ .Release.Namespace }}/g' ../ms-init/auth/iam-callback-resource-registere.conf
iam_json_file="../ms-init/auth/iam-callback-resource-registere.conf"
curl -X POST -H "Content-Type:application/json" -d "@$iam_json_file" "http://{{ include "bkci.names.fullname" . }}-auth.{{ .Release.Namespace }}.svc.cluster.local/api/op/auth/iam/callback/"
+
+ # 迁移所有项目的特定资源类型资源
+ curl -X 'POST' \
+ 'http://{{ include "bkci.names.fullname" . }}-auth.{{ .Release.Namespace }}.svc.cluster.local/api/op/auth/migrate/migrateSpecificResourceOfAllProject' \
+ -H 'accept: application/json' \
+ -H 'Content-Type: application/json' \
+ -d '{
+ "resourceType": "pipeline",
+ "includeNullRouterTag": true,
+ "migrateProjectResource": true,
+ "migrateProjectDefaultGroup": true,
+ "migrateOtherResource": true
+ }'
restartPolicy: OnFailure
{{- end -}}
{{- end -}}
diff --git a/helm-charts/core/ci/templates/log/deployment.yaml b/helm-charts/core/ci/templates/log/deployment.yaml
index 279648a973e..f8fbd22e060 100644
--- a/helm-charts/core/ci/templates/log/deployment.yaml
+++ b/helm-charts/core/ci/templates/log/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/metrics/deployment.yaml b/helm-charts/core/ci/templates/metrics/deployment.yaml
index 6c042094fd9..78efb93f3ae 100644
--- a/helm-charts/core/ci/templates/metrics/deployment.yaml
+++ b/helm-charts/core/ci/templates/metrics/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/misc/deployment.yaml b/helm-charts/core/ci/templates/misc/deployment.yaml
index b6d96cfe6c8..ba9dfbbf212 100644
--- a/helm-charts/core/ci/templates/misc/deployment.yaml
+++ b/helm-charts/core/ci/templates/misc/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/notify/deployment.yaml b/helm-charts/core/ci/templates/notify/deployment.yaml
index e18c35fd2fa..953eac2a8c6 100644
--- a/helm-charts/core/ci/templates/notify/deployment.yaml
+++ b/helm-charts/core/ci/templates/notify/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/openapi/deployment.yaml b/helm-charts/core/ci/templates/openapi/deployment.yaml
index 6e1727e65e2..d15313d2368 100644
--- a/helm-charts/core/ci/templates/openapi/deployment.yaml
+++ b/helm-charts/core/ci/templates/openapi/deployment.yaml
@@ -147,7 +147,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/process/deployment.yaml b/helm-charts/core/ci/templates/process/deployment.yaml
index 806ede7c8c3..d43db8e46a6 100644
--- a/helm-charts/core/ci/templates/process/deployment.yaml
+++ b/helm-charts/core/ci/templates/process/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/project/deployment.yaml b/helm-charts/core/ci/templates/project/deployment.yaml
index a163070b673..bdd5a8e74c2 100644
--- a/helm-charts/core/ci/templates/project/deployment.yaml
+++ b/helm-charts/core/ci/templates/project/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/quality/deployment.yaml b/helm-charts/core/ci/templates/quality/deployment.yaml
index 8da188dc19e..a35887528e6 100644
--- a/helm-charts/core/ci/templates/quality/deployment.yaml
+++ b/helm-charts/core/ci/templates/quality/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/repository/deployment.yaml b/helm-charts/core/ci/templates/repository/deployment.yaml
index c871cbce991..7fa7cfce728 100644
--- a/helm-charts/core/ci/templates/repository/deployment.yaml
+++ b/helm-charts/core/ci/templates/repository/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/store/deployment.yaml b/helm-charts/core/ci/templates/store/deployment.yaml
index e32a0d18725..cde89f895f7 100644
--- a/helm-charts/core/ci/templates/store/deployment.yaml
+++ b/helm-charts/core/ci/templates/store/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/stream/deployment.yaml b/helm-charts/core/ci/templates/stream/deployment.yaml
index b85919ff929..45e30b0358b 100644
--- a/helm-charts/core/ci/templates/stream/deployment.yaml
+++ b/helm-charts/core/ci/templates/stream/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/ticket/deployment.yaml b/helm-charts/core/ci/templates/ticket/deployment.yaml
index dd91cb732e1..a7a55b7b8eb 100644
--- a/helm-charts/core/ci/templates/ticket/deployment.yaml
+++ b/helm-charts/core/ci/templates/ticket/deployment.yaml
@@ -142,7 +142,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/helm-charts/core/ci/templates/websocket/statefulset.yaml b/helm-charts/core/ci/templates/websocket/statefulset.yaml
index 4e4381c49a8..bbe4d66142b 100644
--- a/helm-charts/core/ci/templates/websocket/statefulset.yaml
+++ b/helm-charts/core/ci/templates/websocket/statefulset.yaml
@@ -138,7 +138,7 @@ spec:
command:
- /bin/bash
- -c
- - sleep 10 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
+ - sleep 20 && ps -ef|grep java|grep -v grep|awk '{print $2}'|xargs kill -15
volumes:
- hostPath:
path: /data
diff --git a/src/agent/agent/src/pkg/agent/agent.go b/src/agent/agent/src/pkg/agent/agent.go
index 3441a61318e..b980f4d4aa7 100644
--- a/src/agent/agent/src/pkg/agent/agent.go
+++ b/src/agent/agent/src/pkg/agent/agent.go
@@ -51,9 +51,19 @@ func Run(isDebug bool) {
// 初始化国际化
i18n.InitAgentI18n()
+ // 启动 agent,需要等到上报启动成功才能继续
_, err := job.AgentStartup()
if err != nil {
- logs.Warn("agent startup failed: ", err.Error())
+ logs.WithError(err).Error("agent startup failed")
+ for {
+ _, err = job.AgentStartup()
+ if err == nil {
+ break
+ } else {
+ logs.WithError(err).Error("agent startup failed")
+ time.Sleep(5 * time.Second)
+ }
+ }
}
// 数据采集
diff --git a/src/backend/ci/build.gradle.kts b/src/backend/ci/build.gradle.kts
index 1ab5dc054c1..56d29d82890 100644
--- a/src/backend/ci/build.gradle.kts
+++ b/src/backend/ci/build.gradle.kts
@@ -1,3 +1,5 @@
+import java.net.URI
+
plugins {
id("com.tencent.devops.boot") version "0.0.7"
detektCheck
@@ -24,6 +26,11 @@ allprojects {
}
}
+ // 新增maven 仓库
+ repositories {
+ add(maven { url = URI("https://repo.jenkins-ci.org/releases") })
+ }
+
// 版本管理
dependencyManagement {
setApplyMavenExclusions(false)
@@ -167,4 +174,8 @@ allprojects {
}
}
}
+ configurations.all {
+ resolutionStrategy.cacheChangingModulesFor(0,"seconds")
+ resolutionStrategy.cacheDynamicVersionsFor(0,"seconds")
+ }
}
diff --git a/src/backend/ci/buildSrc/src/main/kotlin/constants/Versions.kt b/src/backend/ci/buildSrc/src/main/kotlin/constants/Versions.kt
index 7f53a5dc377..ff146df41fc 100644
--- a/src/backend/ci/buildSrc/src/main/kotlin/constants/Versions.kt
+++ b/src/backend/ci/buildSrc/src/main/kotlin/constants/Versions.kt
@@ -46,7 +46,7 @@ object Versions {
const val jjwt = "0.11.5"
const val Okhttp = "4.9.0"
const val jgit = "5.13.1.202206130422-r"
- const val iam = "1.0.6"
+ const val iam = "1.0.7"
const val disklrucache = "2.0.2"
const val BkCrypto = "1.1.3"
const val audit = "1.0.8"
diff --git a/src/backend/ci/buildSrc/src/main/kotlin/plugins/task-docker-build.gradle.kts b/src/backend/ci/buildSrc/src/main/kotlin/plugins/task-docker-build.gradle.kts
index f023d7da697..72df005d24b 100644
--- a/src/backend/ci/buildSrc/src/main/kotlin/plugins/task-docker-build.gradle.kts
+++ b/src/backend/ci/buildSrc/src/main/kotlin/plugins/task-docker-build.gradle.kts
@@ -42,8 +42,6 @@ if (toImage.isNullOrBlank() || (toImageRepo.isNullOrBlank() && toImageTag.isNull
} + "bkci-" + service + ":" + toImageTag
}
- val configNamespace = System.getProperty("config.namespace")
-
val jvmFlagList = System.getProperty("jvmFlags.file")?.let { File(it).readLines() } ?: emptyList()
val finalJvmFlags = mutableListOf(
@@ -75,7 +73,6 @@ if (toImage.isNullOrBlank() || (toImageRepo.isNullOrBlank() && toImageTag.isNull
"-Dspring.main.allow-circular-references=true",
"-Dspring.cloud.kubernetes.config.sources[0].name=config-bk-ci-common",
"-Dspring.cloud.kubernetes.config.sources[1].name=config-bk-ci-$service",
- "-Dspring.cloud.kubernetes.config.namespace=$configNamespace",
"-Dspring.cloud.kubernetes.discovery.all-namespaces=true",
"-Dspring.cloud.kubernetes.config.includeProfileSpecificSources=false",
"-Dio.undertow.legacy.cookie.ALLOW_HTTP_SEPARATORS_IN_V0=true",
diff --git a/src/backend/ci/core/artifactory/biz-artifactory/src/main/kotlin/com/tencent/devops/artifactory/service/impl/BkRepoArchiveFileServiceImpl.kt b/src/backend/ci/core/artifactory/biz-artifactory/src/main/kotlin/com/tencent/devops/artifactory/service/impl/BkRepoArchiveFileServiceImpl.kt
index b088d6229d8..a44a6b2057c 100644
--- a/src/backend/ci/core/artifactory/biz-artifactory/src/main/kotlin/com/tencent/devops/artifactory/service/impl/BkRepoArchiveFileServiceImpl.kt
+++ b/src/backend/ci/core/artifactory/biz-artifactory/src/main/kotlin/com/tencent/devops/artifactory/service/impl/BkRepoArchiveFileServiceImpl.kt
@@ -65,6 +65,7 @@ import com.tencent.devops.common.archive.util.MimeUtil
import com.tencent.devops.common.auth.api.AuthPermission
import com.tencent.devops.common.auth.api.AuthResourceType
import com.tencent.devops.common.service.utils.HomeHostUtil
+import com.tencent.devops.process.api.service.ServicePipelineResource
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
@@ -94,11 +95,12 @@ class BkRepoArchiveFileServiceImpl @Autowired constructor(
private val dockerRegistry: String? = null
override fun show(userId: String, projectId: String, artifactoryType: ArtifactoryType, path: String): FileDetail {
- val nodeDetail = bkRepoClient.getFileDetail(userId = userId,
+ val nodeDetail = bkRepoClient.getFileDetail(
+ userId = userId,
projectId = projectId,
repoName = BkRepoUtils.getRepoName(artifactoryType),
- path = path)
- ?: throw NotFoundException("file[$projectId|$artifactoryType|$path] not found")
+ path = path
+ ) ?: throw NotFoundException("file[$projectId|$artifactoryType|$path] not found")
return nodeDetail.toFileDetail()
}
@@ -267,11 +269,15 @@ class BkRepoArchiveFileServiceImpl @Autowired constructor(
page = page ?: 1,
pageSize = pageSize ?: DEFAULT_PAGE_SIZE,
totalPages = 1,
- records = nodeList.map { buildFileInfo(it) }
+ records = nodeList.map { buildFileInfo(it, getPipelineNames(nodeList), getBuildNums(nodeList)) }
)
}
- private fun buildFileInfo(it: QueryNodeInfo): FileInfo {
+ private fun buildFileInfo(
+ it: QueryNodeInfo,
+ pipelineNameMap: Map,
+ buildNumMap: Map
+ ): FileInfo {
return if (parseArtifactoryType(it.repoName) == ArtifactoryType.IMAGE) {
val (imageName, version) = DefaultPathUtils.getImageNameAndVersion(it.fullPath)
val packageVersion = bkRepoClient.getPackageVersionInfo(
@@ -297,18 +303,22 @@ class BkRepoArchiveFileServiceImpl @Autowired constructor(
)
}
} else {
- buildGenericFileInfo(it)
+ buildGenericFileInfo(it, pipelineNameMap, buildNumMap)
}
}
- private fun buildGenericFileInfo(nodeInfo: QueryNodeInfo): FileInfo {
+ private fun buildGenericFileInfo(
+ nodeInfo: QueryNodeInfo,
+ pipelineNameMap: Map,
+ buildNumMap: Map
+ ): FileInfo {
// 归档插件归档目录时,在目录多归档一个.bkci_pipeline文件, 记录归档目录的信息
return if (nodeInfo.name == ".bkci_pipeline") {
FileInfo(
name = nodeInfo.path.split("/").lastOrNull { it.isNotBlank() } ?: StringPool.ROOT,
- fullName = nodeInfo.name,
- path = nodeInfo.fullPath,
- fullPath = nodeInfo.fullPath,
+ fullName = nodeInfo.path,
+ path = nodeInfo.path,
+ fullPath = nodeInfo.path,
size = nodeInfo.size,
folder = nodeInfo.folder,
properties = nodeInfo.metadata?.map { m -> Property(m.key, m.value.toString()) },
@@ -319,7 +329,7 @@ class BkRepoArchiveFileServiceImpl @Autowired constructor(
} else {
FileInfo(
name = nodeInfo.name,
- fullName = nodeInfo.name,
+ fullName = getFullName(nodeInfo, pipelineNameMap, buildNumMap),
path = nodeInfo.fullPath,
fullPath = nodeInfo.fullPath,
size = nodeInfo.size,
@@ -332,6 +342,64 @@ class BkRepoArchiveFileServiceImpl @Autowired constructor(
}
}
+ private fun getPipelineNames(nodeList: List): Map {
+ val pipelineIds = mutableSetOf()
+ nodeList.filter { it.repoName == REPO_NAME_PIPELINE }.forEach {
+ val paths = it.fullPath.split("/")
+ if (paths.size < 3) {
+ logger.warn("illegal pipeline repo node fullPath: ${it.fullPath}")
+ return@forEach
+ }
+ pipelineIds.add(paths[1])
+ }
+ if (pipelineIds.size == 0) {
+ return emptyMap()
+ }
+ return client.get(ServicePipelineResource::class)
+ .getPipelineNameByIds(nodeList.first().projectId, pipelineIds).data.orEmpty()
+ }
+
+ private fun getBuildNums(nodeList: List): Map {
+ val buildIds = mutableSetOf()
+ nodeList.filter { it.repoName == REPO_NAME_PIPELINE }.forEach {
+ val paths = it.fullPath.split("/")
+ if (paths.size < 3) {
+ logger.warn("illegal pipeline repo node fullPath: ${it.fullPath}")
+ return@forEach
+ }
+ buildIds.add(paths[2])
+ }
+ if (buildIds.size == 0) {
+ return emptyMap()
+ }
+ return client.get(ServicePipelineResource::class)
+ .getBuildNoByBuildIds(buildIds, nodeList.first().projectId).data.orEmpty()
+ }
+
+ private fun getFullName(
+ nodeInfo: QueryNodeInfo,
+ pipelineNameMap: Map,
+ buildNumMap: Map
+ ): String {
+ if (nodeInfo.repoName != REPO_NAME_PIPELINE) {
+ return nodeInfo.fullPath
+ }
+ val paths = nodeInfo.fullPath.split("/")
+ if (paths.size < 3) {
+ logger.warn("illegal pipeline repo node fullPath: ${nodeInfo.fullPath}")
+ return nodeInfo.fullPath
+ }
+ val pipelineId = paths[1]
+ val buildId = paths[2]
+ val pipelineName = pipelineNameMap[pipelineId]
+ val buildNum = buildNumMap[buildId]
+ if (pipelineName.isNullOrEmpty() || buildNum.isNullOrEmpty()) {
+ logger.warn("illegal pipelineId or buildId: $pipelineId, $buildId")
+ return nodeInfo.fullPath
+ }
+ return nodeInfo.fullPath.replace("/$pipelineId/$buildId", "/$pipelineName/$buildNum")
+ }
+
override fun generateDestPath(
fileType: FileTypeEnum,
projectId: String,
@@ -341,14 +409,18 @@ class BkRepoArchiveFileServiceImpl @Autowired constructor(
): String {
val result = if (FileTypeEnum.BK_CUSTOM == fileType) {
if (customFilePath.isNullOrBlank() || customFilePath.contains("..")) {
- throw ErrorCodeException(errorCode = CommonMessageCode.PARAMETER_IS_NULL,
- params = arrayOf("customFilePath"))
+ throw ErrorCodeException(
+ errorCode = CommonMessageCode.PARAMETER_IS_NULL,
+ params = arrayOf("customFilePath")
+ )
}
customFilePath.removePrefix("/")
} else {
if (pipelineId.isNullOrBlank() || buildId.isNullOrBlank()) {
- throw ErrorCodeException(errorCode = CommonMessageCode.PARAMETER_IS_NULL,
- params = arrayOf("pipelineId or buildId"))
+ throw ErrorCodeException(
+ errorCode = CommonMessageCode.PARAMETER_IS_NULL,
+ params = arrayOf("pipelineId or buildId")
+ )
}
val filePath = if (customFilePath.isNullOrBlank()) {
""
@@ -383,7 +455,8 @@ class BkRepoArchiveFileServiceImpl @Autowired constructor(
projectId = projectId,
filePath = "/$filePath",
artifactoryType = artifactoryType,
- fileChannelType = fileChannelType, fullUrl = fullUrl)
+ fileChannelType = fileChannelType, fullUrl = fullUrl
+ )
}
override fun getFileDownloadUrls(
diff --git a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/migrate/OpAuthMigrateResource.kt b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/migrate/OpAuthMigrateResource.kt
index 47b9b4af4a5..868c8d533cc 100644
--- a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/migrate/OpAuthMigrateResource.kt
+++ b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/migrate/OpAuthMigrateResource.kt
@@ -40,6 +40,7 @@ import javax.ws.rs.POST
import javax.ws.rs.Path
import javax.ws.rs.PathParam
import javax.ws.rs.Produces
+import javax.ws.rs.QueryParam
import javax.ws.rs.core.MediaType
@Tag(name = "AUTH_MIGRATE", description = "权限-迁移")
@@ -137,7 +138,31 @@ interface OpAuthMigrateResource {
@Path("/autoRenewal")
@Operation(summary = "自动续期")
fun autoRenewal(
+ @Parameter(description = "小于该值才会被续期,若传空,则默认用户在用户组中的过期时间小于180天会被自动续期", required = true)
+ @QueryParam("validExpiredDay")
+ validExpiredDay: Int?,
@Parameter(description = "按条件迁移项目实体", required = true)
projectConditionDTO: ProjectConditionDTO
): Result
+
+ @POST
+ @Path("/migrateResourceAuthorization")
+ @Operation(summary = "迁移资源授权-按照项目")
+ fun migrateResourceAuthorization(
+ @Parameter(description = "迁移项目", required = true)
+ projectCodes: List
+ ): Result
+
+ @POST
+ @Path("/migrateAllResourceAuthorization")
+ @Operation(summary = "迁移资源授权-全量")
+ fun migrateAllResourceAuthorization(): Result
+
+ @POST
+ @Path("/fixResourceGroups")
+ @Operation(summary = "修复资源组")
+ fun fixResourceGroups(
+ @Parameter(description = "迁移项目", required = true)
+ projectCodes: List
+ ): Result
}
diff --git a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/service/ServiceAuthAuthorizationResource.kt b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/service/ServiceAuthAuthorizationResource.kt
new file mode 100644
index 00000000000..fef73e0e366
--- /dev/null
+++ b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/service/ServiceAuthAuthorizationResource.kt
@@ -0,0 +1,101 @@
+/*
+ * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
+ *
+ * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
+ *
+ * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
+ *
+ * A copy of the MIT License is included in this file.
+ *
+ *
+ * Terms of the MIT License:
+ * ---------------------------------------------------
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+ * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+ * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+package com.tencent.devops.auth.api.service
+
+import com.tencent.devops.common.api.model.SQLPage
+import com.tencent.devops.common.api.pojo.Result
+import com.tencent.devops.common.auth.api.pojo.ResourceAuthorizationConditionRequest
+import com.tencent.devops.common.auth.api.pojo.ResourceAuthorizationDTO
+import com.tencent.devops.common.auth.api.pojo.ResourceAuthorizationHandoverDTO
+import com.tencent.devops.common.auth.api.pojo.ResourceAuthorizationResponse
+import io.swagger.v3.oas.annotations.Operation
+import io.swagger.v3.oas.annotations.Parameter
+import io.swagger.v3.oas.annotations.tags.Tag
+import javax.ws.rs.Consumes
+import javax.ws.rs.GET
+import javax.ws.rs.POST
+import javax.ws.rs.PUT
+import javax.ws.rs.Path
+import javax.ws.rs.PathParam
+import javax.ws.rs.Produces
+import javax.ws.rs.core.MediaType
+
+@Tag(name = "SERVICE_RESOURCE_AUTHORIZATION", description = "权限-授权管理")
+@Path("/service/auth/authorization/{projectId}")
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+interface ServiceAuthAuthorizationResource {
+ @POST
+ @Path("/addResourceAuthorization")
+ @Operation(summary = "新增资源授权管理")
+ fun addResourceAuthorization(
+ @Parameter(description = "项目Id", required = true)
+ @PathParam("projectId")
+ projectId: String,
+ @Parameter(description = "资源授权实体", required = true)
+ resourceAuthorizationList: List
+ ): Result
+
+ @GET
+ @Path("/{resourceType}/{resourceCode}/getResourceAuthorization")
+ @Operation(summary = "获取资源授予记录")
+ fun getResourceAuthorization(
+ @Parameter(description = "项目Id", required = true)
+ @PathParam("projectId")
+ projectId: String,
+ @PathParam("resourceType")
+ @Parameter(description = "资源类型", required = true)
+ resourceType: String,
+ @PathParam("resourceCode")
+ @Parameter(description = "资源code", required = true)
+ resourceCode: String
+ ): Result
+
+ @POST
+ @Path("/listResourceAuthorization")
+ @Operation(summary = "获取资源授权管理")
+ fun listResourceAuthorization(
+ @Parameter(description = "项目ID", required = true)
+ @PathParam("projectId")
+ projectId: String,
+ @Parameter(description = "查询条件", required = true)
+ condition: ResourceAuthorizationConditionRequest
+ ): Result>
+
+ @PUT
+ @Path("/batchModifyHandoverFrom")
+ @Operation(summary = "批量重置资源授权人")
+ fun batchModifyHandoverFrom(
+ @Parameter(description = "项目Id", required = true)
+ @PathParam("projectId")
+ projectId: String,
+ @Parameter(description = "重置资源授权请求体", required = true)
+ resourceAuthorizationHandoverList: List
+ ): Result
+}
diff --git a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/sync/OpAuthResourceGroupSyncResource.kt b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/sync/OpAuthResourceGroupSyncResource.kt
new file mode 100644
index 00000000000..a907ba8fb87
--- /dev/null
+++ b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/sync/OpAuthResourceGroupSyncResource.kt
@@ -0,0 +1,108 @@
+/*
+ * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
+ *
+ * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
+ *
+ * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
+ *
+ * A copy of the MIT License is included in this file.
+ *
+ *
+ * Terms of the MIT License:
+ * ---------------------------------------------------
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+ * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+ * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+package com.tencent.devops.auth.api.sync
+
+import com.tencent.devops.common.api.pojo.Result
+import com.tencent.devops.common.auth.api.pojo.ProjectConditionDTO
+import io.swagger.v3.oas.annotations.Operation
+import io.swagger.v3.oas.annotations.Parameter
+import io.swagger.v3.oas.annotations.tags.Tag
+import javax.ws.rs.Consumes
+import javax.ws.rs.POST
+import javax.ws.rs.Path
+import javax.ws.rs.PathParam
+import javax.ws.rs.Produces
+import javax.ws.rs.core.MediaType
+
+@Tag(name = "AUTH_SYNC", description = "权限-同步IAM")
+@Path("/op/auth/resource/group/sync/")
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+interface OpAuthResourceGroupSyncResource {
+
+ @POST
+ @Path("/syncByCondition")
+ @Operation(summary = "按条件同步组和成员")
+ fun syncByCondition(
+ @Parameter(description = "按条件迁移项目实体", required = true)
+ projectConditionDTO: ProjectConditionDTO
+ ): Result
+
+ @POST
+ @Path("/batchSyncGroupAndMember")
+ @Operation(summary = "批量同步所有用户组和成员")
+ fun batchSyncGroupAndMember(
+ @Parameter(description = "项目ID列表", required = true)
+ projectIds: List
+ ): Result
+
+ @POST
+ @Path("/batchSyncProjectGroup")
+ @Operation(summary = "批量同步项目下用户组")
+ fun batchSyncProjectGroup(
+ @Parameter(description = "项目ID列表", required = true)
+ projectIds: List
+ ): Result
+
+ @POST
+ @Path("/batchSyncAllMember")
+ @Operation(summary = "同步所有成员")
+ fun batchSyncAllMember(
+ @Parameter(description = "项目ID列表", required = true)
+ projectIds: List
+ ): Result
+
+ @POST
+ @Path("/{projectId}/{resourceType}/{resourceCode}/syncResourceMember")
+ @Operation(summary = "同步资源下用户组")
+ fun syncResourceMember(
+ @Parameter(description = "项目ID", required = true)
+ @PathParam(value = "projectId")
+ projectId: String,
+ @Parameter(description = "资源类型", required = true)
+ @PathParam(value = "resourceType")
+ resourceType: String,
+ @Parameter(description = "资源ID", required = true)
+ @PathParam(value = "resourceCode")
+ resourceCode: String
+ ): Result
+
+ @POST
+ @Path("/{projectId}/fixResourceGroupMember")
+ @Operation(summary = "修复用户组成员表")
+ fun fixResourceGroupMember(
+ @Parameter(description = "项目ID", required = true)
+ @PathParam(value = "projectId")
+ projectId: String
+ ): Result
+
+ @POST
+ @Path("/syncIamGroupMembersOfApply")
+ @Operation(summary = "同步iam组成员--用户申请加入")
+ fun syncIamGroupMembersOfApply(): Result
+}
diff --git a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/user/UserAuthAuthorizationResource.kt b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/user/UserAuthAuthorizationResource.kt
new file mode 100644
index 00000000000..0f672983e72
--- /dev/null
+++ b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/api/user/UserAuthAuthorizationResource.kt
@@ -0,0 +1,141 @@
+/*
+ * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available.
+ *
+ * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
+ *
+ * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license.
+ *
+ * A copy of the MIT License is included in this file.
+ *
+ *
+ * Terms of the MIT License:
+ * ---------------------------------------------------
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+ * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+ * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+package com.tencent.devops.auth.api.user
+
+import com.tencent.devops.auth.pojo.vo.ResourceTypeInfoVo
+import com.tencent.devops.common.api.auth.AUTH_HEADER_USER_ID
+import com.tencent.devops.common.api.auth.AUTH_HEADER_USER_ID_DEFAULT_VALUE
+import com.tencent.devops.common.api.model.SQLPage
+import com.tencent.devops.common.api.pojo.Result
+import com.tencent.devops.common.auth.api.pojo.ResetAllResourceAuthorizationReq
+import com.tencent.devops.common.auth.api.pojo.ResourceAuthorizationConditionRequest
+import com.tencent.devops.common.auth.api.pojo.ResourceAuthorizationHandoverConditionRequest
+import com.tencent.devops.common.auth.api.pojo.ResourceAuthorizationHandoverDTO
+import com.tencent.devops.common.auth.api.pojo.ResourceAuthorizationResponse
+import com.tencent.devops.common.auth.enums.ResourceAuthorizationHandoverStatus
+import io.swagger.v3.oas.annotations.Operation
+import io.swagger.v3.oas.annotations.Parameter
+import io.swagger.v3.oas.annotations.tags.Tag
+import javax.ws.rs.Consumes
+import javax.ws.rs.GET
+import javax.ws.rs.HeaderParam
+import javax.ws.rs.POST
+import javax.ws.rs.Path
+import javax.ws.rs.PathParam
+import javax.ws.rs.Produces
+import javax.ws.rs.QueryParam
+import javax.ws.rs.core.MediaType
+
+@Tag(name = "USER_RESOURCE_AUTHORIZATION", description = "用户-权限-授权管理")
+@Path("/user/auth/authorization/")
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+interface UserAuthAuthorizationResource {
+
+ @POST
+ @Path("/{projectId}/listResourceAuthorization")
+ @Operation(summary = "根据条件获取资源授权管理")
+ fun listResourceAuthorization(
+ @Parameter(description = "用户名", required = true)
+ @HeaderParam(AUTH_HEADER_USER_ID)
+ userId: String,
+ @Parameter(description = "项目ID", required = true)
+ @PathParam("projectId")
+ projectId: String,
+ @Parameter(description = "查询条件", required = true)
+ condition: ResourceAuthorizationConditionRequest
+ ): Result>
+
+ @GET
+ @Path("/{projectId}/{resourceType}/getResourceAuthorization")
+ @Operation(summary = "获取资源授权管理")
+ fun getResourceAuthorization(
+ @Parameter(description = "用户名", required = true)
+ @HeaderParam(AUTH_HEADER_USER_ID)
+ userId: String,
+ @Parameter(description = "项目ID", required = true)
+ @PathParam("projectId")
+ projectId: String,
+ @Parameter(description = "资源类型", required = true)
+ @PathParam("resourceType")
+ resourceType: String,
+ @Parameter(description = "资源code", required = true)
+ @QueryParam("resourceCode")
+ resourceCode: String
+ ): Result
+
+ @GET
+ @Path("/{projectId}/{resourceType}/checkAuthorizationWhenRemoveGroupMember")
+ @Operation(summary = "当移出用户组时做授权检查")
+ fun checkAuthorizationWhenRemoveGroupMember(
+ @Parameter(description = "用户名", required = true)
+ @HeaderParam(AUTH_HEADER_USER_ID)
+ userId: String,
+ @Parameter(description = "项目ID", required = true)
+ @PathParam("projectId")
+ projectId: String,
+ @Parameter(description = "资源类型", required = true)
+ @PathParam("resourceType")
+ resourceType: String,
+ @Parameter(description = "资源code", required = true)
+ @QueryParam("resourceCode")
+ resourceCode: String,
+ @Parameter(description = "成员ID", required = true)
+ @QueryParam("memberId")
+ memberId: String
+ ): Result
+
+ @POST
+ @Path("/{projectId}/resetResourceAuthorization")
+ @Operation(summary = "重置资源授权管理")
+ fun resetResourceAuthorization(
+ @Parameter(description = "用户ID", required = true, example = AUTH_HEADER_USER_ID_DEFAULT_VALUE)
+ @HeaderParam(AUTH_HEADER_USER_ID)
+ userId: String,
+ @Parameter(description = "项目ID", required = true)
+ @PathParam("projectId")
+ projectId: String,
+ @Parameter(description = "资源授权交接条件实体", required = true)
+ condition: ResourceAuthorizationHandoverConditionRequest
+ ): Result