Skip to content

Commit

Permalink
Merge branch 'master' into issue-10927
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/resources/UserAuthResourceMemberResourceImpl.kt
  • Loading branch information
fcfang123 committed Sep 11, 2024
2 parents 23387d6 + e9fc322 commit e477ccb
Show file tree
Hide file tree
Showing 115 changed files with 1,824 additions and 432 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
export NODE_OPTIONS=--openssl-legacy-provider
yarn public
working-directory: src/frontend
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ inputs.upload == 'true' }}
with:
name: frontend
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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: ./
Expand Down
223 changes: 223 additions & 0 deletions CHANGELOG/CHANGELOG-3.0.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CHANGELOG/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
78 changes: 78 additions & 0 deletions docs/overview/db/devops_ci_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | 迁移-鉴权记录表 |
Expand Down Expand Up @@ -375,6 +379,25 @@
| 11 | CREATE_USER | varchar | 64 | 0 | N | N | | 创建者 |
| 12 | UPDATE_USER | varchar | 64 | 0 | N | N | | 修改人 |

**表名:** <a>T_AUTH_RESOURCE_AUTHORIZATION</a>

**说明:** 资源授权管理表

**数据列:**

| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 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 | 更新时间 |

**表名:** <a>T_AUTH_RESOURCE_GROUP</a>

**说明:** 资源关联用户组表
Expand All @@ -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 |

**表名:** <a>T_AUTH_RESOURCE_GROUP_APPLY</a>

**说明:** 用户组申请记录表

**数据列:**

| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 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 | 更新时间 |

**表名:** <a>T_AUTH_RESOURCE_GROUP_CONFIG</a>

Expand All @@ -416,6 +458,42 @@
| 10 | CREATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 创建时间 |
| 11 | UPDATE_TIME | datetime | 19 | 0 | N | N | CURRENT_TIMESTAMP | 更新时间 |

**表名:** <a>T_AUTH_RESOURCE_GROUP_MEMBER</a>

**说明:** 资源组成员

**数据列:**

| 序号 | 名称 | 数据类型 | 长度 | 小数位 | 允许空值 | 主键 | 默认值 | 说明 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 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 | 更新时间 |

**表名:** <a>T_AUTH_RESOURCE_SYNC</a>

**说明:** 同步 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 | 更新时间 |

**表名:** <a>T_AUTH_RESOURCE_TYPE</a>

**说明:** 权限资源类型表
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/artifactory/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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") }}
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/auth/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/bklog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]'
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/dispatch/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/environment/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/log/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/metrics/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/misc/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/notify/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/openapi/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/process/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/project/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/quality/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/repository/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/store/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/stream/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/ticket/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/core/ci/templates/websocket/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit e477ccb

Please sign in to comment.