diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 1d82bd739cff45..c1f4b99fc5df4d 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "1.0.0-prerelease.22206.1", + "version": "1.0.0-prerelease.22208.1", "commands": [ "xharness" ] diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d45f4767c5f825..bb4f25bba46ada 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,12 +1,12 @@ - + https://github.com/dotnet/icu - 50877d02014f8d6540a3c056feb34bf912c92141 + eacb76c78cd01cc2bdfb82b58cda7b5036d04244 - + https://github.com/dotnet/msquic - 03def3e4f051aa09f9642a6a839a0c806682536e + 417bdeac3988ec59ee7f6c045ae03d2193bcdab0 https://github.com/dotnet/emsdk @@ -16,37 +16,37 @@ https://github.com/dotnet/wcf 7f504aabb1988e9a093c1e74d8040bd52feb2f01 - + https://github.com/dotnet/llvm-project - f17917e8d6a2e3ba069cddeab873554706d502a5 + b3ea614b9c2326b748f8e98607c3fe7be8408165 - + https://github.com/dotnet/llvm-project - f17917e8d6a2e3ba069cddeab873554706d502a5 + b3ea614b9c2326b748f8e98607c3fe7be8408165 - + https://github.com/dotnet/llvm-project - f17917e8d6a2e3ba069cddeab873554706d502a5 + b3ea614b9c2326b748f8e98607c3fe7be8408165 - + https://github.com/dotnet/llvm-project - f17917e8d6a2e3ba069cddeab873554706d502a5 + b3ea614b9c2326b748f8e98607c3fe7be8408165 - + https://github.com/dotnet/llvm-project - f17917e8d6a2e3ba069cddeab873554706d502a5 + b3ea614b9c2326b748f8e98607c3fe7be8408165 - + https://github.com/dotnet/llvm-project - f17917e8d6a2e3ba069cddeab873554706d502a5 + b3ea614b9c2326b748f8e98607c3fe7be8408165 - + https://github.com/dotnet/llvm-project - f17917e8d6a2e3ba069cddeab873554706d502a5 + b3ea614b9c2326b748f8e98607c3fe7be8408165 - + https://github.com/dotnet/llvm-project - f17917e8d6a2e3ba069cddeab873554706d502a5 + b3ea614b9c2326b748f8e98607c3fe7be8408165 https://github.com/dotnet/command-line-api @@ -54,77 +54,77 @@ - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 https://github.com/microsoft/vstest @@ -206,53 +206,53 @@ https://github.com/dotnet/llvm-project 3c3aebe3fff00bf4dd473e38d5295e10ab47726b - + https://github.com/dotnet/runtime - eb51b02b158c3ff71a1ec7eac8a211d1d464c1a5 + c3e44952bb75d054517f2a24943502d3a14a47f5 - + https://github.com/dotnet/runtime - eb51b02b158c3ff71a1ec7eac8a211d1d464c1a5 + c3e44952bb75d054517f2a24943502d3a14a47f5 - + https://github.com/dotnet/runtime - eb51b02b158c3ff71a1ec7eac8a211d1d464c1a5 + c3e44952bb75d054517f2a24943502d3a14a47f5 - + https://github.com/dotnet/runtime - eb51b02b158c3ff71a1ec7eac8a211d1d464c1a5 + c3e44952bb75d054517f2a24943502d3a14a47f5 - + https://github.com/dotnet/runtime - eb51b02b158c3ff71a1ec7eac8a211d1d464c1a5 + c3e44952bb75d054517f2a24943502d3a14a47f5 - + https://github.com/dotnet/runtime - eb51b02b158c3ff71a1ec7eac8a211d1d464c1a5 + c3e44952bb75d054517f2a24943502d3a14a47f5 - + https://github.com/dotnet/runtime - eb51b02b158c3ff71a1ec7eac8a211d1d464c1a5 + c3e44952bb75d054517f2a24943502d3a14a47f5 https://github.com/dotnet/linker c6434f6e8a0a1bfbb77261ac9f85c98b781613e5 - + https://github.com/dotnet/xharness - f9a28aefa80424a69f3ce16e845c4e01e5d8c17e + ec13ccb23a32b3eee0ed92cb26e44ac6794c1b26 - + https://github.com/dotnet/xharness - f9a28aefa80424a69f3ce16e845c4e01e5d8c17e + ec13ccb23a32b3eee0ed92cb26e44ac6794c1b26 - + https://github.com/dotnet/xharness - f9a28aefa80424a69f3ce16e845c4e01e5d8c17e + ec13ccb23a32b3eee0ed92cb26e44ac6794c1b26 - + https://github.com/dotnet/arcade - 1527dc867ccb652def4c0f57fbd2ebbed3a94019 + 549523c3fc8929da1a3073d1a97f298e0d1dc342 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -270,9 +270,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization a44e13253c25ec42c4700d4d7ba6f84d9751a387 - + https://github.com/dotnet/hotreload-utils - 47d85fbfba08b6b31ec5e2f0a18f239b880ce084 + f025eb61d880f837392c1b3d7112c1342e44f9c0 https://github.com/dotnet/runtime-assets diff --git a/eng/Versions.props b/eng/Versions.props index 0fa57c54d4dfaf..0f88730f4eb081 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -53,39 +53,39 @@ 2.0.0-alpha.1.21525.11 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 2.5.1-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 - 7.0.0-beta.22179.1 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 2.5.1-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 + 7.0.0-beta.22206.10 6.0.0-preview.1.102 - 7.0.0-preview.3.22171.1 - 7.0.0-preview.3.22171.1 - 7.0.0-preview.3.22171.1 + 7.0.0-preview.4.22201.3 + 7.0.0-preview.4.22201.3 + 7.0.0-preview.4.22201.3 3.1.0 - 7.0.0-preview.3.22171.1 - 1.0.0-alpha.1.22157.1 - 1.0.0-alpha.1.22157.1 - 1.0.0-alpha.1.22157.1 - 1.0.0-alpha.1.22157.1 - 1.0.0-alpha.1.22157.1 - 1.0.0-alpha.1.22157.1 - 1.0.0-alpha.1.22157.1 - 1.0.0-alpha.1.22157.1 + 7.0.0-preview.4.22201.3 + 1.0.0-alpha.1.22204.1 + 1.0.0-alpha.1.22204.1 + 1.0.0-alpha.1.22204.1 + 1.0.0-alpha.1.22204.1 + 1.0.0-alpha.1.22204.1 + 1.0.0-alpha.1.22204.1 + 1.0.0-alpha.1.22204.1 + 1.0.0-alpha.1.22204.1 6.0.0 1.1.1 @@ -121,11 +121,11 @@ 5.0.0 5.0.0 4.9.0 - 7.0.0-preview.3.22171.1 + 7.0.0-preview.4.22201.3 6.0.0 4.5.4 4.5.0 - 7.0.0-preview.3.22171.1 + 7.0.0-preview.4.22201.3 7.0.0-beta.22179.2 7.0.0-beta.22179.2 @@ -159,10 +159,10 @@ 1.1.0 16.9.0-preview-20201201-01 - 1.0.0-prerelease.22206.1 - 1.0.0-prerelease.22206.1 - 1.0.0-prerelease.22206.1 - 1.0.2-alpha.0.22178.2 + 1.0.0-prerelease.22208.1 + 1.0.0-prerelease.22208.1 + 1.0.0-prerelease.22208.1 + 1.1.0-alpha.0.22206.1 2.4.2-pre.22 0.12.0-pre.20 2.4.2 @@ -180,9 +180,9 @@ 7.0.100-1.22205.1 $(MicrosoftNETILLinkTasksVersion) - 7.0.0-preview.4.22178.2 + 7.0.0-preview.4.22204.1 - 7.0.0-alpha.1.22173.2 + 7.0.0-alpha.1.22181.2 11.1.0-alpha.1.22178.2 11.1.0-alpha.1.22178.2 diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index db830c00a6f8d8..413adea4365b12 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -31,6 +31,10 @@ Wait time between retry attempts in seconds .PARAMETER GlobalJsonFile File path to global.json file +.PARAMETER PathPromotion +Optional switch to enable either promote native tools specified in the global.json to the path (in Azure Pipelines) +or break the build if a native tool is not found on the path (on a local dev machine) + .NOTES #> [CmdletBinding(PositionalBinding=$false)] @@ -41,7 +45,8 @@ Param ( [switch] $Force = $False, [int] $DownloadRetries = 5, [int] $RetryWaitTimeInSeconds = 30, - [string] $GlobalJsonFile + [string] $GlobalJsonFile, + [switch] $PathPromotion ) if (!$GlobalJsonFile) { @@ -77,53 +82,97 @@ try { ConvertFrom-Json | Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue if ($NativeTools) { - $NativeTools.PSObject.Properties | ForEach-Object { - $ToolName = $_.Name - $ToolVersion = $_.Value - $LocalInstallerArguments = @{ ToolName = "$ToolName" } - $LocalInstallerArguments += @{ InstallPath = "$InstallBin" } - $LocalInstallerArguments += @{ BaseUri = "$BaseUri" } - $LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" } - $LocalInstallerArguments += @{ Version = "$ToolVersion" } - - if ($Verbose) { - $LocalInstallerArguments += @{ Verbose = $True } - } - if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') { - if($Force) { - $LocalInstallerArguments += @{ Force = $True } - } - } - if ($Clean) { - $LocalInstallerArguments += @{ Clean = $True } - } - - Write-Verbose "Installing $ToolName version $ToolVersion" - Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'" - & $InstallerPath @LocalInstallerArguments - if ($LASTEXITCODE -Ne "0") { - $errMsg = "$ToolName installation failed" - if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) { - $showNativeToolsWarning = $true - if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) { - $showNativeToolsWarning = $false + if ($PathPromotion -eq $True) { + if ($env:SYSTEM_TEAMPROJECT) { # check to see if we're in an Azure pipelines build + $NativeTools.PSObject.Properties | ForEach-Object { + $ToolName = $_.Name + $ToolVersion = $_.Value + + if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) { + if ($ToolVersion -eq "latest") { + $ToolVersion = "" + } + $ArcadeToolsDirectory = "C:\arcade-tools" + if (Test-Path $ArcadeToolsDirectory -eq $False) { + Write-Error "Arcade tools directory '$ArcadeToolsDirectory' was not found; artifacts were not properly installed." + exit 1 } - if ($showNativeToolsWarning) { - Write-Warning $errMsg + $ToolDirectory = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending)[0] + if ([string]::IsNullOrWhiteSpace($ToolDirectory)) { + Write-Error "Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image." + exit 1 } - $toolInstallationFailure = $true - } else { - # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 - Write-Host $errMsg - exit 1 + $BinPathFile = "$($ToolDirectory.FullName)\binpath.txt" + if (Test-Path -Path "$BinPathFile" -eq $False) { + Write-Error "Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool." + exit 1 + } + $BinPath = Get-Content "$BinPathFile" + Write-Host "Adding $ToolName to the path ($(Convert-Path -Path $BinPath))..." + Write-Host "##vso[task.prependpath]$(Convert-Path -Path $BinPath)" + } + } + exit 0 + } else { + $NativeTools.PSObject.Properties | ForEach-Object { + $ToolName = $_.Name + $ToolVersion = $_.Value + + if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) { + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding." + } } + exit 0 + } + } else { + $NativeTools.PSObject.Properties | ForEach-Object { + $ToolName = $_.Name + $ToolVersion = $_.Value + $LocalInstallerArguments = @{ ToolName = "$ToolName" } + $LocalInstallerArguments += @{ InstallPath = "$InstallBin" } + $LocalInstallerArguments += @{ BaseUri = "$BaseUri" } + $LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" } + $LocalInstallerArguments += @{ Version = "$ToolVersion" } + + if ($Verbose) { + $LocalInstallerArguments += @{ Verbose = $True } + } + if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') { + if($Force) { + $LocalInstallerArguments += @{ Force = $True } + } + } + if ($Clean) { + $LocalInstallerArguments += @{ Clean = $True } + } + + Write-Verbose "Installing $ToolName version $ToolVersion" + Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'" + & $InstallerPath @LocalInstallerArguments + if ($LASTEXITCODE -Ne "0") { + $errMsg = "$ToolName installation failed" + if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) { + $showNativeToolsWarning = $true + if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) { + $showNativeToolsWarning = $false + } + if ($showNativeToolsWarning) { + Write-Warning $errMsg + } + $toolInstallationFailure = $true + } else { + # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 + Write-Host $errMsg + exit 1 + } + } + } + + if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) { + # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 + Write-Host 'Native tools bootstrap failed' + exit 1 } - } - - if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) { - # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 - Write-Host 'Native tools bootstrap failed' - exit 1 } } else { diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index d91bf9147116f0..1cbb6a0c560038 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -23,23 +23,33 @@ parameters: # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing publishUsingPipelines: false + # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing + publishAssetsImmediately: false + + artifactsPublishingAdditionalParameters: '' + + signingValidationAdditionalParameters: '' + jobs: - job: Asset_Registry_Publish dependsOn: ${{ parameters.dependsOn }} - displayName: Publish to Build Asset Registry + ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + displayName: Publish Assets + ${{ else }}: + displayName: Publish to Build Asset Registry pool: ${{ parameters.pool }} variables: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: _BuildConfig - value: ${{ parameters.configuration }} - group: Publish-Build-Assets - group: AzureDevOps-Artifact-Feeds-Pats - name: runCodesignValidationInjection value: false + - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + - template: /eng/common/templates/post-build/common-variables.yml steps: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: @@ -52,14 +62,13 @@ jobs: condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: NuGetAuthenticate@0 + - task: NuGetAuthenticate@0 - - task: PowerShell@2 - displayName: Enable cross-org NuGet feed authentication - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw) + - task: PowerShell@2 + displayName: Enable cross-org NuGet feed authentication + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw) - task: PowerShell@2 displayName: Publish Build Assets @@ -70,7 +79,6 @@ jobs: /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} - /p:Configuration=$(_BuildConfig) /p:OfficialBuildId=$(Build.BuildNumber) condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} @@ -114,7 +122,25 @@ jobs: PathtoPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' PublishLocation: Container ArtifactName: ReleaseConfigs - + + - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + - template: /eng/common/templates/post-build/setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + + - task: PowerShell@2 + displayName: Publish Using Darc + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: -BuildId $(BARBuildId) + -PublishingInfraVersion 3 + -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' + -MaestroToken '$(MaestroApiAccessToken)' + -WaitPublishingFinish true + -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' + -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' + - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: - template: /eng/common/templates/steps/publish-logs.yml parameters: diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index 554e71cfc436dd..2cca53c2d1d531 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -27,6 +27,13 @@ parameters: # Optional: Override automatically derived dependsOn value for "publish build assets" job publishBuildAssetsDependsOn: '' + # Optional: Publish the assets as soon as the publish to BAR stage is complete, rather doing so in a separate stage. + publishAssetsImmediately: false + + # Optional: If using publishAssetsImmediately and additional parameters are needed, can be used to send along additional parameters (normally sent to post-build.yml) + artifactsPublishingAdditionalParameters: '' + signingValidationAdditionalParameters: '' + # Optional: should run as a public build even in the internal project # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. runAsPublic: false @@ -68,7 +75,6 @@ jobs: ${{ parameter.key }}: ${{ parameter.value }} - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: - template: ../job/publish-build-assets.yml parameters: @@ -94,4 +100,7 @@ jobs: runAsPublic: ${{ parameters.runAsPublic }} publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} + publishAssetsImmediately: ${{ parameters.publishAssetsImmediately }} enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 2f176571f020cf..5a9056f6b2fb50 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -82,6 +82,11 @@ parameters: default: - Validate + # Optional: Call asset publishing rather than running in a separate stage + - name: publishAssetsImmediately + type: boolean + default: false + stages: - ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: - stage: Validate @@ -99,7 +104,7 @@ stages: name: VSEngSS-MicroBuild2022-1ES demands: Cmd # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + ${{ else }}: name: NetCore1ESPool-Internal demands: ImageOverride -equals Build.Server.Amd64.VS2019 @@ -136,7 +141,7 @@ stages: name: VSEngSS-MicroBuild2022-1ES demands: Cmd # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + ${{ else }}: name: NetCore1ESPool-Internal demands: ImageOverride -equals Build.Server.Amd64.VS2019 steps: @@ -196,7 +201,7 @@ stages: name: VSEngSS-MicroBuild2022-1ES demands: Cmd # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + ${{ else }}: name: NetCore1ESPool-Internal demands: ImageOverride -equals Build.Server.Amd64.VS2019 steps: @@ -235,43 +240,44 @@ stages: artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} downloadArtifacts: ${{ parameters.SDLValidationParameters.downloadArtifacts }} -- stage: publish_using_darc - ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: - dependsOn: ${{ parameters.publishDependsOn }} - ${{ if and(ne(parameters.enableNugetValidation, 'true'), ne(parameters.enableSigningValidation, 'true'), ne(parameters.enableSourceLinkValidation, 'true'), ne(parameters.SDLValidationParameters.enable, 'true')) }}: - dependsOn: ${{ parameters.validateDependsOn }} - displayName: Publish using Darc - variables: - - template: common-variables.yml - jobs: - - job: - displayName: Publish Using Darc - timeoutInMinutes: 120 - pool: - # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) +- ${{ if ne(parameters.publishAssetsImmediately, 'true') }}: + - stage: publish_using_darc + ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: + dependsOn: ${{ parameters.publishDependsOn }} + ${{ else }}: + dependsOn: ${{ parameters.validateDependsOn }} + displayName: Publish using Darc + variables: + - template: common-variables.yml + jobs: + - job: + displayName: Publish Using Darc + timeoutInMinutes: 120 + pool: + # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: name: VSEngSS-MicroBuild2022-1ES demands: Cmd # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + ${{ else }}: name: NetCore1ESPool-Internal demands: ImageOverride -equals Build.Server.Amd64.VS2019 - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + steps: + - template: setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - task: NuGetAuthenticate@0 + - task: NuGetAuthenticate@0 - - task: PowerShell@2 - displayName: Publish Using Darc - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) - -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} - -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' - -WaitPublishingFinish true - -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' - -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' \ No newline at end of file + - task: PowerShell@2 + displayName: Publish Using Darc + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: -BuildId $(BARBuildId) + -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} + -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' + -MaestroToken '$(MaestroApiAccessToken)' + -WaitPublishingFinish true + -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' + -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' \ No newline at end of file diff --git a/global.json b/global.json index bb908a3d373dd8..ae0229a4fd31b0 100644 --- a/global.json +++ b/global.json @@ -1,18 +1,18 @@ { "sdk": { - "version": "6.0.100", + "version": "7.0.100-preview.2.22153.17", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "6.0.100" + "dotnet": "7.0.100-preview.2.22153.17" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22179.1", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22179.1", - "Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.22179.1", + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22206.10", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22206.10", + "Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.22206.10", "Microsoft.Build.NoTargets": "3.3.0", "Microsoft.Build.Traversal": "3.1.6", - "Microsoft.NET.Sdk.IL": "7.0.0-preview.3.22171.1" + "Microsoft.NET.Sdk.IL": "7.0.0-preview.4.22201.3" } }