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
74 changes: 37 additions & 37 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,84 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<Source Uri="https://github.com/dotnet/dotnet" Mapping="efcore" Sha="170498a9429a5553fe7ac0ec2341d19bbb97cbe8" BarId="268722" />
<Source Uri="https://github.com/dotnet/dotnet" Mapping="efcore" Sha="d60c3fe894af16cd15dc86420af0fc9d02be4997" BarId="268973" />
<ProductDependencies>
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Configuration" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.Extensions.Configuration" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.Extensions.Logging" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<!--
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
All Runtime.$rid packages should have the same version.
-->
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="10.0.0-preview.5.25267.102">
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="10.0.0-preview.5.25267.102">
<Dependency Name="System.Text.Json" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="System.Text.Encodings.Web" Version="10.0.0-preview.5.25267.102">
<Dependency Name="System.Text.Encodings.Web" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="System.Formats.Asn1" Version="10.0.0-preview.5.25267.102">
<Dependency Name="System.Formats.Asn1" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="System.Runtime.Caching" Version="10.0.0-preview.5.25267.102">
<Dependency Name="System.Runtime.Caching" Version="10.0.0-preview.5.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25267.102">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="10.0.0-beta.25267.102">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="10.0.0-beta.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.25267.102">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="10.0.0-beta.25269.109">
<Uri>https://github.com/dotnet/dotnet</Uri>
<Sha>170498a9429a5553fe7ac0ec2341d19bbb97cbe8</Sha>
<Sha>d60c3fe894af16cd15dc86420af0fc9d02be4997</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
32 changes: 16 additions & 16 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@
<UsingToolXliff>False</UsingToolXliff>
</PropertyGroup>
<PropertyGroup Label="Dependencies from dotnet/runtime">
<MicrosoftExtensionsCachingMemoryVersion>10.0.0-preview.5.25267.102</MicrosoftExtensionsCachingMemoryVersion>
<MicrosoftExtensionsConfigurationVersion>10.0.0-preview.5.25267.102</MicrosoftExtensionsConfigurationVersion>
<MicrosoftExtensionsConfigurationAbstractionsVersion>10.0.0-preview.5.25267.102</MicrosoftExtensionsConfigurationAbstractionsVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>10.0.0-preview.5.25267.102</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
<MicrosoftExtensionsConfigurationJsonVersion>10.0.0-preview.5.25267.102</MicrosoftExtensionsConfigurationJsonVersion>
<MicrosoftExtensionsDependencyInjectionVersion>10.0.0-preview.5.25267.102</MicrosoftExtensionsDependencyInjectionVersion>
<MicrosoftExtensionsDependencyModelVersion>10.0.0-preview.5.25267.102</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesVersion>10.0.0-preview.5.25267.102</MicrosoftExtensionsHostFactoryResolverSourcesVersion>
<MicrosoftExtensionsLoggingVersion>10.0.0-preview.5.25267.102</MicrosoftExtensionsLoggingVersion>
<MicrosoftNETCoreAppRefVersion>10.0.0-preview.5.25267.102</MicrosoftNETCoreAppRefVersion>
<MicrosoftNETCoreAppRuntimewinx64Version>10.0.0-preview.5.25267.102</MicrosoftNETCoreAppRuntimewinx64Version>
<SystemTextEncodingsWebVersion>10.0.0-preview.5.25267.102</SystemTextEncodingsWebVersion>
<SystemTextJsonVersion>10.0.0-preview.5.25267.102</SystemTextJsonVersion>
<SystemFormatsAsn1Version>10.0.0-preview.5.25267.102</SystemFormatsAsn1Version>
<SystemRuntimeCachingVersion>10.0.0-preview.5.25267.102</SystemRuntimeCachingVersion>
<MicrosoftExtensionsCachingMemoryVersion>10.0.0-preview.5.25269.109</MicrosoftExtensionsCachingMemoryVersion>
<MicrosoftExtensionsConfigurationVersion>10.0.0-preview.5.25269.109</MicrosoftExtensionsConfigurationVersion>
<MicrosoftExtensionsConfigurationAbstractionsVersion>10.0.0-preview.5.25269.109</MicrosoftExtensionsConfigurationAbstractionsVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>10.0.0-preview.5.25269.109</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
<MicrosoftExtensionsConfigurationJsonVersion>10.0.0-preview.5.25269.109</MicrosoftExtensionsConfigurationJsonVersion>
<MicrosoftExtensionsDependencyInjectionVersion>10.0.0-preview.5.25269.109</MicrosoftExtensionsDependencyInjectionVersion>
<MicrosoftExtensionsDependencyModelVersion>10.0.0-preview.5.25269.109</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesVersion>10.0.0-preview.5.25269.109</MicrosoftExtensionsHostFactoryResolverSourcesVersion>
<MicrosoftExtensionsLoggingVersion>10.0.0-preview.5.25269.109</MicrosoftExtensionsLoggingVersion>
<MicrosoftNETCoreAppRefVersion>10.0.0-preview.5.25269.109</MicrosoftNETCoreAppRefVersion>
<MicrosoftNETCoreAppRuntimewinx64Version>10.0.0-preview.5.25269.109</MicrosoftNETCoreAppRuntimewinx64Version>
<SystemTextEncodingsWebVersion>10.0.0-preview.5.25269.109</SystemTextEncodingsWebVersion>
<SystemTextJsonVersion>10.0.0-preview.5.25269.109</SystemTextJsonVersion>
<SystemFormatsAsn1Version>10.0.0-preview.5.25269.109</SystemFormatsAsn1Version>
<SystemRuntimeCachingVersion>10.0.0-preview.5.25269.109</SystemRuntimeCachingVersion>
</PropertyGroup>
<PropertyGroup Label="Dependencies from dotnet/arcade">
<MicrosoftDotNetBuildTasksTemplatingVersion>10.0.0-beta.25267.102</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>10.0.0-beta.25269.109</MicrosoftDotNetBuildTasksTemplatingVersion>
</PropertyGroup>
<PropertyGroup Label="Other dependencies">
<MicrosoftBuildFrameworkVersion>17.14.8</MicrosoftBuildFrameworkVersion>
Expand Down
207 changes: 207 additions & 0 deletions eng/common/templates/steps/vmr-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
### These steps synchronize new code from product repositories into the VMR (https://github.com/dotnet/dotnet).
### They initialize the darc CLI and pull the new updates.
### Changes are applied locally onto the already cloned VMR (located in $vmrPath).

