Skip to content

Commit f1ed351

Browse files
authored
Fix upload conflict Microsoft.NETCore.App.Ref in official build (#109650)
We're occasionally seeing errors on the official build during artifacts upload (dotnet/dnceng#1916) This is because multiple jobs are trying to push the Microsoft.NETCore.App.Ref nuget package to the same AzDO build artifacts container, causing conflicts. Since we'll be using the VMR in the near future and it is using a different asset selection the quick fix is to just delete the package on the jobs where it's not supposed to be uploaded rather than trying to introduce a complicated condition in msbuild.
1 parent 60b84bb commit f1ed351

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

eng/pipelines/runtime-official.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,12 @@ extends:
285285
nameSuffix: NativeAOT
286286
isOfficialBuild: ${{ variables.isOfficialBuild }}
287287
postBuildSteps:
288+
# delete Microsoft.NETCore.App.Ref package to prevent upload conflict
289+
- task: DeleteFiles@1
290+
displayName: 'Delete Microsoft.NETCore.App.Ref package'
291+
inputs:
292+
SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
293+
Contents: 'Microsoft.NETCore.App.Ref.*.nupkg'
288294
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
289295
parameters:
290296
name: NativeAOTRuntimePacks
@@ -329,6 +335,12 @@ extends:
329335
nameSuffix: Mono
330336
isOfficialBuild: ${{ variables.isOfficialBuild }}
331337
postBuildSteps:
338+
# delete Microsoft.NETCore.App.Ref package to prevent upload conflict
339+
- task: DeleteFiles@1
340+
displayName: 'Delete Microsoft.NETCore.App.Ref package'
341+
inputs:
342+
SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
343+
Contents: 'Microsoft.NETCore.App.Ref.*.nupkg'
332344
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
333345
parameters:
334346
name: MonoRuntimePacks
@@ -347,6 +359,12 @@ extends:
347359
nameSuffix: Mono
348360
isOfficialBuild: ${{ variables.isOfficialBuild }}
349361
postBuildSteps:
362+
# delete Microsoft.NETCore.App.Ref package to prevent upload conflict
363+
- task: DeleteFiles@1
364+
displayName: 'Delete Microsoft.NETCore.App.Ref package'
365+
inputs:
366+
SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
367+
Contents: 'Microsoft.NETCore.App.Ref.*.nupkg'
350368
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
351369
parameters:
352370
name: MonoRuntimePacks
@@ -365,6 +383,12 @@ extends:
365383
isOfficialBuild: ${{ variables.isOfficialBuild }}
366384
runtimeVariant: multithread
367385
postBuildSteps:
386+
# delete Microsoft.NETCore.App.Ref package to prevent upload conflict
387+
- task: DeleteFiles@1
388+
displayName: 'Delete Microsoft.NETCore.App.Ref package'
389+
inputs:
390+
SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
391+
Contents: 'Microsoft.NETCore.App.Ref.*.nupkg'
368392
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
369393
parameters:
370394
name: MonoRuntimePacks

0 commit comments

Comments
 (0)