Downloading the C++ Agent (Windows)
Strategy 1: Latest version
$dest = "C:\SealightsAgent"
Invoke-WebRequest `
-Uri "https://agents.sealights.co/slcpp/latest/sealights-cpp-agent-windows-self-contained.zip" `
-OutFile "sealights-cpp-agent.zip"
Expand-Archive -Path "sealights-cpp-agent.zip" -DestinationPath $dest -Force- task: PowerShell@2
displayName: Download SeaLights C++ Agent (latest)
inputs:
targetType: inline
script: |
Invoke-WebRequest `
-Uri "https://agents.sealights.co/slcpp/latest/sealights-cpp-agent-windows-self-contained.zip" `
-OutFile "sealights-cpp-agent.zip"
Expand-Archive -Path "sealights-cpp-agent.zip" `
-DestinationPath "$(Agent.ToolsDirectory)\SealightsAgent" -ForceStrategy 2: Specific version (Recommended)
$SL_CPP_VERSION = "0.5.9.1"
$dest = "C:\SealightsAgent"
Invoke-WebRequest `
-Uri "https://agents.sealights.co/slcpp/v$SL_CPP_VERSION/sealights-cpp-agent-windows-self-contained.zip" `
-OutFile "sealights-cpp-agent.zip"
Expand-Archive -Path "sealights-cpp-agent.zip" -DestinationPath $dest -Force
Write-Host "SeaLights C++ Agent $SL_CPP_VERSION installed to $dest"variables:
SL_CPP_VERSION: '0.5.9.1'
steps:
- task: PowerShell@2
displayName: Download SeaLights C++ Agent $(SL_CPP_VERSION)
inputs:
targetType: inline
script: |
Invoke-WebRequest `
-Uri "https://agents.sealights.co/slcpp/v$(SL_CPP_VERSION)/sealights-cpp-agent-windows-self-contained.zip" `
-OutFile "sealights-cpp-agent.zip"
Expand-Archive -Path "sealights-cpp-agent.zip" `
-DestinationPath "$(Agent.ToolsDirectory)\SealightsAgent" -Force
Write-Host "SeaLights C++ Agent $(SL_CPP_VERSION) installed"After extracting
Last updated
Was this helpful?

