ci: notify after image push succeeds
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c8637f3418
commit
a0ef1728cf
@ -28,6 +28,13 @@ jobs:
|
||||
region: AWS_REGION
|
||||
repo: <<parameters.repo>>
|
||||
tag: '<<parameters.docker-tag>>${CIRCLE_SHA1}'
|
||||
- run:
|
||||
name: Send image push Lark notification
|
||||
command: |
|
||||
bash scripts/ci/notify_feishu.sh \
|
||||
--event image_push \
|
||||
--image-repo "$AWS_ECR_ACCOUNT_URL/<<parameters.repo>>" \
|
||||
--version-tag "<<parameters.docker-tag>>${CIRCLE_SHA1}"
|
||||
deploy:
|
||||
machine:
|
||||
image: ubuntu-2204:current
|
||||
|
||||
@ -205,7 +205,7 @@ build_deploy_payload() {
|
||||
EOF
|
||||
}
|
||||
|
||||
build_docker_hub_payload() {
|
||||
build_image_push_payload() {
|
||||
local color="$1"
|
||||
local short_sha="${CIRCLE_SHA1:0:8}"
|
||||
local message
|
||||
@ -235,7 +235,7 @@ build_docker_hub_payload() {
|
||||
"template": "${color}",
|
||||
"title": {
|
||||
"tag": "plain_text",
|
||||
"content": "catalog-agent Docker Hub 推送成功"
|
||||
"content": "catalog-agent 镜像推送成功"
|
||||
}
|
||||
},
|
||||
"elements": [
|
||||
@ -326,9 +326,16 @@ case "$EVENT" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
image_push)
|
||||
case "$CIRCLE_BRANCH" in
|
||||
dev|staging|prod|onprem-dev|onprem-release)
|
||||
send_payload "$(build_image_push_payload "$(header_color)")"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
docker_hub)
|
||||
if [[ "$CIRCLE_BRANCH" == "onprem-release" && "$IMAGE_TAG" == "latest" ]]; then
|
||||
send_payload "$(build_docker_hub_payload "$(header_color)")"
|
||||
send_payload "$(build_image_push_payload "$(header_color)")"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user