mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Make some release tests run in a hosted pools (#24270)
This commit is contained in:
@@ -51,6 +51,7 @@ variables:
|
||||
value: mcr.microsoft.com/onebranch/cbl-mariner/build:2.0
|
||||
- name: ReleaseTagVar
|
||||
value: ${{ parameters.ReleaseTagVar }}
|
||||
- group: PoolNames
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
@@ -111,19 +112,22 @@ extends:
|
||||
parameters:
|
||||
jobName: "windowsSDK"
|
||||
displayName: "Windows SDK Validation"
|
||||
jobtype: windows
|
||||
imageName: PSMMS2019-Secure
|
||||
poolName: $(windowsPool)
|
||||
|
||||
- template: /.pipelines/templates/release-validate-sdk.yml@self
|
||||
parameters:
|
||||
jobName: "MacOSSDK"
|
||||
displayName: "MacOS SDK Validation"
|
||||
jobtype: macos
|
||||
imageName: macOS-latest
|
||||
poolName: Azure Pipelines
|
||||
|
||||
- template: /.pipelines/templates/release-validate-sdk.yml@self
|
||||
parameters:
|
||||
jobName: "LinuxSDK"
|
||||
displayName: "Linux SDK Validation"
|
||||
jobtype: linux
|
||||
imageName: PSMMSUbuntu20.04-Secure
|
||||
poolName: $(ubuntuPool)
|
||||
|
||||
- stage: gbltool
|
||||
displayName: 'Validate Global tools'
|
||||
|
||||
@@ -1,34 +1,36 @@
|
||||
parameters:
|
||||
jobName: ""
|
||||
displayName: ""
|
||||
jobtype: "windows"
|
||||
poolName: "windows"
|
||||
imageName: 'none'
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobName }}
|
||||
displayName: ${{ parameters.displayName }}
|
||||
pool:
|
||||
${{ if eq(parameters.jobtype, 'macos') }}:
|
||||
type: linux
|
||||
isCustom: true
|
||||
name: Azure Pipelines
|
||||
vmImage: 'macOS-latest'
|
||||
type: linux
|
||||
isCustom: true
|
||||
${{ if eq( parameters.poolName, 'Azure Pipelines') }}:
|
||||
name: ${{ parameters.poolName }}
|
||||
vmImage: ${{ parameters.imageName }}
|
||||
${{ else }}:
|
||||
type: ${{ parameters.jobtype }}
|
||||
name: ${{ parameters.poolName }}
|
||||
demands:
|
||||
- ImageOverride -equals ${{ parameters.imageName }}
|
||||
|
||||
variables:
|
||||
- group: mscodehub-feed-read-general
|
||||
- group: mscodehub-feed-read-akv
|
||||
- group: DotNetPrivateBuildAccess
|
||||
- name: ob_outputDirectory
|
||||
value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
|
||||
- name: ob_sdl_credscan_suppressionsFile
|
||||
value: $(Build.SourcesDirectory)\PowerShell\.config\suppress.json
|
||||
- name: ob_sdl_tsa_configFile
|
||||
value: $(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
lfs: false
|
||||
|
||||
- template: /.pipelines/templates/insert-nuget-config-azfeed.yml@self
|
||||
parameters:
|
||||
repoRoot: "$(Build.SourcesDirectory)"
|
||||
|
||||
- template: release-SetReleaseTagandContainerName.yml@self
|
||||
|
||||
@@ -45,7 +47,7 @@ jobs:
|
||||
displayName: 'Capture Downloaded Artifacts'
|
||||
|
||||
- pwsh: |
|
||||
$repoRoot = $isMacOS ? "$(Build.SourcesDirectory)" : "$(Build.SourcesDirectory)/PowerShell"
|
||||
$repoRoot = "$(Build.SourcesDirectory)"
|
||||
|
||||
$dotnetMetadataPath = "$repoRoot/DotnetRuntimeMetadata.json"
|
||||
$dotnetMetadataJson = Get-Content $dotnetMetadataPath -Raw | ConvertFrom-Json
|
||||
@@ -80,7 +82,7 @@ jobs:
|
||||
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
|
||||
|
||||
- pwsh: |
|
||||
$repoRoot = $isMacOS ? "$(Build.SourcesDirectory)" : "$(Build.SourcesDirectory)/PowerShell"
|
||||
$repoRoot = "$(Build.SourcesDirectory)"
|
||||
|
||||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
Import-Module "$repoRoot/build.psm1" -Force
|
||||
@@ -102,12 +104,17 @@ jobs:
|
||||
Get-ChildItem
|
||||
|
||||
## register the packages download directory in the nuget file
|
||||
$nugetConfigContent = Get-Content ./NuGet.Config -Raw
|
||||
$nugetPath = './NuGet.Config'
|
||||
if(!(test-path $nugetPath)) {
|
||||
$nugetPath = "$repoRoot/nuget.config"
|
||||
}
|
||||
Write-Verbose -Verbose "nugetPath: $nugetPath"
|
||||
$nugetConfigContent = Get-Content $nugetPath -Raw
|
||||
$updateNugetContent = $nugetConfigContent.Replace("</packageSources>", $xmlElement)
|
||||
|
||||
$updateNugetContent | Out-File ./NuGet.Config -Encoding ascii
|
||||
$updateNugetContent | Out-File $nugetPath -Encoding ascii
|
||||
|
||||
Get-Content ./NuGet.Config
|
||||
Get-Content $nugetPath
|
||||
|
||||
# Add workaround to unblock xUnit testing see issue: https://github.com/dotnet/sdk/issues/26462
|
||||
$dotnetPath = if ($IsWindows) { "$env:LocalAppData\Microsoft\dotnet" } else { "$env:HOME/.dotnet" }
|
||||
@@ -116,7 +123,6 @@ jobs:
|
||||
dotnet --info
|
||||
dotnet restore
|
||||
dotnet test /property:RELEASE_VERSION=$releaseVersion --test-adapter-path:. "--logger:xunit;LogFilePath=$(System.DefaultWorkingDirectory)/test-hosting.xml"
|
||||
|
||||
displayName: Restore and execute tests
|
||||
env:
|
||||
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
|
||||
|
||||
Reference in New Issue
Block a user