Files
wecom-ai-assistant/scripts/quick-verify.ps1
bujie9527 91c3d75557
Some checks are pending
Build and Deploy / test-backend (push) Waiting to run
Build and Deploy / build-backend (push) Blocked by required conditions
Build and Deploy / build-admin (push) Waiting to run
Deploy to Production / build-backend (push) Waiting to run
Deploy to Production / deploy (push) Blocked by required conditions
Add build verification scripts and documentation
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 23:04:43 +08:00

43 lines
1.3 KiB
PowerShell

# 快速验证构建结果
$Registry = "registry.667788.cool"
$Tag = "latest"
Write-Host "=== 快速验证构建结果 ===" -ForegroundColor Cyan
Write-Host ""
$images = @(
"$Registry/wecom-backend:$Tag",
"$Registry/wecom-admin:$Tag",
"$Registry/wecom-nginx:$Tag"
)
$successCount = 0
foreach ($image in $images) {
$result = docker images $image --format "{{.Repository}}:{{.Tag}}" 2>$null
if ($result -and $result -eq $image) {
Write-Host "$image" -ForegroundColor Green
$successCount++
} else {
Write-Host "$image (未找到)" -ForegroundColor Red
}
}
Write-Host ""
Write-Host "结果: $successCount/3 个镜像已构建" -ForegroundColor $(if ($successCount -eq 3) { "Green" } else { "Yellow" })
Write-Host ""
if ($successCount -eq 3) {
Write-Host "✓ 所有镜像构建成功!" -ForegroundColor Green
Write-Host ""
Write-Host "验证推送:" -ForegroundColor Yellow
Write-Host " docker login $Registry" -ForegroundColor Gray
Write-Host " docker pull $Registry/wecom-backend:$Tag" -ForegroundColor Gray
} else {
Write-Host "⚠ 部分镜像未构建,请检查构建日志" -ForegroundColor Yellow
Write-Host ""
Write-Host "重新构建:" -ForegroundColor Yellow
Write-Host " .\scripts\build_and_push.ps1" -ForegroundColor Gray
}