测试打包通知2
parent
5cab834978
commit
e2d19c5738
|
|
@ -5,7 +5,7 @@ name: ssh-linux-test-hir-publish
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
disable: true
|
disable: true
|
||||||
|
|
||||||
|
|
@ -16,26 +16,26 @@ server:
|
||||||
from_secret: test_ssh_pwd
|
from_secret: test_ssh_pwd
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: publish-test-hir
|
- name: publish-test-hir
|
||||||
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:
|
||||||
- |
|
- |
|
||||||
STATUS=$DRONE_BUILD_STATUS
|
STATUS="$DRONE_BUILD_STATUS"
|
||||||
|
|
||||||
if [ "$STATUS" = "success" ]; then
|
if [ "$STATUS" = "success" ]; then
|
||||||
MSG="🟢 Test_HIR 发布成功"
|
MSG="🟢 Test_HIR 发布成功"
|
||||||
COLOR="info"
|
COLOR="info"
|
||||||
else
|
else
|
||||||
MSG="🔴 Test_HIR 发布失败"
|
MSG="🔴 Test_HIR 发布失败"
|
||||||
COLOR="warning"
|
COLOR="warning"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -X POST "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=cdd97aab-d256-4f07-9145-a0a2b1555322" \
|
curl -s -X POST "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=cdd97aab-d256-4f07-9145-a0a2b1555322" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d @- <<EOF
|
--data-binary @- <<EOF
|
||||||
{
|
{
|
||||||
"msgtype": "markdown",
|
"msgtype": "markdown",
|
||||||
"markdown": {
|
"markdown": {
|
||||||
|
|
@ -47,8 +47,10 @@ steps:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
when:
|
when:
|
||||||
status: [ success, failure ]
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue