ci(cd): expose build and post-deploy stages
This commit is contained in:
@@ -329,6 +329,21 @@ jobs:
|
||||
echo "message=$(git log -1 --pretty=%s | head -c 50)" >> $GITHUB_OUTPUT
|
||||
echo "start_time=$(date +%s)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Notify Build Deploy Start
|
||||
run: |
|
||||
ACTOR="${{ github.actor }}"
|
||||
if AWOOI_CICD_STATUS=running \
|
||||
AWOOI_CICD_STAGE=build-and-deploy \
|
||||
AWOOI_CICD_JOB_NAME="AWOOOI 建置部署開始" \
|
||||
AWOOI_CICD_COMMIT_SHA="${GITHUB_SHA}" \
|
||||
AWOOI_CICD_TRIGGERED_BY="${ACTOR}" \
|
||||
AWOOI_CICD_SUMMARY="${{ steps.commit.outputs.message }}" \
|
||||
scripts/ci/notify-awoooi-cicd.sh; then
|
||||
echo "✅ CI/CD build-deploy start notification mirrored through AWOOI API"
|
||||
else
|
||||
echo "⚠️ CI/CD build-deploy start notification failed (non-fatal)"
|
||||
fi
|
||||
|
||||
- name: Login to Harbor
|
||||
run: |
|
||||
echo "${{ secrets.HARBOR_PASSWORD }}" | \
|
||||
@@ -1053,6 +1068,24 @@ jobs:
|
||||
fi
|
||||
exit "$ROLLOUT_EXIT"
|
||||
|
||||
- name: Notify Build Deploy Success
|
||||
run: |
|
||||
END_TIME=$(date +%s)
|
||||
DURATION=$((END_TIME - ${{ steps.commit.outputs.start_time }}))
|
||||
ACTOR="${{ github.actor }}"
|
||||
if AWOOI_CICD_STATUS=success \
|
||||
AWOOI_CICD_STAGE=build-and-deploy \
|
||||
AWOOI_CICD_JOB_NAME="AWOOOI 建置部署完成" \
|
||||
AWOOI_CICD_COMMIT_SHA="${GITHUB_SHA}" \
|
||||
AWOOI_CICD_TRIGGERED_BY="${ACTOR}" \
|
||||
AWOOI_CICD_DURATION_SECONDS="${DURATION}" \
|
||||
AWOOI_CICD_SUMMARY="Image build/push + ArgoCD rollout + API health passed" \
|
||||
scripts/ci/notify-awoooi-cicd.sh; then
|
||||
echo "✅ CI/CD build-deploy success notification mirrored through AWOOI API"
|
||||
else
|
||||
echo "⚠️ CI/CD build-deploy success notification failed (non-fatal)"
|
||||
fi
|
||||
|
||||
# 2026-04-09 Claude Sonnet 4.6: Sprint 5.2 — 同步 ops 腳本到 188 (ollama user)
|
||||
# 188 deploy key is rotated and must not be read by this disabled step.
|
||||
# 腳本: docker-health-monitor.sh + pg-backup.sh + notify-awoooi-ops.sh
|
||||
@@ -1115,6 +1148,21 @@ jobs:
|
||||
echo "message=$(git log -1 --pretty=%s | head -c 50)" >> $GITHUB_OUTPUT
|
||||
echo "start_time=$(date +%s)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Notify Post Deploy Checks Start
|
||||
run: |
|
||||
ACTOR="${{ github.actor }}"
|
||||
if AWOOI_CICD_STATUS=running \
|
||||
AWOOI_CICD_STAGE=post-deploy-checks \
|
||||
AWOOI_CICD_JOB_NAME="AWOOOI 部署後驗證開始" \
|
||||
AWOOI_CICD_COMMIT_SHA="${GITHUB_SHA}" \
|
||||
AWOOI_CICD_TRIGGERED_BY="${ACTOR}" \
|
||||
AWOOI_CICD_SUMMARY="Alert Chain / Source Link / Monitoring / Smoke gates started" \
|
||||
scripts/ci/notify-awoooi-cicd.sh; then
|
||||
echo "✅ CI/CD post-deploy start notification mirrored through AWOOI API"
|
||||
else
|
||||
echo "⚠️ CI/CD post-deploy start notification failed (non-fatal)"
|
||||
fi
|
||||
|
||||
# Phase O-4.5 2026-04-02: Alert Chain Smoke Test (Wave A.6 + B.2 ADR-037)
|
||||
# 驗證告警鏈路 E2E: API Health + Webhook + OTEL + Event Exporter
|
||||
# 2026-04-05 Claude Code cache優化: 使用 /opt/api-venv (已有 requests),移除 Setup Python Tools step
|
||||
|
||||
@@ -1071,8 +1071,10 @@
|
||||
"success": "Success"
|
||||
},
|
||||
"stage": {
|
||||
"buildDeploy": "Build and deploy",
|
||||
"codeReview": "Code review",
|
||||
"postDeploy": "Post deploy",
|
||||
"postDeployChecks": "Post deploy checks",
|
||||
"rolloutRisk": "Rollout risk recovered",
|
||||
"tests": "Tests"
|
||||
}
|
||||
|
||||
@@ -1072,8 +1072,10 @@
|
||||
"success": "成功"
|
||||
},
|
||||
"stage": {
|
||||
"buildDeploy": "建置與部署",
|
||||
"codeReview": "程式碼審查",
|
||||
"postDeploy": "部署後驗證",
|
||||
"postDeployChecks": "部署後驗證",
|
||||
"rolloutRisk": "部署風險已恢復",
|
||||
"tests": "測試"
|
||||
}
|
||||
|
||||
@@ -77,8 +77,10 @@ const CICD_STATUS_LABEL_KEYS: Record<string, string> = {
|
||||
}
|
||||
|
||||
const CICD_STAGE_LABEL_KEYS: Record<string, string> = {
|
||||
'build-and-deploy': 'cicd.stage.buildDeploy',
|
||||
'code-review': 'cicd.stage.codeReview',
|
||||
'post-deploy': 'cicd.stage.postDeploy',
|
||||
'post-deploy-checks': 'cicd.stage.postDeployChecks',
|
||||
'rollout-risk': 'cicd.stage.rolloutRisk',
|
||||
tests: 'cicd.stage.tests',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user