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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
<!-- Begin: Package sources from dotnet-extensions -->
<!-- End: Package sources from dotnet-extensions -->
<!-- Begin: Package sources from dotnet-efcore -->
<add key="darc-int-dotnet-efcore-a947fe2" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-a947fe22/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-efcore -->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-int-dotnet-runtime-574100b" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-574100b6/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-runtime -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
Expand All @@ -30,10 +28,8 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-efcore -->
<add key="darc-int-dotnet-efcore-a947fe2" value="true" />
<!-- End: Package sources from dotnet-efcore -->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-int-dotnet-runtime-574100b" value="true" />
<!-- End: Package sources from dotnet-runtime -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
</disabledPackageSources>
Expand Down
20 changes: 10 additions & 10 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -376,26 +376,26 @@
<Uri>https://github.com/dotnet/winforms</Uri>
<Sha>abda8e3bfa78319363526b5a5f86863ec979940e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.25407.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.25504.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a5ec3fab69ac440afe6764b2e046af6e8fcafa74</Sha>
<Sha>3edea53c9b10e4bc63de863d71a05d47d9bb5b69</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.25407.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.25504.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a5ec3fab69ac440afe6764b2e046af6e8fcafa74</Sha>
<Sha>3edea53c9b10e4bc63de863d71a05d47d9bb5b69</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.25407.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.25504.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a5ec3fab69ac440afe6764b2e046af6e8fcafa74</Sha>
<Sha>3edea53c9b10e4bc63de863d71a05d47d9bb5b69</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.25407.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.25504.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a5ec3fab69ac440afe6764b2e046af6e8fcafa74</Sha>
<Sha>3edea53c9b10e4bc63de863d71a05d47d9bb5b69</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="8.0.0-beta.25407.1">
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="8.0.0-beta.25504.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a5ec3fab69ac440afe6764b2e046af6e8fcafa74</Sha>
<Sha>3edea53c9b10e4bc63de863d71a05d47d9bb5b69</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Diagnostics.Testing" Version="9.0.0-preview.9.24518.1">
<Uri>https://github.com/dotnet/extensions</Uri>
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@
<NuGetVersioningVersion>6.2.4</NuGetVersioningVersion>
<NuGetFrameworksVersion>6.2.4</NuGetFrameworksVersion>
<!-- Packages from dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersVersion>8.0.0-beta.25407.1</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.25407.1</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.25407.1</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>8.0.0-beta.25504.1</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.25504.1</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.25504.1</MicrosoftDotNetRemoteExecutorVersion>
<!-- Packages from dotnet/source-build-externals -->
<MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.25202.2</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
<!-- Packages from dotnet/source-build-reference-packages -->
Expand Down
4 changes: 2 additions & 2 deletions eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# displayName: Setup Private Feeds Credentials
# condition: eq(variables['Agent.OS'], 'Windows_NT')
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)

Expand Down
4 changes: 2 additions & 2 deletions eng/common/SetupNugetSources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# - task: Bash@3
# displayName: Setup Private Feeds Credentials
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh
# arguments: $(System.DefaultWorkingDirectory)/NuGet.config $Token
# condition: ne(variables['Agent.OS'], 'Windows_NT')
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
Expand Down
11 changes: 2 additions & 9 deletions eng/common/post-build/nuget-validation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,13 @@
# tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage

