From c8637f341891168273a086a6a04878e948ffb32e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Wed, 29 Apr 2026 18:42:20 +0800 Subject: [PATCH] ci: notify after onprem deployment succeeds Co-Authored-By: Claude Opus 4.6 (1M context) --- .circleci/config.yml | 7 +++++++ scripts/ci/notify_feishu.sh | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bc1eed2..7ba130c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 <> \ + --version-tag "$IMAGE_TAG" + workflows: backend_build_and_push: jobs: diff --git a/scripts/ci/notify_feishu.sh b/scripts/ci/notify_feishu.sh index b6c28ef..0785693 100644 --- a/scripts/ci/notify_feishu.sh +++ b/scripts/ci/notify_feishu.sh @@ -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