parameters:
- name: targetRef
displayName: Target revision in dotnet/<repo> to synchronize
type: string
default: $(Build.SourceVersion)

- name: vmrPath
displayName: Path where the dotnet/dotnet is checked out to
type: string
default: $(Agent.BuildDirectory)/vmr

- name: additionalSyncs
displayName: Optional list of package names whose repo's source will also be synchronized in the local VMR, e.g. NuGet.Protocol
type: object
default: []

steps:
- checkout: vmr
displayName: Clone dotnet/dotnet
path: vmr
clean: true

- checkout: self
displayName: Clone $(Build.Repository.Name)
path: repo
fetchDepth: 0

# This step is needed so that when we get a detached HEAD / shallow clone,
# we still pull the commit into the temporary repo clone to use it during the sync.
# Also unshallow the clone so that forwardflow command would work.
- script: |
git branch repo-head
git rev-parse HEAD
displayName: Label PR commit
workingDirectory: $(Agent.BuildDirectory)/repo

- script: |
vmr_sha=$(grep -oP '(?<=Sha=")[^"]*' $(Agent.BuildDirectory)/repo/eng/Version.Details.xml)
echo "##vso[task.setvariable variable=vmr_sha]$vmr_sha"
displayName: Obtain the vmr sha from Version.Details.xml (Unix)
condition: ne(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/repo

- powershell: |
[xml]$xml = Get-Content -Path $(Agent.BuildDirectory)/repo/eng/Version.Details.xml
$vmr_sha = $xml.SelectSingleNode("//Source").Sha
Write-Output "##vso[task.setvariable variable=vmr_sha]$vmr_sha"
displayName: Obtain the vmr sha from Version.Details.xml (Windows)
condition: eq(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/repo

- script: |
git fetch --all
git checkout $(vmr_sha)
displayName: Checkout VMR at correct sha for repo flow
workingDirectory: ${{ parameters.vmrPath }}

- script: |
git config --global user.name "dotnet-maestro[bot]"
git config --global user.email "dotnet-maestro[bot]@users.noreply.github.com"
displayName: Set git author to dotnet-maestro[bot]
workingDirectory: ${{ parameters.vmrPath }}

- script: |
./eng/common/vmr-sync.sh \
--vmr ${{ parameters.vmrPath }} \
--tmp $(Agent.TempDirectory) \
--azdev-pat '$(dn-bot-all-orgs-code-r)' \
--ci \
--debug

if [ "$?" -ne 0 ]; then
echo "##vso[task.logissue type=error]Failed to synchronize the VMR"
exit 1
fi
displayName: Sync repo into VMR (Unix)
condition: ne(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/repo

- script: |
git config --global diff.astextplain.textconv echo
git config --system core.longpaths true
displayName: Configure Windows git (longpaths, astextplain)
condition: eq(variables['Agent.OS'], 'Windows_NT')

- powershell: |
./eng/common/vmr-sync.ps1 `
-vmr ${{ parameters.vmrPath }} `
-tmp $(Agent.TempDirectory) `
-azdevPat '$(dn-bot-all-orgs-code-r)' `
-ci `
-debugOutput

if ($LASTEXITCODE -ne 0) {
echo "##vso[task.logissue type=error]Failed to synchronize the VMR"
exit 1
}
displayName: Sync repo into VMR (Windows)
condition: eq(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/repo

- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- task: CopyFiles@2
displayName: Collect failed patches
condition: failed()
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: '*.patch'
TargetFolder: '$(Build.ArtifactStagingDirectory)/FailedPatches'

- publish: '$(Build.ArtifactStagingDirectory)/FailedPatches'
artifact: $(System.JobDisplayName)_FailedPatches
displayName: Upload failed patches
condition: failed()

- ${{ each assetName in parameters.additionalSyncs }}:
# The vmr-sync script ends up staging files in the local VMR so we have to commit those
- script:
git commit --allow-empty -am "Forward-flow $(Build.Repository.Name)"
displayName: Commit local VMR changes
workingDirectory: ${{ parameters.vmrPath }}

- script: |
set -ex

echo "Searching for details of asset ${{ assetName }}..."

# Use darc to get dependencies information
dependencies=$(./.dotnet/dotnet darc get-dependencies --name '${{ assetName }}' --ci)

# Extract repository URL and commit hash
repository=$(echo "$dependencies" | grep 'Repo:' | sed 's/Repo:[[:space:]]*//' | head -1)

if [ -z "$repository" ]; then
echo "##vso[task.logissue type=error]Asset ${{ assetName }} not found in the dependency list"
exit 1
fi

commit=$(echo "$dependencies" | grep 'Commit:' | sed 's/Commit:[[:space:]]*//' | head -1)

echo "Updating the VMR from $repository / $commit..."
cd ..
git clone $repository ${{ assetName }}
cd ${{ assetName }}
git checkout $commit
git branch "sync/$commit"

./eng/common/vmr-sync.sh \
--vmr ${{ parameters.vmrPath }} \
--tmp $(Agent.TempDirectory) \
--azdev-pat '$(dn-bot-all-orgs-code-r)' \
--ci \
--debug

if [ "$?" -ne 0 ]; then
echo "##vso[task.logissue type=error]Failed to synchronize the VMR"
exit 1
fi
displayName: Sync ${{ assetName }} into (Unix)
condition: ne(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/repo

- powershell: |
$ErrorActionPreference = 'Stop'

Write-Host "Searching for details of asset ${{ assetName }}..."

$dependencies = .\.dotnet\dotnet darc get-dependencies --name '${{ assetName }}' --ci

$repository = $dependencies | Select-String -Pattern 'Repo:\s+([^\s]+)' | Select-Object -First 1
$repository -match 'Repo:\s+([^\s]+)' | Out-Null
$repository = $matches[1]

if ($repository -eq $null) {
Write-Error "Asset ${{ assetName }} not found in the dependency list"
exit 1
}

$commit = $dependencies | Select-String -Pattern 'Commit:\s+([^\s]+)' | Select-Object -First 1
$commit -match 'Commit:\s+([^\s]+)' | Out-Null
$commit = $matches[1]

Write-Host "Updating the VMR from $repository / $commit..."
cd ..
git clone $repository ${{ assetName }}
cd ${{ assetName }}
git checkout $commit
git branch "sync/$commit"

.\eng\common\vmr-sync.ps1 `
-vmr ${{ parameters.vmrPath }} `
-tmp $(Agent.TempDirectory) `
-azdevPat '$(dn-bot-all-orgs-code-r)' `
-ci `
-debugOutput

if ($LASTEXITCODE -ne 0) {
echo "##vso[task.logissue type=error]Failed to synchronize the VMR"
exit 1
}
displayName: Sync ${{ assetName }} into (Windows)
condition: ne(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/repo
Loading