only dump package list if the run failed (#8320)

This commit is contained in:
Brett V. Forsgren 2020-01-22 13:50:36 -08:00 коммит произвёл nosami
Родитель 523bd5154a
Коммит 305546e5a0
2 изменённых файлов: 25 добавлений и 6 удалений

Просмотреть файл

@ -187,6 +187,9 @@ stages:
publishLocation: Container publishLocation: Container
continueOnError: true continueOnError: true
condition: eq(variables['_testKind'], 'testFSharpQA') condition: eq(variables['_testKind'], 'testFSharpQA')
- script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
displayName: Dump NuGet cache contents
condition: failed()
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: Publish NuGet cache contents displayName: Publish NuGet cache contents
inputs: inputs:
@ -194,7 +197,7 @@ stages:
ArtifactName: 'NuGetPackageContents Windows $(_testKind)' ArtifactName: 'NuGetPackageContents Windows $(_testKind)'
publishLocation: Container publishLocation: Container
continueOnError: true continueOnError: true
condition: always() condition: failed()
# Linux # Linux
- job: Linux - job: Linux
@ -216,6 +219,9 @@ stages:
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
continueOnError: true continueOnError: true
condition: always() condition: always()
- script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
displayName: Dump NuGet cache contents
condition: failed()
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: Publish NuGet cache contents displayName: Publish NuGet cache contents
inputs: inputs:
@ -223,7 +229,7 @@ stages:
ArtifactName: 'NuGetPackageContents Linux' ArtifactName: 'NuGetPackageContents Linux'
publishLocation: Container publishLocation: Container
continueOnError: true continueOnError: true
condition: always() condition: failed()
# MacOS # MacOS
- job: MacOS - job: MacOS
@ -245,6 +251,9 @@ stages:
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
continueOnError: true continueOnError: true
condition: always() condition: always()
- script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
displayName: Dump NuGet cache contents
condition: failed()
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: Publish NuGet cache contents displayName: Publish NuGet cache contents
inputs: inputs:
@ -252,7 +261,7 @@ stages:
ArtifactName: 'NuGetPackageContents Mac' ArtifactName: 'NuGetPackageContents Mac'
publishLocation: Container publishLocation: Container
continueOnError: true continueOnError: true
condition: always() condition: failed()
# Source Build Linux # Source Build Linux
- job: SourceBuild_Linux - job: SourceBuild_Linux
@ -263,6 +272,9 @@ stages:
clean: true clean: true
- script: ./eng/cibuild.sh --configuration Release /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true - script: ./eng/cibuild.sh --configuration Release /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true
displayName: Build displayName: Build
- script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
displayName: Dump NuGet cache contents
condition: failed()
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: Publish NuGet cache contents displayName: Publish NuGet cache contents
inputs: inputs:
@ -270,7 +282,7 @@ stages:
ArtifactName: 'NuGetPackageContents SourceBuild_Linux' ArtifactName: 'NuGetPackageContents SourceBuild_Linux'
publishLocation: Container publishLocation: Container
continueOnError: true continueOnError: true
condition: always() condition: failed()
# Source Build Windows # Source Build Windows
- job: SourceBuild_Windows - job: SourceBuild_Windows
@ -281,6 +293,9 @@ stages:
clean: true clean: true
- script: eng\CIBuild.cmd -configuration Release -noSign /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true - script: eng\CIBuild.cmd -configuration Release -noSign /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true
displayName: Build displayName: Build
- script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
displayName: Dump NuGet cache contents
condition: failed()
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: Publish NuGet cache contents displayName: Publish NuGet cache contents
inputs: inputs:
@ -288,7 +303,7 @@ stages:
ArtifactName: 'NuGetPackageContents SourceBuild_Windows' ArtifactName: 'NuGetPackageContents SourceBuild_Windows'
publishLocation: Container publishLocation: Container
continueOnError: true continueOnError: true
condition: always() condition: failed()
# Up-to-date # Up-to-date
- job: UpToDate_Windows - job: UpToDate_Windows

Просмотреть файл

@ -1,7 +1,11 @@
<Project> <Project Sdk="Microsoft.NET.Sdk">
<!-- Used as a diagnostic tool to view the state of the NuGet package cache as it existed immediately after a restore/build. --> <!-- Used as a diagnostic tool to view the state of the NuGet package cache as it existed immediately after a restore/build. -->
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageRootFiles Include="$(NuGetPackageRoot)/**" /> <PackageRootFiles Include="$(NuGetPackageRoot)/**" />
</ItemGroup> </ItemGroup>