feat(server): 装配 notices(路由替换空壳+reward/pay 注入)+ 发版联动插 version 公告
main.go 挂载 notices.Store/Handler:注入 rewardSvc/payWebhook 到账通知钩子, /v1/notices 路由由 accountAPI 空壳换成真实 List/MarkRead,删除 account.go 的 TODO 空壳方法。补齐 pangolin-nodectl 到编译/部署产物链 (compile-backend.sh + deploy-server.sh),release-client.sh 在 version.yaml 推送成功后追加一步用 nodectl 插入 version 类型站内公告 (失败不阻断发版)。
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# deploy-server.sh <tag> — deploy the pangolin control-plane binaries
|
||||
# (pangolin-server / pangolin-agent / pangolin-migrate) to pangolin1, in the
|
||||
# exact manual sequence used for F3/F4: stop → wal checkpoint → backup db →
|
||||
# migrate (rollback db + restart old binary on failure) → swap binaries →
|
||||
# start → healthcheck. Assumes compile-backend.sh has already produced
|
||||
# server/out/{pangolin-server,pangolin-agent,pangolin-migrate}.
|
||||
# (pangolin-server / pangolin-agent / pangolin-migrate / pangolin-nodectl) to
|
||||
# pangolin1, in the exact manual sequence used for F3/F4: stop → wal
|
||||
# checkpoint → backup db → migrate (rollback db + restart old binary on
|
||||
# failure) → swap binaries → start → healthcheck. Assumes compile-backend.sh
|
||||
# has already produced
|
||||
# server/out/{pangolin-server,pangolin-agent,pangolin-migrate,pangolin-nodectl}.
|
||||
#
|
||||
# Usage: scripts/ci/deploy-server.sh <tag> (e.g. server-v1.2.3)
|
||||
# Requires env: DEPLOY_SSH_KEY (see lib-ssh.sh).
|
||||
@@ -36,7 +37,7 @@ SCP="scp -i ${SSH_KEY_FILE} -P ${DEPLOY_PORT} -o StrictHostKeyChecking=accept-ne
|
||||
|
||||
echo "==> deploy-server: tag=${TAG} host=${DEPLOY_HOST}"
|
||||
echo "==> deploy-server: uploading binaries to ${DEPLOY_HOST}:/tmp/"
|
||||
$SCP server/out/pangolin-server server/out/pangolin-agent server/out/pangolin-migrate "root@${DEPLOY_HOST}:/tmp/"
|
||||
$SCP server/out/pangolin-server server/out/pangolin-agent server/out/pangolin-migrate server/out/pangolin-nodectl "root@${DEPLOY_HOST}:/tmp/"
|
||||
|
||||
$SSH "root@${DEPLOY_HOST}" "bash -s" <<REMOTE
|
||||
set -euo pipefail
|
||||
@@ -50,6 +51,7 @@ cp -p "$BIN/pangolin-server" "$BIN/pangolin-server.bak-$TAG" || true
|
||||
install -m755 /tmp/pangolin-server "$BIN/pangolin-server"
|
||||
install -m755 /tmp/pangolin-agent "$BIN/pangolin-agent"
|
||||
install -m755 /tmp/pangolin-migrate "$BIN/pangolin-migrate"
|
||||
install -m755 /tmp/pangolin-nodectl "$BIN/pangolin-nodectl"
|
||||
systemctl start pangolin-server
|
||||
systemctl is-active pangolin-server
|
||||
REMOTE
|
||||
|
||||
Reference in New Issue
Block a user