Skip to content

Commit afc0577

Browse files
Update dependencies from https://github.com/dotnet/dotnet build 268973
No dependency updates to commit
1 parent 913a52c commit afc0577

File tree

9 files changed

+866
-283
lines changed

9 files changed

+866
-283
lines changed

eng/Version.Details.xml

Lines changed: 185 additions & 185 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 89 additions & 89 deletions
Large diffs are not rendered by default.

eng/common/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function Build {
127127
/p:Deploy=$deploy `
128128
/p:Test=$test `
129129
/p:Pack=$pack `
130-
/p:DotNetBuildRepo=$productBuild `
130+
/p:DotNetBuild=$productBuild `
131131
/p:IntegrationTest=$integrationTest `
132132
/p:PerformanceTest=$performanceTest `
133133
/p:Sign=$sign `

eng/common/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ while [[ $# > 0 ]]; do
129129
-pack)
130130
pack=true
131131
;;
132-
-sourcebuild|-sb)
132+
-sourcebuild|-source-build|-sb)
133133
build=true
134134
source_build=true
135135
product_build=true
136136
restore=true
137137
pack=true
138138
;;
139-
-productbuild|-pb)
139+
-productbuild|-product-build|-pb)
140140
build=true
141141
product_build=true
142142
restore=true
@@ -241,7 +241,7 @@ function Build {
241241
/p:RepoRoot="$repo_root" \
242242
/p:Restore=$restore \
243243
/p:Build=$build \
244-
/p:DotNetBuildRepo=$product_build \
244+
/p:DotNetBuild=$product_build \
245245
/p:DotNetBuildSourceOnly=$source_build \
246246
/p:Rebuild=$rebuild \
247247
/p:Test=$test \
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
### These steps synchronize new code from product repositories into the VMR (https://github.com/dotnet/dotnet).
2+
### They initialize the darc CLI and pull the new updates.
3+
### Changes are applied locally onto the already cloned VMR (located in $vmrPath).
4+
5+
parameters:
6+
- name: targetRef
7+
displayName: Target revision in dotnet/<repo> to synchronize
8+
type: string
9+
default: $(Build.SourceVersion)
10+
11+
- name: vmrPath
12+
displayName: Path where the dotnet/dotnet is checked out to
13+
type: string
14+
default: $(Agent.BuildDirectory)/vmr
15+
16+
- name: additionalSyncs
17+
displayName: Optional list of package names whose repo's source will also be synchronized in the local VMR, e.g. NuGet.Protocol
18+
type: object
19+
default: []
20+
21+
steps:
22+
- checkout: vmr
23+
displayName: Clone dotnet/dotnet
24+
path: vmr
25+
clean: true
26+
27+
- checkout: self
28+
displayName: Clone $(Build.Repository.Name)
29+
path: repo
30+
fetchDepth: 0
31+
32+
# This step is needed so that when we get a detached HEAD / shallow clone,
33+
# we still pull the commit into the temporary repo clone to use it during the sync.
34+
# Also unshallow the clone so that forwardflow command would work.
35+
- script: |
36+
git branch repo-head
37+
git rev-parse HEAD
38+
displayName: Label PR commit
39+
workingDirectory: $(Agent.BuildDirectory)/repo
40+
41+
- script: |
42+
vmr_sha=$(grep -oP '(?<=Sha=")[^"]*' $(Agent.BuildDirectory)/repo/eng/Version.Details.xml)
43+
echo "##vso[task.setvariable variable=vmr_sha]$vmr_sha"
44+
displayName: Obtain the vmr sha from Version.Details.xml (Unix)
45+
condition: ne(variables['Agent.OS'], 'Windows_NT')
46+
workingDirectory: $(Agent.BuildDirectory)/repo
47+
48+
- powershell: |
49+
[xml]$xml = Get-Content -Path $(Agent.BuildDirectory)/repo/eng/Version.Details.xml
50+
$vmr_sha = $xml.SelectSingleNode("//Source").Sha
51+
Write-Output "##vso[task.setvariable variable=vmr_sha]$vmr_sha"
52+
displayName: Obtain the vmr sha from Version.Details.xml (Windows)
53+
condition: eq(variables['Agent.OS'], 'Windows_NT')
54+
workingDirectory: $(Agent.BuildDirectory)/repo
55+
56+
- script: |
57+
git fetch --all
58+
git checkout $(vmr_sha)
59+
displayName: Checkout VMR at correct sha for repo flow
60+
workingDirectory: ${{ parameters.vmrPath }}
61+
62+
- script: |
63+
git config --global user.name "dotnet-maestro[bot]"
64+
git config --global user.email "dotnet-maestro[bot]@users.noreply.github.com"
65+
displayName: Set git author to dotnet-maestro[bot]
66+
workingDirectory: ${{ parameters.vmrPath }}
67+
68+
- script: |
69+
./eng/common/vmr-sync.sh \
70+
--vmr ${{ parameters.vmrPath }} \
71+
--tmp $(Agent.TempDirectory) \
72+
--azdev-pat '$(dn-bot-all-orgs-code-r)' \
73+
--ci \
74+
--debug
75+
76+
if [ "$?" -ne 0 ]; then
77+
echo "##vso[task.logissue type=error]Failed to synchronize the VMR"
78+
exit 1
79+
fi
80+
displayName: Sync repo into VMR (Unix)
81+
condition: ne(variables['Agent.OS'], 'Windows_NT')
82+
workingDirectory: $(Agent.BuildDirectory)/repo
83+
84+
- script: |
85+
git config --global diff.astextplain.textconv echo
86+
git config --system core.longpaths true
87+
displayName: Configure Windows git (longpaths, astextplain)
88+
condition: eq(variables['Agent.OS'], 'Windows_NT')
89+
90+
- powershell: |
91+
./eng/common/vmr-sync.ps1 `
92+
-vmr ${{ parameters.vmrPath }} `
93+
-tmp $(Agent.TempDirectory) `
94+
-azdevPat '$(dn-bot-all-orgs-code-r)' `
95+
-ci `
96+
-debugOutput
97+
98+
if ($LASTEXITCODE -ne 0) {
99+
echo "##vso[task.logissue type=error]Failed to synchronize the VMR"
100+
exit 1
101+
}
102+
displayName: Sync repo into VMR (Windows)
103+
condition: eq(variables['Agent.OS'], 'Windows_NT')
104+
workingDirectory: $(Agent.BuildDirectory)/repo
105+
106+
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
107+
- task: CopyFiles@2
108+
displayName: Collect failed patches
109+
condition: failed()
110+
inputs:
111+
SourceFolder: '$(Agent.TempDirectory)'
112+
Contents: '*.patch'
113+
TargetFolder: '$(Build.ArtifactStagingDirectory)/FailedPatches'
114+
115+
- publish: '$(Build.ArtifactStagingDirectory)/FailedPatches'
116+
artifact: $(System.JobDisplayName)_FailedPatches
117+
displayName: Upload failed patches
118+
condition: failed()
119+
120+
- ${{ each assetName in parameters.additionalSyncs }}:
121+
# The vmr-sync script ends up staging files in the local VMR so we have to commit those
122+
- script:
123+
git commit --allow-empty -am "Forward-flow $(Build.Repository.Name)"
124+
displayName: Commit local VMR changes
125+
workingDirectory: ${{ parameters.vmrPath }}
126+
127+
- script: |
128+
set -ex
129+
130+
echo "Searching for details of asset ${{ assetName }}..."
131+
132+
# Use darc to get dependencies information
133+
dependencies=$(./.dotnet/dotnet darc get-dependencies --name '${{ assetName }}' --ci)
134+
135+
# Extract repository URL and commit hash
136+
repository=$(echo "$dependencies" | grep 'Repo:' | sed 's/Repo:[[:space:]]*//' | head -1)
137+
138+
if [ -z "$repository" ]; then
139+
echo "##vso[task.logissue type=error]Asset ${{ assetName }} not found in the dependency list"
140+
exit 1
141+
fi
142+
143+
commit=$(echo "$dependencies" | grep 'Commit:' | sed 's/Commit:[[:space:]]*//' | head -1)
144+
145+
echo "Updating the VMR from $repository / $commit..."
146+
cd ..
147+
git clone $repository ${{ assetName }}
148+
cd ${{ assetName }}
149+
git checkout $commit
150+
git branch "sync/$commit"
151+
152+
./eng/common/vmr-sync.sh \
153+
--vmr ${{ parameters.vmrPath }} \
154+
--tmp $(Agent.TempDirectory) \
155+
--azdev-pat '$(dn-bot-all-orgs-code-r)' \
156+
--ci \
157+
--debug
158+
159+
if [ "$?" -ne 0 ]; then
160+
echo "##vso[task.logissue type=error]Failed to synchronize the VMR"
161+
exit 1
162+
fi
163+
displayName: Sync ${{ assetName }} into (Unix)
164+
condition: ne(variables['Agent.OS'], 'Windows_NT')
165+
workingDirectory: $(Agent.BuildDirectory)/repo
166+
167+
- powershell: |
168+
$ErrorActionPreference = 'Stop'
169+
170+
Write-Host "Searching for details of asset ${{ assetName }}..."
171+
172+
$dependencies = .\.dotnet\dotnet darc get-dependencies --name '${{ assetName }}' --ci
173+
174+
$repository = $dependencies | Select-String -Pattern 'Repo:\s+([^\s]+)' | Select-Object -First 1
175+
$repository -match 'Repo:\s+([^\s]+)' | Out-Null
176+
$repository = $matches[1]
177+
178+
if ($repository -eq $null) {
179+
Write-Error "Asset ${{ assetName }} not found in the dependency list"
180+
exit 1
181+
}
182+
183+
$commit = $dependencies | Select-String -Pattern 'Commit:\s+([^\s]+)' | Select-Object -First 1
184+
$commit -match 'Commit:\s+([^\s]+)' | Out-Null
185+
$commit = $matches[1]
186+
187+
Write-Host "Updating the VMR from $repository / $commit..."
188+
cd ..
189+
git clone $repository ${{ assetName }}
190+
cd ${{ assetName }}
191+
git checkout $commit
192+
git branch "sync/$commit"
193+
194+
.\eng\common\vmr-sync.ps1 `
195+
-vmr ${{ parameters.vmrPath }} `
196+
-tmp $(Agent.TempDirectory) `
197+
-azdevPat '$(dn-bot-all-orgs-code-r)' `
198+
-ci `
199+
-debugOutput
200+
201+
if ($LASTEXITCODE -ne 0) {
202+
echo "##vso[task.logissue type=error]Failed to synchronize the VMR"
203+
exit 1
204+
}
205+
displayName: Sync ${{ assetName }} into (Windows)
206+
condition: ne(variables['Agent.OS'], 'Windows_NT')
207+
workingDirectory: $(Agent.BuildDirectory)/repo

eng/common/templates/vmr-build-pr.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
trigger: none
2+
pr:
3+
branches:
4+
include:
5+
- main
6+
- release/*
7+
paths:
8+
exclude:
9+
- documentation/*
10+
- README.md
11+
- CODEOWNERS
12+
13+
variables:
14+
- template: /eng/common/templates/variables/pool-providers.yml@self
15+
16+
- name: skipComponentGovernanceDetection # we run CG on internal builds only
17+
value: true
18+
19+
- name: Codeql.Enabled # we run CodeQL on internal builds only
20+
value: false
21+
22+
resources:
23+
repositories:
24+
- repository: vmr
25+
type: github
26+
name: dotnet/dotnet
27+
endpoint: dotnet
28+
29+
stages:
30+
- template: /eng/pipelines/templates/stages/vmr-build.yml@vmr
31+
parameters:
32+
isBuiltFromVmr: false
33+
scope: lite

0 commit comments

Comments
 (0)