Files
inquiry_robot/deploy/_remote_post_admin_cut.ps1
T

28 lines
1.3 KiB
PowerShell

# 切后台后验收:静态是否为 Jeecg、API 是否走 8180
$ErrorActionPreference = 'Continue'
Write-Output '=== admin index sniff ==='
$idx = 'E:\wwwroot\admin\current\index.html'
if (Test-Path $idx) {
Get-Content $idx -TotalCount 30
}
Write-Output '=== app config ==='
$cfg = Get-ChildItem 'E:\wwwroot\admin\current' -Filter '_app.config.js' -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
if ($cfg) {
Select-String -Path $cfg.FullName -Pattern 'VITE_GLOB|jeecgboot|8080|8180|ai.ytd' | ForEach-Object { $_.Line.Substring(0, [Math]::Min(200, $_.Line.Length)) }
}
Write-Output '=== nginx targets ==='
Select-String -Path 'C:\nginx-1.18.0\myconf\ai.conf' -Pattern 'proxy_pass|root ' | ForEach-Object { $_.Line.Trim() }
Write-Output '=== ports ==='
foreach ($x in 8080,8180,8910) {
$c = Get-NetTCPConnection -LocalPort $x -State Listen -EA SilentlyContinue | Select-Object -First 1
if ($c) { "$x LISTEN" } else { "$x down" }
}
Write-Output '=== local proxy smoke ==='
try {
$r = Invoke-WebRequest -Uri 'http://127.0.0.1:8180/jeecgboot/sys/randomImage/aftercut' -UseBasicParsing -TimeoutSec 8
"8180 ok $($r.StatusCode)"
} catch { "8180 fail" }
Write-Output '=== pointer ==='
Get-Content 'E:\wwwroot\ops\active-release.json' -Raw
Write-Output 'POST_CUT_OK'