kind: pipeline type: ssh name: ssh-linux-test-hir-publish platform: os: linux arch: amd64 clone: disable: true server: host: 106.14.89.110 user: root password: from_secret: test_ssh_pwd steps: - name: publish-test-hir 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 # 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 < 项目:${DRONE_REPO_NAME} > 分支:${DRONE_BRANCH} > 构建号:${DRONE_BUILD_NUMBER} > 状态:${STATUS}" } } 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: - Test_HIR_Net8