Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update build YAML to publish full msbuild logs #6665

Merged
merged 3 commits into from
Jun 25, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions eng/pipelines/templates/jobs/archetype-sdk-mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,27 @@ jobs:
variables:
DotNetCoreSDKVersion: '2.2.202'
skipComponentGovernanceDetection: true
MsBuildLogDir: msbuildlogs
LoggingArgs: '/v:m /clp:ShowtimeStamp /flp:LogFile=$(MsBuildLogDir)/msbuild.normal.log;Verbosity=normal /flp1:Summary;Verbosity=minimal;LogFile=$(MsBuildLogDir)/msbuild.sum.log /flp2:warningsonly;logfile=$(MsBuildLogDir)/msbuild.wrn.log /flp3:errorsonly;logfile=$(MsBuildLogDir)/msbuild.err.log'

pool:
vmImage: windows-2019
steps:
- task: DotNetCoreInstaller@0
displayName: 'Use .NET Core sdk $(DotNetCoreSDKVersion)'
inputs:
version: '$(DotNetCoreSDKVersion)'
- script: dotnet msbuild eng/mgmt.proj /t:CreateNugetPackage /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish)
- script: dotnet msbuild eng/mgmt.proj /t:CreateNugetPackage /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish) $(LoggingArgs)
displayName: "Build & Package"
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_MULTILEVEL_LOOKUP: 0
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
inputs:
pathtoPublish: $(MsBuildLogDir)
artifactName: MsBuildLogs
- task: PublishPipelineArtifact@0
condition: succeededOrFailed()
inputs:
Expand All @@ -32,6 +40,9 @@ jobs:
variables:
DotNetCoreSDKVersion: '2.2.202'
skipComponentGovernanceDetection: true
MsBuildLogDir: msbuildlogs
LoggingArgs: '/v:m /clp:ShowtimeStamp /flp:LogFile=$(MsBuildLogDir)/msbuild.normal.log;Verbosity=normal /flp1:Summary;Verbosity=minimal;LogFile=$(MsBuildLogDir)/msbuild.sum.log /flp2:warningsonly;logfile=$(MsBuildLogDir)/msbuild.wrn.log /flp3:errorsonly;logfile=$(MsBuildLogDir)/msbuild.err.log'
Copy link
Member

@shahabhijeet shahabhijeet Jun 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason we need multiple variables for loging arguments.
Can we not reuse the same variable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shahabhijeet , I could not find a way to define shared variables in this jobs template yml, so I move shared variables to top level mgmt.yml, please let me know if any concern.


strategy:
maxParallel: $[ variables['MaxParallelTestJobs'] ]
matrix:
Expand All @@ -51,7 +62,7 @@ jobs:
displayName: 'Use .NET Core sdk $(DotNetCoreSDKVersion)'
inputs:
version: '$(DotNetCoreSDKVersion)'
- script: dotnet msbuild eng/mgmt.proj /t:RunTests /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish)
- script: dotnet msbuild eng/mgmt.proj /t:RunTests /p:Scope=${{parameters.Scope}} /p:ForPublishing=$(ShouldPublish) $(LoggingArgs)
displayName: "Build & Test"
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
Expand All @@ -64,3 +75,8 @@ jobs:
testRunTitle: "$(OSName) Test Results"
testResultsFormat: "VSTest"
mergeTestResults: true
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
inputs:
pathtoPublish: $(MsBuildLogDir)
artifactName: MsBuildLogs