diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 93df4e04f9..a9b8019ab7 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -38,6 +38,19 @@ variables: value: '' - name: _SignType value: '' + - name: _InternalRuntimeDownloadArgs + value: '' + - name: _InternalRuntimeDownloadCodeSignArgs + value: '' +- ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - group: DotNet-MSRC-Storage + - name: _InternalRuntimeDownloadArgs + value: -DotNetRuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet -DotNetRuntimeSourceFeedKey $(dotnetclimsrc-read-sas-token-base64) /p:DotNetAssetRootAccessTokenSuffix='$(dotnetclimsrc-read-sas-token-base64)' + # The code signing doesn't use the aspnet build scripts, so the msbuild parameers have + # to be passed directly. This is awkward, since we pass the same info above, but we have + # to have it in two different forms + - name: _InternalRuntimeDownloadCodeSignArgs + value: /p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet /p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64) - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: # DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1 @@ -81,7 +94,15 @@ stages: jobDisplayName: Code check agentOs: Windows steps: - - powershell: ./eng/scripts/CodeCheck.ps1 -ci + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs) displayName: Run eng/scripts/CodeCheck.ps1 artifacts: - name: Code_Check_Logs @@ -108,6 +129,14 @@ stages: # This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even # if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing. # The sign settings have been configured to + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - script: ./build.cmd -ci @@ -117,6 +146,7 @@ stages: -buildNative /bl:artifacts/log/build.x64.binlog $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) displayName: Build x64 # Build the x86 shared framework @@ -132,6 +162,7 @@ stages: /p:OnlyPackPlatformSpecificPackages=true /bl:artifacts/log/build.x86.binlog $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) displayName: Build x86 # This is in a separate build step with -forceCoreMsbuild to workaround MAX_PATH limitations - https://github.com/Microsoft/msbuild/issues/53 @@ -140,6 +171,7 @@ stages: -pack -noBuildDeps $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) displayName: Build SiteExtension # This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved, @@ -165,6 +197,7 @@ stages: /p:AssetManifestFileName=aspnetcore-win-x64-x86.xml $(_BuildArgs) $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) /p:PublishInstallerBaseVersion=true displayName: Build Installers @@ -205,6 +238,7 @@ stages: /p:AssetManifestFileName=aspnetcore-win-arm.xml $(_BuildArgs) $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) installNodeJs: false installJdk: false artifacts: @@ -231,6 +265,7 @@ stages: -p:AssetManifestFileName=aspnetcore-MacOS_x64.xml $(_BuildArgs) $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) installNodeJs: false installJdk: false artifacts: @@ -251,6 +286,14 @@ stages: jobDisplayName: "Build: Linux x64" agentOs: Linux steps: + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh + arguments: $(Build.SourcesDirectory)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - script: ./build.sh --ci --arch x64 @@ -261,6 +304,7 @@ stages: -p:OnlyPackPlatformSpecificPackages=true -bl:artifacts/log/build.linux-x64.binlog $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) displayName: Run build.sh - script: | git clean -xfd src/**/obj/ @@ -274,7 +318,8 @@ stages: -p:BuildRuntimeArchive=false \ -p:LinuxInstallerType=deb \ -bl:artifacts/log/build.deb.binlog \ - $(_BuildArgs) + $(_BuildArgs) \ + $(_InternalRuntimeDownloadArgs) displayName: Build Debian installers - script: | git clean -xfd src/**/obj/ @@ -290,7 +335,8 @@ stages: -bl:artifacts/log/build.rpm.binlog \ -p:AssetManifestFileName=aspnetcore-Linux_x64.xml \ $(_BuildArgs) \ - $(_PublishArgs) + $(_PublishArgs) \ + $(_InternalRuntimeDownloadArgs) displayName: Build RPM installers installNodeJs: false installJdk: false @@ -322,6 +368,7 @@ stages: -p:AssetManifestFileName=aspnetcore-Linux_arm.xml $(_BuildArgs) $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) installNodeJs: false installJdk: false artifacts: @@ -352,6 +399,7 @@ stages: -p:AssetManifestFileName=aspnetcore-Linux_arm64.xml $(_BuildArgs) $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) installNodeJs: false installJdk: false artifacts: @@ -385,6 +433,7 @@ stages: -p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml $(_BuildArgs) $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) installNodeJs: false installJdk: false artifacts: @@ -418,6 +467,7 @@ stages: -p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml $(_BuildArgs) $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) installNodeJs: false installJdk: false artifacts: @@ -439,7 +489,7 @@ stages: jobDisplayName: "Test: Windows Server 2016 x64" agentOs: Windows isTestingJob: true - buildArgs: -all -pack -test -BuildNative "/p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false" + buildArgs: -all -pack -test -BuildNative "/p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs) beforeBuild: - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1" displayName: Setup IISExpress test certificates and schema @@ -475,7 +525,15 @@ stages: agentOs: Windows isTestingJob: true steps: - - script: ./build.cmd -ci -all -pack + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - script: ./build.cmd -ci -all -pack $(_InternalRuntimeDownloadArgs) displayName: Build Repo - script: ./src/ProjectTemplates/build.cmd -ci -pack -NoRestore -NoBuilddeps "/p:RunTemplateTests=true /bl:artifacts/log/template.pack.binlog" displayName: Pack Templates @@ -502,7 +560,7 @@ stages: jobDisplayName: "Test: macOS 10.13" agentOs: macOS isTestingJob: true - buildArgs: --all --test "/p:RunTemplateTests=false" + buildArgs: --all --test "/p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs) beforeBuild: - bash: "./eng/scripts/install-nginx-mac.sh" displayName: Installing Nginx @@ -537,7 +595,7 @@ stages: jobDisplayName: "Test: Ubuntu 16.04 x64" agentOs: Linux isTestingJob: true - buildArgs: --all --test "/p:RunTemplateTests=false" + buildArgs: --all --test "/p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs) beforeBuild: - bash: "./eng/scripts/install-nginx-linux.sh" displayName: Installing Nginx @@ -584,6 +642,25 @@ stages: chmod +x $HOME/bin/jq echo "##vso[task.prependpath]$HOME/bin" displayName: Install jq + - task: UseDotNet@2 + displayName: 'Use .NET Core sdk' + inputs: + packageType: sdk + # The SDK version selected here is intentionally supposed to use the latest release + # For the purpose of building Linux distros, we can't depend on features of the SDK + # which may not exist in pre-built versions of the SDK + # Pinning to preview 8 since preview 9 has breaking changes + version: 3.1.100 + installationPath: $(DotNetCoreSdkDir) + includePreviewVersions: true + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh + arguments: $(Build.SourcesDirectory)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - script: ./eng/scripts/ci-source-build.sh --ci --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false displayName: Run ci-source-build.sh - task: PublishBuildArtifacts@1 diff --git a/.azure/pipelines/jobs/codesign-xplat.yml b/.azure/pipelines/jobs/codesign-xplat.yml index abf1512540..07e2e99f0e 100644 --- a/.azure/pipelines/jobs/codesign-xplat.yml +++ b/.azure/pipelines/jobs/codesign-xplat.yml @@ -28,6 +28,14 @@ jobs: contents: '**/*.nupkg' targetFolder: $(Build.SourcesDirectory)/artifacts/packages/$(BuildConfiguration)/shipping/ flattenFolders: true + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - powershell: .\eng\common\build.ps1 -ci -restore @@ -39,6 +47,7 @@ jobs: /p:DotNetSignType=$(_SignType) $(_BuildArgs) $(_PublishArgs) + $(_InternalRuntimeDownloadCodeSignArgs) displayName: Sign and publish packages artifacts: - name: CodeSign_Xplat_${{ parameters.inputName }}_Logs diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index d218c44531..cba72a653c 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -161,6 +161,24 @@ jobs: - ${{ if ne(parameters.steps, '')}}: - ${{ parameters.steps }} - ${{ if eq(parameters.steps, '')}}: + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if eq(parameters.agentOs, 'Windows') }}: + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - ${{ if ne(parameters.agentOs, 'Windows') }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh + arguments: $(Build.SourcesDirectory)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) - ${{ if eq(parameters.buildScript, '') }}: - ${{ if eq(parameters.agentOs, 'Windows') }}: - script: .\$(BuildDirectory)\build.cmd -ci /p:DotNetSignType=$(_SignType) -Configuration $(BuildConfiguration) $(BuildScriptArgs) diff --git a/NuGet.config b/NuGet.config index e30f18ae63..4d0a835eb6 100644 --- a/NuGet.config +++ b/NuGet.config @@ -6,6 +6,9 @@ + + + diff --git a/build.ps1 b/build.ps1 index c515a84af5..cf854f54b4 100644 --- a/build.ps1 +++ b/build.ps1 @@ -77,6 +77,12 @@ MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] .PARAMETER MSBuildArguments Additional MSBuild arguments to be passed through. +.PARAMETER DotNetRuntimeSourceFeed +Additional feed that can be used when downloading .NET runtimes + +.PARAMETER DotNetRuntimeSourceFeedKey +Key for feed that can be used when downloading .NET runtimes + .EXAMPLE Building both native and managed projects. @@ -151,6 +157,11 @@ param( # Other lifecycle targets [switch]$Help, # Show help + + # Optional arguments that enable downloading an internal + # runtime or runtime from a non-default location + [string]$DotNetRuntimeSourceFeed, + [string]$DotNetRuntimeSourceFeedKey, # Capture the rest [Parameter(ValueFromRemainingArguments = $true)] @@ -251,6 +262,16 @@ if (-not $Configuration) { } $MSBuildArguments += "/p:Configuration=$Configuration" +[string[]]$ToolsetBuildArguments = @() +if ($DotNetRuntimeSourceFeed -or $DotNetRuntimeSourceFeedKey) { + $runtimeFeedArg = "/p:DotNetRuntimeSourceFeed=$DotNetRuntimeSourceFeed" + $runtimeFeedKeyArg = "/p:DotNetRuntimeSourceFeedKey=$DotNetRuntimeSourceFeedKey" + $MSBuildArguments += $runtimeFeedArg + $MSBuildArguments += $runtimeFeedKeyArg + $ToolsetBuildArguments += $runtimeFeedArg + $ToolsetBuildArguments += $runtimeFeedKeyArg +} + $foundJdk = $false $javac = Get-Command javac -ErrorAction Ignore -CommandType Application $localJdkPath = "$PSScriptRoot\.tools\jdk\win-x64\" @@ -375,7 +396,8 @@ try { /p:Configuration=Release ` /p:Restore=$RunRestore ` /p:Build=true ` - /clp:NoSummary + /clp:NoSummary ` + @ToolsetBuildArguments } MSBuild $toolsetBuildProj ` diff --git a/build.sh b/build.sh index 05e1628368..b97417c4fa 100755 --- a/build.sh +++ b/build.sh @@ -29,6 +29,8 @@ build_installers='' build_projects='' target_arch='x64' configuration='' +dotnet_runtime_source_feed='' +dotnet_runtime_source_feed_key='' if [ "$(uname)" = "Darwin" ]; then target_os_name='osx' @@ -45,33 +47,36 @@ __usage() { echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] ...] Arguments: - ... Arguments passed to the command. Variable number of arguments allowed. + ... Arguments passed to the command. Variable number of arguments allowed. Options: - --configuration|-c The build configuration (Debug, Release). Default=Debug - --arch The CPU architecture to build for (x64, arm, arm64). Default=$target_arch - --os-name The base runtime identifier to build for (linux, osx, linux-musl). Default=$target_os_name + --configuration|-c The build configuration (Debug, Release). Default=Debug + --arch The CPU architecture to build for (x64, arm, arm64). Default=$target_arch + --os-name The base runtime identifier to build for (linux, osx, linux-musl). Default=$target_os_name - --[no-]restore Run restore. - --[no-]build Compile projects. (Implies --no-restore) - --[no-]pack Produce packages. - --[no-]test Run tests. + --[no-]restore Run restore. + --[no-]build Compile projects. (Implies --no-restore) + --[no-]pack Produce packages. + --[no-]test Run tests. - --projects A list of projects to build. (Must be an absolute path.) - Globbing patterns are supported, such as \"$(pwd)/**/*.csproj\". - --no-build-deps Do not build project-to-project references and only build the specified project. - --no-build-repo-tasks Suppress building RepoTasks. + --projects A list of projects to build. (Must be an absolute path.) + Globbing patterns are supported, such as \"$(pwd)/**/*.csproj\". + --no-build-deps Do not build project-to-project references and only build the specified project. + --no-build-repo-tasks Suppress building RepoTasks. - --all Build all project types. - --[no-]build-native Build native projects (C, C++). - --[no-]build-managed Build managed projects (C#, F#, VB). - --[no-]build-nodejs Build NodeJS projects (TypeScript, JS). - --[no-]build-java Build Java projects. - --[no-]build-installers Build Java projects. + --all Build all project types. + --[no-]build-native Build native projects (C, C++). + --[no-]build-managed Build managed projects (C#, F#, VB). + --[no-]build-nodejs Build NodeJS projects (TypeScript, JS). + --[no-]build-java Build Java projects. + --[no-]build-installers Build Java projects. - --ci Apply CI specific settings and environment variables. - --binarylog|-bl Use a binary logger - --verbosity|-v MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] + --ci Apply CI specific settings and environment variables. + --binarylog|-bl Use a binary logger + --verbosity|-v MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] + + --dotnet-runtime-source-feed Additional feed that can be used when downloading .NET runtimes + --dotnet-runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes Description: This build script installs required tools and runs an MSBuild command on this repository @@ -188,16 +193,26 @@ while [[ $# -gt 0 ]]; do -no-build-repo-tasks|-nobuildrepotasks) build_repo_tasks=false ;; + -arch) + shift + target_arch="${1:-}" + [ -z "$target_arch" ] && __error "Missing value for parameter --arch" && __usage + ;; -ci) ci=true ;; -binarylog|-bl) use_default_binary_log=true ;; - -verbosity|-v) + -dotnet-runtime-source-feed|-dotnetruntimesourcefeed) shift - [ -z "${1:-}" ] && __error "Missing value for parameter --verbosity" && __usage - verbosity="${1:-}" + [ -z "${1:-}" ] && __error "Missing value for parameter --dotnet-runtime-source-feed" && __usage + dotnet_runtime_source_feed="${1:-}" + ;; + -dotnet-runtime-source-feed-key|-dotnetruntimesourcefeedkey) + shift + [ -z "${1:-}" ] && __error "Missing value for parameter --dotnet-runtime-source-feed-key" && __usage + dotnet_runtime_source_feed_key="${1:-}" ;; *) msbuild_args[${#msbuild_args[*]}]="$1" @@ -270,6 +285,17 @@ msbuild_args[${#msbuild_args[*]}]="-p:Configuration=$configuration" echo "Setting msbuild verbosity to $verbosity" msbuild_args[${#msbuild_args[*]}]="-verbosity:$verbosity" +# Set up additional runtime args +toolset_build_args=() +if [ ! -z "$dotnet_runtime_source_feed" ] || [ ! -z "$dotnet_runtime_source_feed_key" ]; then + runtimeFeedArg="/p:DotNetRuntimeSourceFeed=$dotnet_runtime_source_feed" + runtimeFeedKeyArg="/p:DotNetRuntimeSourceFeedKey=$dotnet_runtime_source_feed_key" + msbuild_args[${#msbuild_args[*]}]=$runtimeFeedArg + msbuild_args[${#msbuild_args[*]}]=$runtimeFeedKeyArg + toolset_build_args[${#toolset_build_args[*]}]=$runtimeFeedArg + toolset_build_args[${#toolset_build_args[*]}]=$runtimeFeedKeyArg +fi + # Initialize global variables need to be set before the import of Arcade is imported restore=$run_restore @@ -325,7 +351,8 @@ if [ "$build_repo_tasks" = true ]; then -p:Configuration=Release \ -p:Restore=$run_restore \ -p:Build=true \ - -clp:NoSummary + -clp:NoSummary \ + ${toolset_build_args[@]+"${toolset_build_args[@]}"} fi # This incantation avoids unbound variable issues if msbuild_args is empty diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0fffa6bcd5..6e634ae8dc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -29,265 +29,265 @@ https://github.com/aspnet/AspNetCore-Tooling 9cf15bed711983d35362d62972ab87ccc88ba8ca - - https://github.com/aspnet/EntityFrameworkCore - 7f59c0bb92fb33698232f0d7007ebcb0a428b543 + + https://dev.azure.com/dnceng/internal/_git/aspnet-EntityFrameworkCore + fde8a73d63ea11e1f2bdc690cf1b16ba0a449649 - - https://github.com/aspnet/EntityFrameworkCore - 7f59c0bb92fb33698232f0d7007ebcb0a428b543 + + https://dev.azure.com/dnceng/internal/_git/aspnet-EntityFrameworkCore + fde8a73d63ea11e1f2bdc690cf1b16ba0a449649 - - https://github.com/aspnet/EntityFrameworkCore - 7f59c0bb92fb33698232f0d7007ebcb0a428b543 + + https://dev.azure.com/dnceng/internal/_git/aspnet-EntityFrameworkCore + fde8a73d63ea11e1f2bdc690cf1b16ba0a449649 - - https://github.com/aspnet/EntityFrameworkCore - 7f59c0bb92fb33698232f0d7007ebcb0a428b543 + + https://dev.azure.com/dnceng/internal/_git/aspnet-EntityFrameworkCore + fde8a73d63ea11e1f2bdc690cf1b16ba0a449649 - - https://github.com/aspnet/EntityFrameworkCore - 7f59c0bb92fb33698232f0d7007ebcb0a428b543 + + https://dev.azure.com/dnceng/internal/_git/aspnet-EntityFrameworkCore + fde8a73d63ea11e1f2bdc690cf1b16ba0a449649 - - https://github.com/aspnet/EntityFrameworkCore - 7f59c0bb92fb33698232f0d7007ebcb0a428b543 + + https://dev.azure.com/dnceng/internal/_git/aspnet-EntityFrameworkCore + fde8a73d63ea11e1f2bdc690cf1b16ba0a449649 - - https://github.com/aspnet/EntityFrameworkCore - 7f59c0bb92fb33698232f0d7007ebcb0a428b543 + + https://dev.azure.com/dnceng/internal/_git/aspnet-EntityFrameworkCore + fde8a73d63ea11e1f2bdc690cf1b16ba0a449649 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 https://github.com/dotnet/corefx @@ -377,25 +377,25 @@ https://github.com/dotnet/corefx 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - - https://github.com/dotnet/core-setup - f3f2dd583fffa254015fc21ff0e45784b333256d + + https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup + a1388f194c30cb21b36b75982962cb5e35954e4e - - https://github.com/dotnet/core-setup - f3f2dd583fffa254015fc21ff0e45784b333256d + + https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup + a1388f194c30cb21b36b75982962cb5e35954e4e https://github.com/dotnet/core-setup 7d57652f33493fa022125b7f63aad0d70c52d810 - - https://github.com/dotnet/core-setup - f3f2dd583fffa254015fc21ff0e45784b333256d + + https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup + a1388f194c30cb21b36b75982962cb5e35954e4e @@ -413,9 +413,9 @@ https://github.com/dotnet/corefx 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 https://github.com/dotnet/arcade @@ -429,9 +429,9 @@ https://github.com/dotnet/arcade 4d80b9cfa53e309c8f685abff3512f60c3d8a3d1 - - https://github.com/aspnet/Extensions - d40e21ccc14908a054b2181b1d6aeb22c49c630d + + https://dev.azure.com/dnceng/internal/_git/aspnet-Extensions + d00c382ec5d68a85d2eb4a49ab4559b8db7a2390 https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index ac32a23cfd..fb7875c1eb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -66,10 +66,10 @@ 3.4.0-beta4-19569-03 - 3.1.1-servicing.19576.9 - 3.1.1-servicing.19576.9 + 3.1.1 + 3.1.1-servicing.19608.4 3.1.0 - 3.1.1-servicing.19576.9 + 3.1.1 2.1.0 1.1.0 @@ -99,75 +99,75 @@ 3.1.0-preview4.19605.1 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 - 3.1.1-servicing.19604.6 + 3.1.1-servicing.19614.4 + 3.1.1-servicing.19614.4 + 3.1.1-servicing.19614.4 + 3.1.1-servicing.19614.4 + 3.1.1-servicing.19614.4 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1-servicing.19614.4 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1-servicing.19614.4 + 3.1.1 + 3.1.1 + 3.1.1-servicing.19614.4 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1-servicing.19614.4 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1-servicing.19614.4 + 3.1.1 + 3.1.1-servicing.19614.4 + 3.1.1-servicing.19614.4 + 3.1.1 3.1.0-rtm.19565.4 - 3.1.1-servicing.19604.6 - 3.1.1-preview4.19604.6 + 3.1.1 + 3.1.1-preview4.19614.4 - 3.1.1-servicing.19605.1 - 3.1.1-servicing.19605.1 - 3.1.1-servicing.19605.1 - 3.1.1-servicing.19605.1 - 3.1.1-servicing.19605.1 - 3.1.1-servicing.19605.1 - 3.1.1-servicing.19605.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 + 3.1.1 3.1.1-servicing.19605.6 3.1.1-servicing.19605.6 @@ -269,5 +269,6 @@ https://dotnetcli.blob.core.windows.net/dotnet/ + https://dotnetclimsrc.blob.core.windows.net/dotnet/ diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 94965a8fd2..6221830226 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -210,7 +210,15 @@ function InstallDotNet { local runtimeSourceFeedKey='' if [[ -n "${7:-}" ]]; then - decodedFeedKey=`echo $7 | base64 --decode` + # The 'base64' binary on alpine uses '-d' and doesn't support '--decode' + # like the rest of the unix variants. At the same time, MacOS doesn't support + # '-d'. To work around this, do a simple detection and switch the parameter + # accordingly. + decodeArg="--decode" + if base64 --help 2>&1 | grep -q "BusyBox"; then + decodeArg="-d" + fi + decodedFeedKey=`echo $7 | base64 $decodeArg` runtimeSourceFeedKey="--feed-credential $decodedFeedKey" fi diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1 index 0d9c9dfec8..a8cff1da96 100644 --- a/eng/scripts/CodeCheck.ps1 +++ b/eng/scripts/CodeCheck.ps1 @@ -4,7 +4,11 @@ This script runs a quick check for common errors, such as checking that Visual Studio solutions are up to date or that generated code has been committed to source. #> param( - [switch]$ci + [switch]$ci, + # Optional arguments that enable downloading an internal + # runtime or runtime from a non-default location + [string]$DotNetRuntimeSourceFeed, + [string]$DotNetRuntimeSourceFeedKey ) $ErrorActionPreference = 'Stop' @@ -43,7 +47,7 @@ function LogError { try { if ($ci) { # Install dotnet.exe - & $repoRoot/restore.cmd -ci -NoBuildNodeJS + & $repoRoot/restore.cmd -ci -NoBuildNodeJS -DotNetRuntimeSourceFeed $DotNetRuntimeSourceFeed -DotNetRuntimeSourceFeedKey $DotNetRuntimeSourceFeedKey } . "$repoRoot/activate.ps1" @@ -171,12 +175,13 @@ try { # Redirect stderr to stdout because PowerShell does not consistently handle output to stderr $changedFiles = & cmd /c 'git --no-pager diff --ignore-space-at-eol --name-only 2>nul' - # Temporary: Disable check for blazor js file - $changedFilesExclusion = "src/Components/Web.JS/dist/Release/blazor.server.js" + # Temporary: Disable check for blazor js file and nuget.config (updated automatically for + # internal builds) + $changedFilesExclusions = @("src/Components/Web.JS/dist/Release/blazor.server.js", "NuGet.config") if ($changedFiles) { foreach ($file in $changedFiles) { - if ($file -eq $changedFilesExclusion) {continue} + if ($changedFilesExclusions -contains $file) {continue} $filePath = Resolve-Path "${repoRoot}/${file}" LogError "Generated code is not up to date in $file. You might need to regenerate the reference assemblies or project list (see docs/ReferenceAssemblies.md and docs/ReferenceResolution.md)" -filepath $filePath diff --git a/eng/scripts/ci-source-build.sh b/eng/scripts/ci-source-build.sh index 3387125d78..ebc50dad0a 100755 --- a/eng/scripts/ci-source-build.sh +++ b/eng/scripts/ci-source-build.sh @@ -9,10 +9,31 @@ set -euo pipefail scriptroot="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" reporoot="$(dirname "$(dirname "$scriptroot")")" + # For local development, make a backup copy of this file first +if [ ! -f "$reporoot/global.bak.json" ]; then + mv "$reporoot/global.json" "$reporoot/global.bak.json" +fi + + # Detect the current version of .NET Core installed +export SDK_VERSION=$(dotnet --version) +echo "The ambient version of .NET Core SDK version = $SDK_VERSION" + + # Update the global.json file to match the current .NET environment +cat "$reporoot/global.bak.json" | \ + jq '.sdk.version=env.SDK_VERSION' | \ + jq '.tools.dotnet=env.SDK_VERSION' | \ + jq 'del(.tools.runtimes)' \ + > "$reporoot/global.json" + + # Restore the original global.json file +trap "{ + mv "$reporoot/global.bak.json" "$reporoot/global.json" +}" EXIT + # Build repo tasks "$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj export DotNetBuildFromSource='true' # Build projects -"$reporoot/eng/common/build.sh" --restore --build --pack "$@" +"$reporoot/eng/common/build.sh" --restore --build --pack "$@" \ No newline at end of file diff --git a/eng/tools/RepoTasks/DownloadFile.cs b/eng/tools/RepoTasks/DownloadFile.cs new file mode 100644 index 0000000000..2be0954cc2 --- /dev/null +++ b/eng/tools/RepoTasks/DownloadFile.cs @@ -0,0 +1,149 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.IO; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using System.Collections.Generic; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; + +namespace RepoTasks +{ + public class DownloadFile : Microsoft.Build.Utilities.Task + { + [Required] + public string Uri { get; set; } + + /// + /// If this field is set and the task fail to download the file from `Uri`, with a NotFound + /// status, it will try to download the file from `PrivateUri`. + /// + public string PrivateUri { get; set; } + + /// + /// Suffix for the private URI in base64 form (for SAS compatibility) + /// + public string PrivateUriSuffix { get; set; } + + public int MaxRetries { get; set; } = 5; + + [Required] + public string DestinationPath { get; set; } + + public bool Overwrite { get; set; } + + public override bool Execute() + { + return ExecuteAsync().GetAwaiter().GetResult(); + } + + private async System.Threading.Tasks.Task ExecuteAsync() + { + string destinationDir = Path.GetDirectoryName(DestinationPath); + if (!Directory.Exists(destinationDir)) + { + Directory.CreateDirectory(destinationDir); + } + + if (File.Exists(DestinationPath) && !Overwrite) + { + return true; + } + + const string FileUriProtocol = "file://"; + + if (Uri.StartsWith(FileUriProtocol, StringComparison.Ordinal)) + { + var filePath = Uri.Substring(FileUriProtocol.Length); + Log.LogMessage($"Copying '{filePath}' to '{DestinationPath}'"); + File.Copy(filePath, DestinationPath); + return true; + } + + List errorMessages = new List(); + bool? downloadStatus = await DownloadWithRetriesAsync(Uri, DestinationPath, errorMessages); + + if (downloadStatus == false && !string.IsNullOrEmpty(PrivateUri)) + { + string uriSuffix = ""; + if (!string.IsNullOrEmpty(PrivateUriSuffix)) + { + var uriSuffixBytes = System.Convert.FromBase64String(PrivateUriSuffix); + uriSuffix = System.Text.Encoding.UTF8.GetString(uriSuffixBytes); + } + downloadStatus = await DownloadWithRetriesAsync($"{PrivateUri}{uriSuffix}", DestinationPath, errorMessages); + } + + if (downloadStatus != true) + { + foreach (var error in errorMessages) + { + Log.LogError(error); + } + } + + return downloadStatus == true; + } + + /// + /// Attempt to download file from `source` with retries when response error is different of FileNotFound and Success. + /// + /// URL to the file to be downloaded. + /// Local path where to put the downloaded file. + /// true: Download Succeeded. false: Download failed with 404. null: Download failed but is retriable. + private async Task DownloadWithRetriesAsync(string source, string target, List errorMessages) + { + Random rng = new Random(); + + Log.LogMessage(MessageImportance.High, $"Attempting download '{source}' to '{target}'"); + + using (var httpClient = new HttpClient()) + { + for (int retryNumber = 0; retryNumber < MaxRetries; retryNumber++) + { + try + { + var httpResponse = await httpClient.GetAsync(source); + + Log.LogMessage(MessageImportance.High, $"{source} -> {httpResponse.StatusCode}"); + + // The Azure Storage REST API returns '400 - Bad Request' in some cases + // where the resource is not found on the storage. + // https://docs.microsoft.com/en-us/rest/api/storageservices/common-rest-api-error-codes + if (httpResponse.StatusCode == HttpStatusCode.NotFound || + httpResponse.ReasonPhrase.IndexOf("The requested URI does not represent any resource on the server.", StringComparison.OrdinalIgnoreCase) == 0) + { + errorMessages.Add($"Problems downloading file from '{source}'. Does the resource exist on the storage? {httpResponse.StatusCode} : {httpResponse.ReasonPhrase}"); + return false; + } + + httpResponse.EnsureSuccessStatusCode(); + + using (var outStream = File.Create(target)) + { + await httpResponse.Content.CopyToAsync(outStream); + } + + Log.LogMessage(MessageImportance.High, $"returning true {source} -> {httpResponse.StatusCode}"); + return true; + } + catch (Exception e) + { + Log.LogMessage(MessageImportance.High, $"returning error in {source} "); + errorMessages.Add($"Problems downloading file from '{source}'. {e.Message} {e.StackTrace}"); + File.Delete(target); + } + + await System.Threading.Tasks.Task.Delay(rng.Next(1000, 10000)); + } + } + + Log.LogMessage(MessageImportance.High, $"giving up {source} "); + errorMessages.Add($"Giving up downloading the file from '{source}' after {MaxRetries} retries."); + return null; + } + } +} diff --git a/eng/tools/RepoTasks/RepoTasks.tasks b/eng/tools/RepoTasks/RepoTasks.tasks index 5fcc97d156..4916a97ed3 100644 --- a/eng/tools/RepoTasks/RepoTasks.tasks +++ b/eng/tools/RepoTasks/RepoTasks.tasks @@ -10,4 +10,5 @@ + diff --git a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj index 62d93eef5a..4a7b1c9c4f 100644 --- a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -38,6 +38,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension) $(DotNetAssetRootUrl)Runtime/$(MicrosoftNETCoreAppInternalPackageVersion)/$(DotNetRuntimeArchiveFileName) + $(DotNetPrivateAssetRootUrl)Runtime/$(MicrosoftNETCoreAppInternalPackageVersion)/$(DotNetRuntimeArchiveFileName) $(BaseIntermediateOutputPath)$(DotNetRuntimeArchiveFileName) @@ -379,9 +380,10 @@ This package is an internal implementation of the .NET Core SDK and is not meant --> + Uri="$(DotNetRuntimeDownloadUrl)" + PrivateUri="$(DotNetRuntimePrivateDownloadUrl)" + PrivateUriSuffix="$(DotNetAssetRootAccessTokenSuffix)" + DestinationPath="$(DotNetRuntimeArchive)" /> https://dotnetcli.azureedge.net/dotnet/ $(DotNetAssetRootUrl)/ + https://dotnetclimsrc.azureedge.net/dotnet/ + $(DotNetPrivateAssetRootUrl)/ - + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe - + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe @@ -37,7 +39,10 @@ + Uri="$(DotNetAssetRootUrl)%(RemoteAsset.Identity)" + PrivateUri="$(DotNetPrivateAssetRootUrl)%(RemoteAsset.Identity)" + PrivateUriSuffix="$(DotNetAssetRootAccessTokenSuffix)" + DestinationPath="$(DepsPath)%(RemoteAsset.TargetFileName)" />