v1.31.0
conocimientocicd-architecttemplates/1780 B

smoke-besteffort-spa.yml

Fichero que /hv:cicd-architect usa o materializa en el proyecto. Se muestra tal cual está en el plugin.

cicd-architectskill
templatescarpeta
1780 Btamaño
2026-10-02último cambio del pack
# =============================================================================
# steps/smoke-besteffort-spa.yml
# R11 best-effort (SPA estatica): warning + diagnostico, NUNCA throw.
# El agente DEPLOY corre dentro del server destino: hairpin NAT + 403.4 SSL Required
# + SNI mismatch hacen el smoke fundamentalmente fragil para SPAs. El deploy ya esta
# verificado por MSDeploy, por eso NO se hace throw (no debe disparar rollback).
# R2: TLS 1.2+. Requiere $(iisVirtualApp).
# =============================================================================
steps:
  - task: PowerShell@2
    displayName: 'Smoke best-effort SPA (R11, no throw)'
    inputs:
      targetType: inline
      script: |
        try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13 } catch { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 }
        $app = "$(iisVirtualApp)"
        $url = "https://localhost/$app/"
        $cb  = [System.Net.ServicePointManager]::ServerCertificateValidationCallback
        [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
        try {
          $r = Invoke-WebRequest -Uri $url -UseBasicParsing -TimeoutSec 10
          if ($r.StatusCode -eq 200) { Write-Host "OK: SPA accesible en $url" }
        } catch {
          Write-Warning "Smoke best-effort FAIL: $_"
          Write-Host "DIAGNOSTICO: hairpin NAT + 403.4 SSL Required + SNI mismatch impiden smoke desde el agente."
          Write-Host "Verificar manualmente desde navegador externo. NO se hace throw (R11): el deploy ya esta verificado por MSDeploy."
        } finally {
          [System.Net.ServicePointManager]::ServerCertificateValidationCallback = $cb
        }

← Volver a la ficha de cicd-architect