ci: use windows-pool (#1069)

* ci: use windows-pool

* dev-env: add scoop reset to ensure env variables are correctly set
This commit is contained in:
Michał Majcherski 2019-05-13 11:20:21 +02:00 committed by mergify[bot]
parent 17060b6225
commit f3055dd0cb
2 changed files with 22 additions and 1 deletions

View File

@ -56,7 +56,7 @@ jobs:
- job: Windows
timeoutInMinutes: 360
pool:
vmImage: 'vs2017-win2016'
name: 'windows-pool'
steps:
- template: ci/build-windows.yml
- bash: |

View File

@ -157,6 +157,27 @@ function da_install_all([String] $Directory) {
da_error $msg
throw $msg
}
$resetted,$out = da_reset_app $app
If (-not($resetted)) {
$msg = "<< Resetting $app failed: `r`n$out"
da_error $msg
throw $msg
}
}
}
function da_reset_app([String] $app) {
$out = (scoop reset $app *>&1)
$out = $out -join "`r`n" | Out-String
$resettingFound = $out -like "*Resetting*"
$errorFound = $out -like "*ERROR*"
If (-not($resettingFound) -or $errorFound) {
return $False, $out
} Else {
return $True, $out
}
}