feat: 1、流水线总开关配置 2、删除p0p1p2级别阻断
All checks were successful
Redis序列化结构检查 / redis-schema-check (push) Has been skipped
All checks were successful
Redis序列化结构检查 / redis-schema-check (push) Has been skipped
This commit is contained in:
@@ -5,27 +5,24 @@
|
||||
# - 本配置文件为业务覆盖配置,会与 jar 内 default-config.yaml 深度合并
|
||||
# - 未声明的项沿用工具内置默认值(忽略规则、检测模式等)
|
||||
|
||||
# 运行模式 notify-仅通知,不阻断流水线 block-按block_severities阻断流水线(exit 1)
|
||||
mode: notify
|
||||
# 总开关 true-执行检测 false-跳过检测
|
||||
enabled: true
|
||||
|
||||
# block 模式下触发阻断的严重级别(P0/P1/P2 全部阻断)
|
||||
block_severities:
|
||||
- P0
|
||||
- P1
|
||||
- P2
|
||||
# 运行模式 notify-仅通知,不阻断流水线 block-检测到结构变更即阻断流水线(exit 1)
|
||||
mode: notify
|
||||
|
||||
# 通知配置
|
||||
notify:
|
||||
enabled: true
|
||||
webhook_url: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=fa14f0b3-e01a-40f6-96bd-e18beb94e85e
|
||||
notify_on_clean: false
|
||||
title_prefix: "【Redis数据结构变更】"
|
||||
title_prefix: "【序列化结构变更】"
|
||||
|
||||
# 观察期:先只扫描 jnpf-tenant 模块,稳定后改为 include_modules: []
|
||||
include_modules:
|
||||
- jnpf-tenant
|
||||
|
||||
# 人工补充映射(自动推断不准时使用)
|
||||
# 手动补充映射(自动推断不准时使用)
|
||||
manual_mappings:
|
||||
- id: tenant-db-content
|
||||
writer_method: "jnpf.util.TenantDbContentCacheHelper#cacheSuccess"
|
||||
@@ -33,5 +30,5 @@ manual_mappings:
|
||||
value_type: "jnpf.util.TenantDbContentCacheHelper.CacheEnvelope"
|
||||
description: "租户库信息缓存"
|
||||
|
||||
# 已知误报抑制(按需添加)
|
||||
# 误报忽略(按需添加)
|
||||
suppressions: []
|
||||
|
||||
@@ -30,9 +30,19 @@ jobs:
|
||||
echo "错误: 缺少 .gitea/config/redis-schema-check-config.yaml"
|
||||
exit 1
|
||||
fi
|
||||
# 顶层总开关 enabled: false 时跳过后续步骤(与 notify.enabled 区分,仅匹配行首)
|
||||
if grep -Eq '^enabled:[[:space:]]*false([[:space:]]|#|$)' .gitea/config/redis-schema-check-config.yaml; then
|
||||
echo "总开关 enabled=false,跳过 Redis 结构检查"
|
||||
touch /tmp/redis-schema-check.skip
|
||||
fi
|
||||
|
||||
- name: 从 Nexus 私库下载 redis-schema-checker
|
||||
run: |
|
||||
if [ -f /tmp/redis-schema-check.skip ]; then
|
||||
echo "总开关已关闭,跳过下载"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
GROUP_PATH="com/codechecker/redis-schema-checker"
|
||||
JAR_NAME="redis-schema-checker-${REDIS_SCHEMA_CHECKER_VERSION}.jar"
|
||||
JAR_URL="${REDIS_SCHEMA_CHECKER_REPO_URL}/${GROUP_PATH}/${REDIS_SCHEMA_CHECKER_VERSION}/${JAR_NAME}"
|
||||
@@ -57,10 +67,19 @@ jobs:
|
||||
|
||||
- name: 验证 JDK
|
||||
run: |
|
||||
if [ -f /tmp/redis-schema-check.skip ]; then
|
||||
echo "总开关已关闭,跳过"
|
||||
exit 0
|
||||
fi
|
||||
echo "Java: $(java -version 2>&1 | head -1)"
|
||||
|
||||
- name: 执行 Redis 序列化结构检测
|
||||
run: |
|
||||
if [ -f /tmp/redis-schema-check.skip ]; then
|
||||
echo "总开关已关闭,跳过检测"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
OLD_SHA=$(git rev-parse HEAD~1 2>/dev/null || echo "")
|
||||
if [ -z "$OLD_SHA" ]; then
|
||||
echo "首次提交,跳过检测"
|
||||
|
||||
Reference in New Issue
Block a user