diff --git a/azure-pipelines-official.yml b/azure-pipelines-official.yml index 0eaf0a7168..e8e43685a9 100644 --- a/azure-pipelines-official.yml +++ b/azure-pipelines-official.yml @@ -138,6 +138,16 @@ extends: name: Build displayName: Build + # Both the Build and Test steps produces binlog named Build.binlog (https://github.com/dotnet/arcade/issues/15611) + # We want to publish both binlogs. + # So, as a hack, we build, rename, test, rename again. + - task: PowerShell@2 + displayName: 'Rename Build.binlog to BuildStep.binlog' + inputs: + targetType: inline + script: Copy-Item -Path "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\Build.binlog" -Destination "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\BuildStep.binlog" + condition: always() + - ${{ if eq(parameters.SkipTests, False) }}: # -ci is allowing to import some environment variables and some required configurations # -nobl avoids overwriting build binlog with binlog from tests @@ -148,6 +158,13 @@ extends: name: Test displayName: Test + - task: PowerShell@2 + displayName: 'Rename Build.binlog to TestStep.binlog' + inputs: + targetType: inline + script: Copy-Item -Path "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\Build.binlog" -Destination "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\TestStep.binlog" + condition: always() + - task: CopyFiles@2 displayName: 'Copy binlogs' inputs: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7ab31f8fe6..17e3fe29aa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -93,6 +93,16 @@ stages: name: Build displayName: Build + # Both the Build and Test steps produces binlog named Build.binlog (https://github.com/dotnet/arcade/issues/15611) + # We want to publish both binlogs. + # So, as a hack, we build, rename, test, rename again. + - task: PowerShell@2 + displayName: 'Rename Build.binlog to BuildStep.binlog' + inputs: + targetType: inline + script: Copy-Item -Path "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\Build.binlog" -Destination "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\BuildStep.binlog" + condition: always() + - ${{ if eq(parameters.SkipTests, False) }}: # -ci is allowing to import some environment variables and some required configurations # -nobl avoids overwriting build binlog with binlog from tests @@ -103,6 +113,13 @@ stages: name: Test displayName: Test + - task: PowerShell@2 + displayName: 'Rename Build.binlog to TestStep.binlog' + inputs: + targetType: inline + script: Copy-Item -Path "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\Build.binlog" -Destination "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\TestStep.binlog" + condition: always() + # This step is only helpful for diagnosing some issues with vstest/test host that would not appear # through the console or trx - task: PublishBuildArtifacts@1