测试7
parent
de500f28cd
commit
cb712c181a
|
|
@ -20,34 +20,15 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- bash /opt/1panel/xc-deploy-new/Test_HIR/devops-publish/test-branch-to-test.sh || echo "publish failed"
|
- bash /opt/1panel/xc-deploy-new/Test_HIR/devops-publish/test-branch-to-test.sh || echo "publish failed"
|
||||||
|
|
||||||
- name: notify-wecom
|
- name: notify-wecom
|
||||||
commands:
|
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"
|
||||||
STATUS="$DRONE_BUILD_STATUS"
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
|
||||||
if [ "$STATUS" = "success" ]; then
|
|
||||||
MSG="🟢 Test_HIR 发布成功"
|
|
||||||
COLOR="info"
|
|
||||||
else
|
|
||||||
MSG="🔴 Test_HIR 发布失败"
|
|
||||||
COLOR="warning"
|
|
||||||
fi
|
|
||||||
|
|
||||||
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 @- <<EOF
|
|
||||||
{
|
|
||||||
"msgtype": "markdown",
|
|
||||||
"markdown": {
|
|
||||||
"content": "${MSG}\n> 项目:${DRONE_REPO_NAME}\n> 分支:${DRONE_BRANCH}\n> 构建号:${DRONE_BUILD_NUMBER}\n> 状态:<font color=\"${COLOR}\">${STATUS}</font>"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- success
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- Test_HIR_Net8
|
- Test_HIR_Net8
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue