Skip to content

Commit

Permalink
Fix upload conflict Microsoft.NETCore.App.Ref in official build (dotn…
Browse files Browse the repository at this point in the history
…et#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.
  • Loading branch information
akoeplinger authored and mikelle-rogers committed Dec 4, 2024
1 parent 0d3931c commit 159fbd7
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ extends:
nameSuffix: NativeAOT
isOfficialBuild: ${{ variables.isOfficialBuild }}
postBuildSteps:
# delete Microsoft.NETCore.App.Ref package to prevent upload conflict
- task: DeleteFiles@1
displayName: 'Delete Microsoft.NETCore.App.Ref package'
inputs:
SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
Contents: 'Microsoft.NETCore.App.Ref.*.nupkg'
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
parameters:
name: NativeAOTRuntimePacks
Expand Down Expand Up @@ -329,6 +335,12 @@ extends:
nameSuffix: Mono
isOfficialBuild: ${{ variables.isOfficialBuild }}
postBuildSteps:
# delete Microsoft.NETCore.App.Ref package to prevent upload conflict
- task: DeleteFiles@1
displayName: 'Delete Microsoft.NETCore.App.Ref package'
inputs:
SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
Contents: 'Microsoft.NETCore.App.Ref.*.nupkg'
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
parameters:
name: MonoRuntimePacks
Expand All @@ -347,6 +359,12 @@ extends:
nameSuffix: Mono
isOfficialBuild: ${{ variables.isOfficialBuild }}
postBuildSteps:
# delete Microsoft.NETCore.App.Ref package to prevent upload conflict
- task: DeleteFiles@1
displayName: 'Delete Microsoft.NETCore.App.Ref package'
inputs:
SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
Contents: 'Microsoft.NETCore.App.Ref.*.nupkg'
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
parameters:
name: MonoRuntimePacks
Expand All @@ -365,6 +383,12 @@ extends:
isOfficialBuild: ${{ variables.isOfficialBuild }}
runtimeVariant: multithread
postBuildSteps:
# delete Microsoft.NETCore.App.Ref package to prevent upload conflict
- task: DeleteFiles@1
displayName: 'Delete Microsoft.NETCore.App.Ref package'
inputs:
SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
Contents: 'Microsoft.NETCore.App.Ref.*.nupkg'
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
parameters:
name: MonoRuntimePacks
Expand Down

0 comments on commit 159fbd7

Please sign in to comment.