Compare commits

..

2 Commits

Author SHA1 Message Date
hang 7452eae07f 合并冲突 2026-02-05 13:57:50 +08:00
hang cb712c181a 测试7 2026-02-05 13:57:20 +08:00
1 changed files with 7 additions and 40 deletions

View File

@ -20,47 +20,14 @@ steps:
commands:
- bash /opt/1panel/xc-deploy-new/Test_HIR/devops-publish/test-branch-to-test.sh || echo "publish failed"
- name: notify-wecom
commands:
- |
#!/bin/bash
set -e
- name: notify-wecom
commands:
- bash /opt/1panel/xc-deploy-new/devops-center/notify-wecom.sh "$DRONE_BUILD_STATUS" "$DRONE_REPO_NAME" "$DRONE_BRANCH" "$DRONE_BUILD_NUMBER" "cdd97aab-d256-4f07-9145-a0a2b1555322"
when:
status:
- success
- failure
# Drone CI 构建状态
STATUS="$DRONE_BUILD_STATUS"
if [ "$STATUS" = "success" ]; then
MSG="🟢 Test_HIR 发布成功"
COLOR="info"
else
MSG="🔴 Test_HIR 发布失败"
COLOR="warning"
fi
# 构建 JSON 数据
JSON_DATA=$(cat <<EOF
{
"msgtype": "markdown",
"markdown": {
"content": "${MSG}
> 项目:${DRONE_REPO_NAME}
> 分支:${DRONE_BRANCH}
> 构建号:${DRONE_BUILD_NUMBER}
> 状态:<font color=\"${COLOR}\">${STATUS}</font>"
}
}
EOF
)
# 发送企业微信通知
curl -s -X POST "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=cdd97aab-d256-4f07-9145-a0a2b1555322" \
-H "Content-Type: application/json" \
--data-binary "$JSON_DATA"
when:
status:
- success
- failure
trigger:
branch: