未验证 提交 5759ba9d 编写于 作者: D dotnet-maestro[bot] 提交者: GitHub

Update dependencies from https://github.com/dotnet/arcade build 20200213.5 (#2576)

- Microsoft.DotNet.ApiCompat - 1.0.0-beta.20113.5
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.20113.5
- Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.20113.5
- Microsoft.DotNet.GenAPI - 1.0.0-beta.20113.5
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.20113.5
上级 abc56b3a
...@@ -63,13 +63,13 @@ ...@@ -63,13 +63,13 @@
<Uri>https://github.com/dotnet/core-setup</Uri> <Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>00491cd463dc0a17996b8ddb24cf9faf390f04fb</Sha> <Sha>00491cd463dc0a17996b8ddb24cf9faf390f04fb</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19577.5"> <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.20113.5">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha> <Sha>15f00efd583eab4372b2e9ca25bd80ace5b119ad</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="1.0.0-beta.19577.5"> <Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="1.0.0-beta.20113.5">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha> <Sha>15f00efd583eab4372b2e9ca25bd80ace5b119ad</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.1.0-preview3.19551.2" CoherentParentDependency="Microsoft.NETCore.App"> <Dependency Name="Microsoft.NETCore.Platforms" Version="3.1.0-preview3.19551.2" CoherentParentDependency="Microsoft.NETCore.App">
<Uri>https://github.com/dotnet/corefx</Uri> <Uri>https://github.com/dotnet/corefx</Uri>
...@@ -95,17 +95,17 @@ ...@@ -95,17 +95,17 @@
<Uri>https://github.com/dotnet/coreclr</Uri> <Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>c3fddaa79b1ae1de2656327179fdc863ece4a5af</Sha> <Sha>c3fddaa79b1ae1de2656327179fdc863ece4a5af</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19577.5"> <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.20113.5">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha> <Sha>15f00efd583eab4372b2e9ca25bd80ace5b119ad</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="1.0.0-beta.19577.5"> <Dependency Name="Microsoft.DotNet.ApiCompat" Version="1.0.0-beta.20113.5">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha> <Sha>15f00efd583eab4372b2e9ca25bd80ace5b119ad</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19577.5"> <Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.20113.5">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha> <Sha>15f00efd583eab4372b2e9ca25bd80ace5b119ad</Sha>
</Dependency> </Dependency>
<Dependency Name="System.Resources.Extensions" Version="4.7.0-preview3.19551.2" CoherentParentDependency="Microsoft.NETCore.App"> <Dependency Name="System.Resources.Extensions" Version="4.7.0-preview3.19551.2" CoherentParentDependency="Microsoft.NETCore.App">
<Uri>https://github.com/dotnet/corefx</Uri> <Uri>https://github.com/dotnet/corefx</Uri>
......
...@@ -50,9 +50,9 @@ ...@@ -50,9 +50,9 @@
</PropertyGroup> </PropertyGroup>
<!-- Packages that come from https://github.com/dotnet/arcade --> <!-- Packages that come from https://github.com/dotnet/arcade -->
<PropertyGroup> <PropertyGroup>
<MicrosoftDotNetApiCompatVersion>1.0.0-beta.19577.5</MicrosoftDotNetApiCompatVersion> <MicrosoftDotNetApiCompatVersion>1.0.0-beta.20113.5</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>1.0.0-beta.19577.5</MicrosoftDotNetCodeAnalysisPackageVersion> <MicrosoftDotNetCodeAnalysisPackageVersion>1.0.0-beta.20113.5</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetGenAPIVersion>1.0.0-beta.19577.5</MicrosoftDotNetGenAPIVersion> <MicrosoftDotNetGenAPIVersion>1.0.0-beta.20113.5</MicrosoftDotNetGenAPIVersion>
</PropertyGroup> </PropertyGroup>
<!-- Packages that come from https://github.com/dotnet/corefxlab --> <!-- Packages that come from https://github.com/dotnet/corefxlab -->
<PropertyGroup> <PropertyGroup>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# condition: eq(variables['Agent.OS'], 'Windows_NT') # condition: eq(variables['Agent.OS'], 'Windows_NT')
# inputs: # inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 # filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token # arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
# env: # env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw) # Token: $(dn-bot-dnceng-artifact-feeds-rw)
...@@ -83,7 +83,7 @@ function AddCredential($creds, $source, $username, $password) { ...@@ -83,7 +83,7 @@ function AddCredential($creds, $source, $username, $password) {
$passwordElement.SetAttribute("value", $Password) $passwordElement.SetAttribute("value", $Password)
} }
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) { function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Password) {
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") $maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds." Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
...@@ -95,10 +95,15 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) { ...@@ -95,10 +95,15 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
} }
if (!(Test-Path $ConfigFile -PathType Leaf)) { if (!(Test-Path $ConfigFile -PathType Leaf)) {
Write-Host "Couldn't find the file NuGet config file: $ConfigFile" Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
ExitWithExitCode 1 ExitWithExitCode 1
} }
if (!$Password) {
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
ExitWithExitCode 1
}
# Load NuGet.config # Load NuGet.config
$doc = New-Object System.Xml.XmlDocument $doc = New-Object System.Xml.XmlDocument
$filename = (Get-Item $ConfigFile).FullName $filename = (Get-Item $ConfigFile).FullName
...@@ -118,10 +123,21 @@ if ($creds -eq $null) { ...@@ -118,10 +123,21 @@ if ($creds -eq $null) {
$doc.DocumentElement.AppendChild($creds) | Out-Null $doc.DocumentElement.AppendChild($creds) | Out-Null
} }
$userName = "dn-bot"
# Insert credential nodes for Maestro's private feeds # Insert credential nodes for Maestro's private feeds
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password $dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password if ($dotnet3Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}
$doc.Save($filename) $doc.Save($filename)
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# displayName: Setup Private Feeds Credentials # displayName: Setup Private Feeds Credentials
# inputs: # inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh # filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token # arguments: $(Build.SourcesDirectory)/NuGet.config $Token
# condition: ne(variables['Agent.OS'], 'Windows_NT') # condition: ne(variables['Agent.OS'], 'Windows_NT')
# env: # env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw) # Token: $(dn-bot-dnceng-artifact-feeds-rw)
...@@ -42,7 +42,12 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" ...@@ -42,7 +42,12 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
. "$scriptroot/tools.sh" . "$scriptroot/tools.sh"
if [ ! -f "$ConfigFile" ]; then if [ ! -f "$ConfigFile" ]; then
echo "Couldn't find the file NuGet config file: $ConfigFile" Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
ExitWithExitCode 1
fi
if [ -z "$CredToken" ]; then
Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
ExitWithExitCode 1 ExitWithExitCode 1
fi fi
...@@ -52,7 +57,7 @@ if [[ `uname -s` == "Darwin" ]]; then ...@@ -52,7 +57,7 @@ if [[ `uname -s` == "Darwin" ]]; then
fi fi
# Ensure there is a <packageSources>...</packageSources> section. # Ensure there is a <packageSources>...</packageSources> section.
grep -i "<packageSources>" $ConfigFile grep -i "<packageSources>" $ConfigFile
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
echo "Adding <packageSources>...</packageSources> section." echo "Adding <packageSources>...</packageSources> section."
ConfigNodeHeader="<configuration>" ConfigNodeHeader="<configuration>"
...@@ -62,7 +67,7 @@ if [ "$?" != "0" ]; then ...@@ -62,7 +67,7 @@ if [ "$?" != "0" ]; then
fi fi
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section. # Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
grep -i "<packageSourceCredentials>" $ConfigFile grep -i "<packageSourceCredentials>" $ConfigFile
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section." echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."
...@@ -72,37 +77,64 @@ if [ "$?" != "0" ]; then ...@@ -72,37 +77,64 @@ if [ "$?" != "0" ]; then
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
fi fi
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources PackageSources=()
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>" # Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />" grep -i "<add key=\"dotnet3\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet3-internal')
grep -i "<add key=\"dotnet3-internal-transport\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet3-internal-transport')
fi fi
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources # Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
grep -i "<add key=\"dotnet3-internal-transport\">" $ConfigFile grep -i "<add key=\"dotnet3.1\"" $ConfigFile
if [ "$?" != "0" ]; then if [ "$?" == "0" ]; then
echo "Adding dotnet3-internal-transport to the packageSources." grep -i "<add key=\"dotnet3.1-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3.1-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2\" />"
PackageSourcesNodeFooter="</packageSources>" sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />" fi
PackageSources+=('dotnet3.1-internal')
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config grep -i "<add key=\"dotnet3.1-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3.1-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet3.1-internal-transport')
fi fi
# I want things split line by line # I want things split line by line
PrevIFS=$IFS PrevIFS=$IFS
IFS=$'\n' IFS=$'\n'
PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') PackageSources+="$IFS"
PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
IFS=$PrevIFS IFS=$PrevIFS
PackageSources+=('dotnet3-internal')
PackageSources+=('dotnet3-internal-transport')
for FeedName in ${PackageSources[@]} ; do for FeedName in ${PackageSources[@]} ; do
# Check if there is no existing credential for this FeedName # Check if there is no existing credential for this FeedName
grep -i "<$FeedName>" $ConfigFile grep -i "<$FeedName>" $ConfigFile
...@@ -112,6 +144,6 @@ for FeedName in ${PackageSources[@]} ; do ...@@ -112,6 +144,6 @@ for FeedName in ${PackageSources[@]} ; do
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>" PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>" NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi fi
done done
\ No newline at end of file
...@@ -27,7 +27,7 @@ function InstallDarcCli ($darcVersion) { ...@@ -27,7 +27,7 @@ function InstallDarcCli ($darcVersion) {
Write-Host "Installing Darc CLI version $darcVersion..." Write-Host "Installing Darc CLI version $darcVersion..."
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed." Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g --framework netcoreapp2.1
} }
InstallDarcCli $darcVersion InstallDarcCli $darcVersion
...@@ -3,7 +3,9 @@ Param( ...@@ -3,7 +3,9 @@ Param(
[string] $verbosity = "minimal", [string] $verbosity = "minimal",
[string] $architecture = "", [string] $architecture = "",
[string] $version = "Latest", [string] $version = "Latest",
[string] $runtime = "dotnet" [string] $runtime = "dotnet",
[string] $RuntimeSourceFeed = "",
[string] $RuntimeSourceFeedKey = ""
) )
. $PSScriptRoot\tools.ps1 . $PSScriptRoot\tools.ps1
...@@ -15,7 +17,7 @@ try { ...@@ -15,7 +17,7 @@ try {
if ($architecture -and $architecture.Trim() -eq "x86") { if ($architecture -and $architecture.Trim() -eq "x86") {
$installdir = Join-Path $installdir "x86" $installdir = Join-Path $installdir "x86"
} }
InstallDotNet $installdir $version $architecture $runtime $true InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
} }
catch { catch {
Write-Host $_ Write-Host $_
......
...@@ -14,6 +14,8 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" ...@@ -14,6 +14,8 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
version='Latest' version='Latest'
architecture='' architecture=''
runtime='dotnet' runtime='dotnet'
runtimeSourceFeed=''
runtimeSourceFeedKey=''
while [[ $# > 0 ]]; do while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')" opt="$(echo "$1" | awk '{print tolower($0)}')"
case "$opt" in case "$opt" in
...@@ -29,9 +31,16 @@ while [[ $# > 0 ]]; do ...@@ -29,9 +31,16 @@ while [[ $# > 0 ]]; do
shift shift
runtime="$1" runtime="$1"
;; ;;
-runtimesourcefeed)
shift
runtimeSourceFeed="$1"
;;
-runtimesourcefeedkey)
shift
runtimeSourceFeedKey="$1"
;;
*) *)
echo "Invalid argument: $1" echo "Invalid argument: $1"
usage
exit 1 exit 1
;; ;;
esac esac
...@@ -40,7 +49,7 @@ done ...@@ -40,7 +49,7 @@ done
. "$scriptroot/tools.sh" . "$scriptroot/tools.sh"
dotnetRoot="$repo_root/.dotnet" dotnetRoot="$repo_root/.dotnet"
InstallDotNet $dotnetRoot $version "$architecture" $runtime true || { InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
local exit_code=$? local exit_code=$?
echo "dotnet-install.sh failed (exit code '$exit_code')." >&2 echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code ExitWithExitCode $exit_code
......
...@@ -26,6 +26,10 @@ stages: ...@@ -26,6 +26,10 @@ stages:
pool: pool:
vmImage: 'windows-2019' vmImage: 'windows-2019'
steps: steps:
# This is necessary whenever we want to publish/restore to an AzDO private feed
- task: NuGetAuthenticate@0
displayName: 'Authenticate to AzDO Feeds'
- task: DownloadBuildArtifacts@0 - task: DownloadBuildArtifacts@0
displayName: Download Blob Artifacts displayName: Download Blob Artifacts
inputs: inputs:
......
...@@ -49,6 +49,12 @@ stages: ...@@ -49,6 +49,12 @@ stages:
pool: pool:
vmImage: 'windows-2019' vmImage: 'windows-2019'
steps: steps:
# This is necessary whenever we want to publish/restore to an AzDO private feed
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
# otherwise it'll complain about accessing a private feed.
- task: NuGetAuthenticate@0
displayName: 'Authenticate to AzDO Feeds'
- task: DownloadBuildArtifacts@0 - task: DownloadBuildArtifacts@0
displayName: Download Package Artifacts displayName: Download Package Artifacts
inputs: inputs:
...@@ -335,4 +341,28 @@ stages: ...@@ -335,4 +341,28 @@ stages:
channelId: 557 channelId: 557
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json' transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NETCore_SDK_313xx_Publishing'
channelName: '.NET Core SDK 3.1.3xx'
channelId: 759
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NETCore_SDK_313xx_Internal_Publishing'
channelName: '.NET Core SDK 3.1.3xx Internal'
channelId: 760
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
\ No newline at end of file
...@@ -184,7 +184,14 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc ...@@ -184,7 +184,14 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc
InstallDotNet $dotnetRoot $version $architecture InstallDotNet $dotnetRoot $version $architecture
} }
function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) { function InstallDotNet([string] $dotnetRoot,
[string] $version,
[string] $architecture = "",
[string] $runtime = "",
[bool] $skipNonVersionedFiles = $false,
[string] $runtimeSourceFeed = "",
[string] $runtimeSourceFeedKey = "") {
$installScript = GetDotNetInstallScript $dotnetRoot $installScript = GetDotNetInstallScript $dotnetRoot
$installParameters = @{ $installParameters = @{
Version = $version Version = $version
...@@ -195,10 +202,32 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit ...@@ -195,10 +202,32 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit
if ($runtime) { $installParameters.Runtime = $runtime } if ($runtime) { $installParameters.Runtime = $runtime }
if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles } if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }
& $installScript @installParameters try {
if ($lastExitCode -ne 0) { & $installScript @installParameters
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet cli (exit code '$lastExitCode')." }
ExitWithExitCode $lastExitCode catch {
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location."
# Only the runtime can be installed from a custom [private] location.
if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) {
if ($runtimeSourceFeed) { $installParameters.AzureFeed = $runtimeSourceFeed }
if ($runtimeSourceFeedKey) {
$decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey)
$decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes)
$installParameters.FeedCredential = $decodedString
}
try {
& $installScript @installParameters
}
catch {
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
ExitWithExitCode 1
}
} else {
ExitWithExitCode 1
}
} }
} }
......
...@@ -200,8 +200,30 @@ function InstallDotNet { ...@@ -200,8 +200,30 @@ function InstallDotNet {
fi fi
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || { bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || {
local exit_code=$? local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK (exit code '$exit_code')." Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from public location (exit code '$exit_code')."
ExitWithExitCode $exit_code
if [[ -n "$runtimeArg" ]]; then
local runtimeSourceFeed=''
if [[ -n "${6:-}" ]]; then
runtimeSourceFeed="--azure-feed $6"
fi
local runtimeSourceFeedKey=''
if [[ -n "${7:-}" ]]; then
decodedFeedKey=`echo $7 | base64 --decode`
runtimeSourceFeedKey="--feed-credential $decodedFeedKey"
fi
if [[ -n "$runtimeSourceFeed" || -n "$runtimeSourceFeedKey" ]]; then
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg $runtimeSourceFeed $runtimeSourceFeedKey || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
else
ExitWithExitCode $exit_code
fi
fi
} }
} }
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
} }
}, },
"msbuild-sdks": { "msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19577.5", "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.20113.5",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19577.5" "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.20113.5"
}, },
"native-tools": { "native-tools": {
"strawberry-perl": "5.28.1.1-1", "strawberry-perl": "5.28.1.1-1",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册