Update to use windows-latest as the build agent image (#16831)

This commit is contained in:
Dongbo Wang
2022-02-07 17:34:52 -08:00
committed by GitHub
parent a5d41c2287
commit 30eac0a11e
9 changed files with 34 additions and 16 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
parameters:
pool: 'vs2017-win2016'
pool: 'windows-latest'
jobName: 'win_build'
displayName: Windows Build
+2 -2
View File
@@ -1,12 +1,12 @@
parameters:
pool: 'Hosted VS2017'
pool: 'windows-latest'
jobName: 'credscan'
displayName: Secret Scan
jobs:
- job: ${{ parameters.jobName }}
pool:
name: ${{ parameters.pool }}
vmImage: ${{ parameters.pool }}
displayName: ${{ parameters.displayName }}
+1 -1
View File
@@ -1,5 +1,5 @@
parameters:
vmImage: 'windows-2019'
vmImage: 'windows-latest'
jobName: 'Nanoserver_Tests'
continueOnError: false
+1 -1
View File
@@ -1,6 +1,6 @@
parameters:
parentJobs: []
pool: 'vs2017-win2016'
pool: 'windows-latest'
jobName: 'xunit_verify'
jobs:
+2 -2
View File
@@ -1,5 +1,5 @@
parameters:
pool: 'Hosted VS2017'
pool: 'windows-latest'
parentJobs: []
purpose: ''
tagSet: 'CI'
@@ -9,7 +9,7 @@ jobs:
dependsOn:
${{ parameters.parentJobs }}
pool:
name: ${{ parameters.pool }}
vmImage: ${{ parameters.pool }}
displayName: Windows Test - ${{ parameters.purpose }} - ${{ parameters.tagSet }}
+1 -1
View File
@@ -53,7 +53,7 @@ stages:
jobs:
- job: win_test
pool:
vmImage: vs2017-win2016
vmImage: windows-latest
displayName: Windows Test
timeoutInMinutes: 90
@@ -1,6 +1,6 @@
parameters:
- name: pool
default: 'Hosted VS2017'
default: 'windows-latest'
- name: jobName
default: 'win_packaging'
- name: runtimePrefix
@@ -24,7 +24,7 @@ jobs:
value: $(Agent.BuildDirectory)\$(complianceRepoFolder)
pool:
name: ${{ parameters.pool }}
vmImage: ${{ parameters.pool }}
displayName: Windows Packaging - ${{ parameters.architecture }} - ${{ parameters.channel }}
@@ -600,9 +600,14 @@ Describe "Additional tests for Import-Module with WinCompat" -Tag "Feature" {
It "NoClobber WinCompat import works for an engine module through -UseWindowsPowerShell parameter" {
# pre-test cleanup
Get-Module -Name Microsoft.PowerShell.Management | Remove-Module
Import-Module -Name Microsoft.PowerShell.Management # import the one that comes with PSCore
Import-Module Microsoft.PowerShell.Management -UseWindowsPowerShell
$modules = Get-Module -Name Microsoft.PowerShell.Management
$modules.Count | Should -Be 2
$proxyModule = $modules | Where-Object {$_.ModuleType -eq 'Script'}
$coreModule = $modules | Where-Object {$_.ModuleType -eq 'Manifest'}
@@ -703,6 +708,10 @@ Remove-Module $desktopModuleToUse
Restore-ModulePath
}
BeforeEach {
Get-PSSession -Name WinPSCompatSession -ErrorAction SilentlyContinue | Remove-PSSession
}
AfterEach {
Get-Module $allModules | Remove-Module -Force
}
@@ -1,5 +1,8 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
Import-Module HelpersCommon
Describe "CredSSP cmdlet tests" -Tags 'Feature','RequireAdminOnWindows' {
BeforeAll {
@@ -44,21 +47,27 @@ Describe "CredSSP cmdlet tests" -Tags 'Feature','RequireAdminOnWindows' {
}
It "Enable-WSManCredSSP works: <description>" -Skip:($NotEnglish -or $IsToBeSkipped) -TestCases @(
@{params=@{Role="Client";DelegateComputer="*"};description="client"},
@{params=@{Role="Server"};description="server"}
@{ params = @{ Role="Client"; DelegateComputer="*" }; description = "client"; expected = "The machine is configured to allow delegating fresh credentials to the following target\(s\):wsman/\*" },
@{ params = @{ Role="Server" }; description = "server"; expected = "This computer is configured to receive credentials from a remote client computer" }
) {
param ($params)
param ($params, $description, $expected)
$c = Enable-WSManCredSSP @params -Force
$c.CredSSP | Should -BeTrue
$c = Get-WSManCredSSP
if ($params.Role -eq "Client")
{
$c[0] | Should -Match "The machine is configured to allow delegating fresh credentials to the following target\(s\):wsman/\*"
Wait-UntilTrue -IntervalInMilliseconds 500 -sb {
$c = Get-WSManCredSSP
$c[0] -match $expected
} | Should -BeTrue -Because "WSManCredSSP should have been enabled to allow delegating fresh credentials to wsman/*, but it was not."
}
else
{
$c[1] | Should -Match "This computer is configured to receive credentials from a remote client computer"
Wait-UntilTrue -IntervalInMilliseconds 500 -sb {
$c = Get-WSManCredSSP
$c[1] -match $expected
} | Should -BeTrue -Because "WSManCredSSP should have been enabled to allow receiving credentials from a remote client computer, but it was not."
}
}