Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ jobs:

$toolPath = "$(System.DefaultWorkingDirectory)/toolPath/${{ parameters.globalToolExeName }}"

$env:DOTNET_ROOT = if ($IsWindows) { "$env:LOCALAPPDATA\Microsoft\dotnet" } else { "$env:HOME/.dotnet" }

Write-Verbose -Verbose "DOTNET_ROOT: $env:DOTNET_ROOT"
Get-ChildItem $env:DOTNET_ROOT

$versionFound = & $toolPath -c '$PSVersionTable.PSVersion.ToString()'

if ( '$(PowerShellVersion)' -ne $versionFound)
Expand Down
29 changes: 29 additions & 0 deletions tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
displayName: ${{ parameters.displayName }}
pool:
vmImage: ${{ parameters.imageName }}
variables:
- group: AzDevOpsArtifacts
steps:
- checkout: self
clean: true
Expand Down Expand Up @@ -35,6 +37,33 @@ jobs:
artifact: metadata
path: '$(Pipeline.Workspace)/releasePipeline/metadata'

- pwsh: |
Import-Module "$(Build.SourcesDirectory)/build.psm1" -Force
New-NugetConfigFile -NugetFeedUrl $(PSInternalNugetFeed) -UserName $(PSInternalNugetFeedUserName) -ClearTextPAT $(PSInternalNugetFeedPAT) -FeedName AzDevOpsFeed -Destination '$(Build.SourcesDirectory)/test/hosting'

Write-Verbose -Verbose "Capture hosting folder files"
Get-ChildItem '$(Build.SourcesDirectory)/test/hosting'

# The above cmdlet creates a lower-case nuget.config. There also exists a NuGet.config which we needed to replace.
# Hence the following workaround

if (-not $IsWindows) {
Move-Item -Path '$(Build.SourcesDirectory)/test/hosting/nuget.config' -Destination '$(Build.SourcesDirectory)/test/hosting/NuGet.Config' -Force -ErrorAction Continue
Write-Verbose -Verbose "Capture hosting folder files after Move-Item"
Get-ChildItem '$(Build.SourcesDirectory)/test/hosting'
}

if(-not (Test-Path "$(Build.SourcesDirectory)/test/hosting/NuGet.Config"))
{
throw "NuGet.Config is not created"
}
else
{
Write-Verbose -Verbose "Capture NuGet.Config contents"
Get-Content "$(Build.SourcesDirectory)/test/hosting/NuGet.Config" -Raw
}
displayName: Insert internal nuget feed

- pwsh: |
$dotnetMetadataPath = "$(Build.SourcesDirectory)/DotnetRuntimeMetadata.json"
$dotnetMetadataJson = Get-Content $dotnetMetadataPath -Raw | ConvertFrom-Json
Expand Down