windows: CI agent diagnostics (#1146)

This commit is contained in:
Michał Majcherski 2019-05-15 11:59:56 +02:00 committed by GitHub
parent a5cf706040
commit e6c7421580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -8,6 +8,9 @@ steps:
# to upload to the bazel cache
GOOGLE_APPLICATION_CREDENTIALS_CONTENT: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
- powershell: '.\ci\windows-diagnostics.ps1'
displayName: 'Agent diagnostics'
- powershell: '.\build.ps1'
displayName: 'Build'

View File

@ -0,0 +1,15 @@
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'
$info = Get-CimInstance -ClassName win32_operatingsystem
$info | format-table CSName
$info | format-table LastBootUpTime
$info | format-table FreePhysicalMemory, TotalVisibleMemorySize
get-wmiobject win32_logicaldisk | format-table `
Name,`
@{n="Size [GB]";e={[math]::truncate($_.size / 1GB)}},`
@{n="Free [GB]";e={[math]::truncate($_.freespace / 1GB)}}