Skip to content

Commit

Permalink
Azure DevOps: upload logs, blame/crash dumps, and publish to nuget (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenBond authored Oct 15, 2024
1 parent 92c6785 commit 2b58686
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .azure/pipelines/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ parameters:
displayName: Skip tests
type: boolean
default: false
- name: publish_nuget
displayName: Publish to nuget.org
type: boolean
default: false
- name: frameworks
displayName: Frameworks
type: object
Expand Down Expand Up @@ -78,7 +82,7 @@ extends:
parameters:
settings:
skipBuildTagsForGitHubPullRequests: true
pool:
pool:
name: $(pool_name)
image: $(pool_image)
os: windows
Expand All @@ -95,6 +99,7 @@ extends:
codesign: ${{ parameters.codesign }}
skip_test: ${{ parameters.skip_test }}
publish_nightly: false
publish_nuget: ${{ parameters.publish_nuget }}
frameworks: ${{ parameters.frameworks }}
tests_categories: ${{ parameters.tests_categories }}
runCodeQL3000: ${{ parameters.runCodeQL3000 }}
1 change: 1 addition & 0 deletions .azure/pipelines/nightly-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ extends:
version_suffix: nightly.$(Build.BuildNumber)
codesign: true
publish_nightly: true
publish_nuget: false
skip_test: true
38 changes: 36 additions & 2 deletions .azure/pipelines/templates/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ parameters:
displayName: Publish to orleans-nightly
type: boolean
default: false
- name: publish_nuget
displayName: Publish to nuget.org
type: boolean
default: false
- name: frameworks
displayName: Frameworks
type: object
Expand Down Expand Up @@ -80,6 +84,16 @@ jobs:
nuGetFeedType: internal
publishVstsFeed: $(publishVstsFeed)
allowPackageConflicts: true
- ${{ if and(eq(parameters.codesign, true), eq(parameters.publish_nuget, true)) }}:
- output: nuget
condition: succeeded()
useDotNetTask: false
packageParentPath: $(Pipeline.Workspace)
packagesToPush: $(build.sourcesdirectory)/Artifacts/${{parameters.build_configuration}}/**/*.nupkg
nuGetFeedType: external
publishFeedCredentials: dotnet-orleans-nuget
publishPackageMetadata: true
allowPackageConflicts: true
steps:
- ${{ if eq(variables.microbuild_signing, true) }}:
- task: MicroBuildSigningPlugin@4
Expand Down Expand Up @@ -252,6 +266,12 @@ jobs:
displayName: ${{category}} on ${{framework}}
timeoutInMinutes: 120
dependsOn: Build
templateContext:
outputs:
- output: pipelineArtifact
targetPath: '$(Build.ArtifactStagingDirectory)/test_outputs_${{category}}_${{framework}}_$(Build.BuildId)'
artifactName: 'test_outputs_${{category}}_${{framework}}'
condition: succeededOrFailed()
steps:
- checkout: self
- task: UseDotNet@2
Expand Down Expand Up @@ -292,7 +312,7 @@ jobs:
inputs:
command: 'test'
testRunTitle: ${{category}} on ${{framework}}
arguments: '--no-build --logger "trx;LogFilePrefix=testresults-${{framework}}-{{category}}" --framework ${{framework}} --configuration "${{parameters.build_configuration}}" --filter Category=${{category}} -- -parallel none -noshadow'
arguments: '--no-build --logger "trx;LogFilePrefix=testresults-${{framework}}-${{category}}" --framework ${{framework}} --configuration "${{parameters.build_configuration}}" --filter Category=${{category}} --blame-crash-dump-type full --blame-hang-timeout 10m --blame-hang-dump-type full -- -parallel none -noshadow'
publishTestResults: false # Doesn't merge correctly, use the explicit PublishTestResults task instead
- task: PublishTestResults@2
displayName: Publishing test results
Expand All @@ -301,4 +321,18 @@ jobs:
testResultsFormat: VSTest
testResultsFiles: '**/testresults-*.trx'
mergeTestResults: true
testRunTitle: ${{category}} on ${{framework}}
testRunTitle: ${{category}} on ${{framework}}
- task: CopyFiles@2
displayName: 'Copy test logs'
condition: succeededOrFailed()
inputs:
Contents: '**\*.log'
TargetFolder: '$(Build.ArtifactStagingDirectory)/test_outputs_${{category}}_${{framework}}_$(Build.BuildId)'
OverWrite: true
- task: CopyFiles@2
displayName: 'Copy crash dumps'
condition: succeededOrFailed()
inputs:
Contents: '**\*.dmp'
TargetFolder: '$(Build.ArtifactStagingDirectory)/test_outputs_${{category}}_${{framework}}_$(Build.BuildId)'
OverWrite: true

0 comments on commit 2b58686

Please sign in to comment.