param(
[Parameter(Mandatory=$true)][string] $PackagesPath, # Path to where the packages to be validated are
[Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
[Parameter(Mandatory=$true)][string] $PackagesPath # Path to where the packages to be validated are
)

try {
. $PSScriptRoot\post-build-utils.ps1

$url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1'

New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force

Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1

& ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg
& $PSScriptRoot\nuget-verification.ps1 ${PackagesPath}\*.nupkg
}
catch {
Write-Host $_.ScriptStackTrace
Expand Down
121 changes: 121 additions & 0 deletions eng/common/post-build/nuget-verification.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<#
.SYNOPSIS
Verifies that Microsoft NuGet packages have proper metadata.
.DESCRIPTION
Downloads a verification tool and runs metadata validation on the provided NuGet packages. This script writes an
error if any of the provided packages fail validation. All arguments provided to this PowerShell script that do not
match PowerShell parameters are passed on to the verification tool downloaded during the execution of this script.
.PARAMETER NuGetExePath
The path to the nuget.exe binary to use. If not provided, nuget.exe will be downloaded into the -DownloadPath
directory.
.PARAMETER PackageSource
The package source to use to download the verification tool. If not provided, nuget.org will be used.
.PARAMETER DownloadPath
The directory path to download the verification tool and nuget.exe to. If not provided,
%TEMP%\NuGet.VerifyNuGetPackage will be used.
.PARAMETER args
Arguments that will be passed to the verification tool.
.EXAMPLE
PS> .\verify.ps1 *.nupkg
Verifies the metadata of all .nupkg files in the currect working directory.
.EXAMPLE
PS> .\verify.ps1 --help
Displays the help text of the downloaded verifiction tool.
.LINK
https://github.com/NuGet/NuGetGallery/blob/master/src/VerifyMicrosoftPackage/README.md
#>

# This script was copied from https://github.com/NuGet/NuGetGallery/blob/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1

[CmdletBinding(PositionalBinding = $false)]
param(
[string]$NuGetExePath,
[string]$PackageSource = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json",
[string]$DownloadPath,
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$args
)

# The URL to download nuget.exe.
$nugetExeUrl = "https://dist.nuget.org/win-x86-commandline/v4.9.4/nuget.exe"

# The package ID of the verification tool.
$packageId = "NuGet.VerifyMicrosoftPackage"

# The location that nuget.exe and the verification tool will be downloaded to.
if (!$DownloadPath) {
$DownloadPath = (Join-Path $env:TEMP "NuGet.VerifyMicrosoftPackage")
}

$fence = New-Object -TypeName string -ArgumentList '=', 80

# Create the download directory, if it doesn't already exist.
if (!(Test-Path $DownloadPath)) {
New-Item -ItemType Directory $DownloadPath | Out-Null
}
Write-Host "Using download path: $DownloadPath"

if ($NuGetExePath) {
$nuget = $NuGetExePath
} else {
$downloadedNuGetExe = Join-Path $DownloadPath "nuget.exe"

# Download nuget.exe, if it doesn't already exist.
if (!(Test-Path $downloadedNuGetExe)) {
Write-Host "Downloading nuget.exe from $nugetExeUrl..."
$ProgressPreference = 'SilentlyContinue'
try {
Invoke-WebRequest $nugetExeUrl -OutFile $downloadedNuGetExe
$ProgressPreference = 'Continue'
} catch {
$ProgressPreference = 'Continue'
Write-Error $_
Write-Error "nuget.exe failed to download."
exit
}
}

$nuget = $downloadedNuGetExe
}

Write-Host "Using nuget.exe path: $nuget"
Write-Host " "

# Download the latest version of the verification tool.
Write-Host "Downloading the latest version of $packageId from $packageSource..."
Write-Host $fence
& $nuget install $packageId `
-Prerelease `
-OutputDirectory $DownloadPath `
-Source $PackageSource
Write-Host $fence
Write-Host " "

if ($LASTEXITCODE -ne 0) {
Write-Error "nuget.exe failed to fetch the verify tool."
exit
}

# Find the most recently downloaded tool
Write-Host "Finding the most recently downloaded verification tool."
$verifyProbePath = Join-Path $DownloadPath "$packageId.*"
$verifyPath = Get-ChildItem -Path $verifyProbePath -Directory `
| Sort-Object -Property LastWriteTime -Descending `
| Select-Object -First 1
$verify = Join-Path $verifyPath "tools\NuGet.VerifyMicrosoftPackage.exe"
Write-Host "Using verification tool: $verify"
Write-Host " "

# Execute the verification tool.
Write-Host "Executing the verify tool..."
Write-Host $fence
& $verify $args
Write-Host $fence
Write-Host " "

# Respond to the exit code.
if ($LASTEXITCODE -ne 0) {
Write-Error "The verify tool found some problems."
} else {
Write-Output "The verify tool succeeded."
}
12 changes: 6 additions & 6 deletions eng/common/templates-official/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ parameters:
# Sbom related params
enableSbom: true
PackageVersion: 7.0.0
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts'
ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom

jobs:
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
inputs:
languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }}
environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'production') }}
richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin
richNavLogOutputDirectory: $(System.DefaultWorkingDirectory)/artifacts/bin
uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }}
continueOnError: true

Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
- task: 1ES.PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
PathtoPublish: '$(System.DefaultWorkingDirectory)/artifacts/log/$(_BuildConfig)'
PublishLocation: Container
ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }}
continueOnError: true
Expand All @@ -238,7 +238,7 @@ jobs:
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)'
testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit
mergeTestResults: ${{ parameters.mergeTestResults }}
continueOnError: true
Expand All @@ -249,7 +249,7 @@ jobs:
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '*.trx'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)'
testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx
mergeTestResults: ${{ parameters.mergeTestResults }}
continueOnError: true
Expand All @@ -265,7 +265,7 @@ jobs:
- ${{ if eq(parameters.enableBuildRetry, 'true') }}:
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration'
targetPath: '$(System.DefaultWorkingDirectory)\eng\common\BuildConfiguration'
artifactName: 'BuildConfiguration'
displayName: 'Publish build retry configuration'
continueOnError: true
6 changes: 3 additions & 3 deletions eng/common/templates-official/job/onelocbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:
CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
GithubPat: $(BotAccount-dotnet-bot-repo-PAT)

SourcesDirectory: $(Build.SourcesDirectory)
SourcesDirectory: $(System.DefaultWorkingDirectory)
CreatePr: true
AutoCompletePr: false
ReusePr: true
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}:
- task: Powershell@2
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1
filePath: $(System.DefaultWorkingDirectory)/eng/common/generate-locproject.ps1
arguments: $(_GenerateLocProjectArguments)
displayName: Generate LocProject.json
condition: ${{ parameters.condition }}
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
- task: 1ES.PublishBuildArtifacts@1
displayName: Publish LocProject.json
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/eng/Localize/'
PathtoPublish: '$(System.DefaultWorkingDirectory)/eng/Localize/'
PublishLocation: Container
ArtifactName: Loc
condition: ${{ parameters.condition }}
22 changes: 17 additions & 5 deletions eng/common/templates-official/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ parameters:

signingValidationAdditionalParameters: ''

repositoryAlias: self

officialBuildId: ''

jobs:
- job: Asset_Registry_Publish

Expand All @@ -50,6 +54,11 @@ jobs:
value: false
- ${{ if eq(parameters.publishAssetsImmediately, 'true') }}:
- template: /eng/common/templates-official/post-build/common-variables.yml
- name: OfficialBuildId
${{ if ne(parameters.officialBuildId, '') }}:
value: ${{ parameters.officialBuildId }}
${{ else }}:
value: $(Build.BuildNumber)

pool:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
Expand All @@ -65,6 +74,9 @@ jobs:
os: windows
steps:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- checkout: ${{ parameters.repositoryAlias }}
fetchDepth: 3
clean: true
- task: DownloadBuildArtifacts@0
displayName: Download artifact
inputs:
Expand All @@ -82,13 +94,13 @@ jobs:
azureSubscription: "Darc: Maestro Production"
scriptType: ps
scriptLocation: scriptPath
scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1
scriptPath: $(System.DefaultWorkingDirectory)/eng/common/sdk-task.ps1
arguments: >
-task PublishBuildAssets -restore -msbuildEngine dotnet
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
/p:MaestroApiEndpoint=https://maestro.dot.net
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
/p:OfficialBuildId=$(Build.BuildNumber)
/p:OfficialBuildId=$(OfficialBuildId)
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}

Expand All @@ -115,7 +127,7 @@ jobs:
inputs:
targetType: inline
script: |
$symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt"
$symbolExclusionfile = "$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt"
if(Test-Path -Path $symbolExclusionfile)
{
Write-Host "SymbolExclusionFile exists"
Expand All @@ -130,7 +142,7 @@ jobs:
displayName: Publish SymbolPublishingExclusionsFile Artifact
condition: eq(variables['SymbolExclusionFile'], 'true')
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
PathtoPublish: '$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt'
PublishLocation: Container
ArtifactName: ReleaseConfigs

Expand All @@ -146,7 +158,7 @@ jobs:
azureSubscription: "Darc: Maestro Production"
scriptType: ps
scriptLocation: scriptPath
scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1
scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1
arguments: -BuildId $(BARBuildId)
-PublishingInfraVersion 3
-AzdoToken '$(System.AccessToken)'
Expand Down
Loading
Loading