-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Azure DevOps sets a few empty environment variables. ServiceMonitor then converts these to an APPCMD command and then APPCMD fails with a configuration error.
ServiceMonitor Output:
Stopping service 'w3svc'
Service 'w3svc' has been stopped
APPCMD failed with error code 13
Example environment variables:
PSPath : Microsoft.PowerShell.Core\Environment::INPUT_ARGUMENTS
PSDrive : Env
PSProvider : Microsoft.PowerShell.Core\Environment
PSIsContainer : False
Key : INPUT_ARGUMENTS
Value :
Name : INPUT_ARGUMENTS
PSPath : Microsoft.PowerShell.Core\Environment::RESOURCES_TRIGGERINGALIAS
PSDrive : Env
PSProvider : Microsoft.PowerShell.Core\Environment
PSIsContainer : False
Key : RESOURCES_TRIGGERINGALIAS
Value :
Name : RESOURCES_TRIGGERINGALIAS
PSPath : Microsoft.PowerShell.Core\Environment::RESOURCES_TRIGGERINGCATEGORY
PSDrive : Env
PSProvider : Microsoft.PowerShell.Core\Environment
PSIsContainer : False
Key : RESOURCES_TRIGGERINGCATEGORY
Value :
Name : RESOURCES_TRIGGERINGCATEGORY
Example Azure DevOps yaml:
- powershell: |
Invoke-WebRequest -UseBasicParsing -Uri "https://dotnetbinaries.blob.core.windows.net/servicemonitor/2.0.1.10/ServiceMonitor.exe" -OutFile "C:\ServiceMonitor.exe"
displayName: Install Service Monitor
- powershell: |
& C:\ServiceMonitor.exe w3svc
displayName: Start IIS
Currently we are running this as a workaround before starting ServiceMonitor
Get-ChildItem -Path env: | Where-Object Value -eq "" | ForEach-Object { Set-Item -Path "Env:$($_.Name)" -Value "" }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels