fix: Ci and agent update
Server Deploy / deploy (push) Successful in 13s
Agent Release / build (push) Successful in 10m32s
Agent Release / msi (push) Successful in 36s

This commit is contained in:
2026-07-17 16:43:57 +01:00
parent 2657780e7a
commit db5b5e173f
4 changed files with 9 additions and 19 deletions
-16
View File
@@ -86,22 +86,6 @@ jobs:
$env:GOOS = "windows"; $env:GOARCH = "amd64"
go build -ldflags="-s -w -X main.Version=$env:VERSION" -o ../installer/vantage-agent-windows-amd64.exe ./cmd
- name: Cache nssm
id: cache-nssm
uses: actions/cache@v4
with:
path: installer/nssm.exe
key: nssm-2.24-win64
- name: Fetch nssm
if: steps.cache-nssm.outputs.cache-hit != 'true'
working-directory: installer
shell: pwsh
run: |
Invoke-WebRequest -Uri https://nssm.cc/release/nssm-2.24.zip -OutFile nssm.zip
Expand-Archive -Path nssm.zip -DestinationPath nssm-extract -Force
Copy-Item nssm-extract/nssm-2.24/win64/nssm.exe -Destination nssm.exe
- name: Install WiX
shell: pwsh
run: dotnet tool install --global wix --version 5.*
+1 -1
View File
@@ -4,7 +4,7 @@ build
.env
docs
.superpowers
installer/*.exe
installer/vantage-agent-windows-amd64.exe
installer/*.msi
installer/nssm.zip
installer/checksums-msi.txt
Binary file not shown.
+8 -2
View File
@@ -32,6 +32,10 @@ function Invoke-Native {
function Invoke-NativeSoft {
param([string]$File, [string[]]$Arguments)
Write-Log ("RUN(soft): {0} {1}" -f $File, ($Arguments -join " "))
# Native stderr merged via 2>&1 becomes terminating errors under
# ErrorActionPreference=Stop; force Continue in this scope so a benign nssm
# message (e.g. "service has not been started") never aborts setup.
$ErrorActionPreference = "Continue"
$out = & $File @Arguments 2>&1
if ($out) { Write-Log ("OUT: {0}" -f ($out -join "`n")) }
Write-Log ("EXIT: {0}" -f $LASTEXITCODE)
@@ -121,8 +125,10 @@ tls: true
Invoke-Native -File $nssm -Arguments @("set", "VantageAgent", "AppRotateOnline", "1")
Invoke-Native -File $nssm -Arguments @("set", "VantageAgent", "AppRotateBytes", "1048576")
# restart (not just start) so an upgrade picks up the new binary
Invoke-NativeSoft -File $nssm -Arguments @("restart", "VantageAgent")
# Service is freshly (re)installed and stopped here (teardown removed the old
# one on upgrade), so start it. "restart" would try to stop a not-running
# service and emit a stderr error.
Invoke-NativeSoft -File $nssm -Arguments @("start", "VantageAgent")
Write-Log "=== setup ok ==="
exit 0