ci: notify after onprem deployment succeeds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
朱潮 2026-04-29 18:42:20 +08:00
parent bfac221197
commit c8637f3418
2 changed files with 21 additions and 1 deletions

View File

@ -142,6 +142,13 @@ jobs:
docker compose up catalog-agent -d
REMOTE
bash scripts/ci/notify_feishu.sh \
--event deploy \
--service-name catalog-agent \
--namespace onprem-release \
--image-repo <<parameters.repo>> \
--version-tag "$IMAGE_TAG"
workflows:
backend_build_and_push:
jobs:

View File

@ -84,6 +84,7 @@ build_deploy_payload() {
local job
local service_name
local namespace
local image
local commit
local full_sha
@ -93,6 +94,11 @@ build_deploy_payload() {
job=$(printf '%s' "$CIRCLE_JOB" | escape_json)
service_name=$(printf '%s' "$SERVICE_NAME" | escape_json)
namespace=$(printf '%s' "$NAMESPACE" | escape_json)
if [[ -n "$IMAGE_REPO" && -n "$VERSION_TAG" ]]; then
image=$(printf '%s' "$IMAGE_REPO:$VERSION_TAG" | escape_json)
else
image="-"
fi
commit=$(printf '%s' "$short_sha" | escape_json)
full_sha=$(printf '%s' "$CIRCLE_SHA1" | escape_json)
@ -149,6 +155,13 @@ build_deploy_payload() {
"content": "**命名空间**\n${namespace}"
}
},
{
"is_short": true,
"text": {
"tag": "lark_md",
"content": "**镜像**\n${image}"
}
},
{
"is_short": true,
"text": {
@ -308,7 +321,7 @@ send_payload() {
case "$EVENT" in
deploy)
case "$CIRCLE_BRANCH" in
dev|staging|prod|onprem-dev)
dev|staging|prod|onprem-dev|onprem-release)
send_payload "$(build_deploy_payload "$(header_color)")"
;;
esac