Move unit test runs to hosted pools (#671)
We can now run our unit tests in the Hosted VS2019 pool since bugs have been fixed in the version of Visual Studio deployed on those agents.
This commit is contained in:
@@ -41,15 +41,9 @@ jobs:
|
||||
- template: ./templates/run-unit-tests.yaml
|
||||
parameters:
|
||||
platform: x64
|
||||
reimageServiceConnection: essential-experiences-interactive-reimage
|
||||
reimageSubscriptionId: a8f5eb47-e59c-44b4-8e42-e70811a047b5
|
||||
reimageResourceGroup: EETestPublic
|
||||
|
||||
- template: ./templates/run-unit-tests.yaml
|
||||
parameters:
|
||||
platform: x86
|
||||
reimageServiceConnection: essential-experiences-interactive-reimage
|
||||
reimageSubscriptionId: a8f5eb47-e59c-44b4-8e42-e70811a047b5
|
||||
reimageResourceGroup: EETestPublic
|
||||
|
||||
- template: ./templates/package-appxbundle.yaml
|
||||
|
@@ -48,16 +48,10 @@ jobs:
|
||||
- template: ./templates/run-unit-tests.yaml
|
||||
parameters:
|
||||
platform: x64
|
||||
reimageServiceConnection: macool-sandbox-interactiveDesktopRS5
|
||||
reimageSubscriptionId: 012a8008-c00f-45b3-9828-41ebba30141d
|
||||
reimageResourceGroup: interactiveDesktopRS5
|
||||
|
||||
- template: ./templates/run-unit-tests.yaml
|
||||
parameters:
|
||||
platform: x86
|
||||
reimageServiceConnection: macool-sandbox-interactiveDesktopRS5
|
||||
reimageSubscriptionId: 012a8008-c00f-45b3-9828-41ebba30141d
|
||||
reimageResourceGroup: interactiveDesktopRS5
|
||||
|
||||
- template: ./templates/package-appxbundle.yaml
|
||||
|
||||
|
@@ -1,29 +1,20 @@
|
||||
# This template contains jobs to run unit tests on the interactive test agents.
|
||||
# This template contains jobs to run unit tests.
|
||||
|
||||
parameters:
|
||||
platform: ''
|
||||
reimageServiceConnection: ''
|
||||
reimageSubscriptionId: ''
|
||||
reimageResourceGroup: ''
|
||||
runsettingsFileName: ''
|
||||
|
||||
jobs:
|
||||
- job: UnitTests${{ parameters.platform }}
|
||||
displayName: UnitTests ${{ parameters.platform }}
|
||||
dependsOn: Build${{ parameters.platform }}
|
||||
condition: succeeded()
|
||||
pool:
|
||||
name: Essential Experiences Interactive
|
||||
workspace:
|
||||
clean: outputs
|
||||
vmImage: windows-2019
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
steps:
|
||||
- checkout: none
|
||||
|
||||
- powershell: Write-Host "##vso[task.setvariable variable=agentInstanceId;isOutput=true]$($env:AgentName -replace '\D+' -as [int])"
|
||||
name: LogAgentStep
|
||||
displayName: Log this agent's instance for later cleanup
|
||||
env:
|
||||
AgentName: $(Agent.Name)
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download CalculatorUnitTests
|
||||
@@ -41,19 +32,4 @@ jobs:
|
||||
displayName: Run CalculatorUnitTests
|
||||
inputs:
|
||||
testAssemblyVer2: $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test\CalculatorUnitTests.appx
|
||||
otherConsoleOptions: /Platform:${{ parameters.platform }}
|
||||
|
||||
- job: CleanUpUnitTests${{ parameters.platform }}
|
||||
dependsOn: UnitTests${{ parameters.platform }}
|
||||
condition: and(always(), ne(dependencies.UnitTests${{ parameters.platform }}.Outputs['LogAgentStep.agentInstanceId'], ''))
|
||||
pool: server
|
||||
variables:
|
||||
agentInstanceId: $[ dependencies.UnitTests${{ parameters.platform }}.outputs['LogAgentStep.agentInstanceId'] ]
|
||||
steps:
|
||||
- task: InvokeRESTAPI@1
|
||||
displayName: Reimage test machine
|
||||
inputs:
|
||||
connectionType: connectedServiceNameARM
|
||||
azureServiceConnection: ${{ parameters.reimageServiceConnection }}
|
||||
urlSuffix: subscriptions/${{ parameters.reimageSubscriptionId }}/resourceGroups/${{ parameters.reimageResourceGroup }}/providers/Microsoft.Compute/virtualMachineScaleSets/essential/reimage?api-version=2018-10-01
|
||||
body: '{ "instanceIds": ["$(agentInstanceId)"] }'
|
||||
otherConsoleOptions: /Platform:${{ parameters.platform }}
|
Reference in New Issue
Block a user