Skip to content

Commit

Permalink
Capture detailed logs from CI loop (#3464)
Browse files Browse the repository at this point in the history
* merge

* Change files

* always publish binlog, comment out targets

* comment out targets

* change to succeededOrFailed.  Of course!

* move condition outside inputs.  Of course!

* add more binlogs

* tweak path

* joy!  reverse engineering pathToPublish is fun

* sheesh. still trying to find the binlog

* use Build.SourcesDirectory to locate binlog

* typo

* giving up on /bl.  Trying another option

* publish log

* add timeout

* log more build jobs

* change publish path

* try #2 at getting the right publish path

* remove clean
  • Loading branch information
kmelmon committed Oct 22, 2019
1 parent 13f134f commit d203df0
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 13 deletions.
11 changes: 11 additions & 0 deletions .ado/templates/build-rnw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,18 @@ steps:
msbuildArchitecture: ${{parameters.msBuildArchitecture}}
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
createLogFile: true
logFileVerbosity: detailed
msbuildArguments:
/p:PreferredToolArchitecture=${{parameters.preferredToolArchitecture}}
/p:PlatformToolset=${{parameters.platformToolset}}
${{parameters.msbuildArguments}}

- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
timeoutInMinutes: 10
inputs:
pathtoPublish: $(Build.SourcesDirectory)/${{parameters.project}}.log
artifactName: Detailed Logs for ${{parameters.project}} $(BuildConfiguration) $(BuildPlatform)
publishLocation: 'Container'

8 changes: 8 additions & 0 deletions .ado/templates/e2e-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ jobs:
script: react-native run-windows --no-packager --arch ${{ parameters.BuildPlatform }} --release --bundle --logging
workingDirectory: packages/E2ETest

- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
timeoutInMinutes: 10
inputs:
pathtoPublish: packages/E2ETest/msbuild.binlog
artifactName: 'ReactUWPTestApp build log'
publishLocation: 'Container'

# Wait for app to launch. A workaround to avoid WinAppDriver error: Failed to locate opened application window with appId
- task: PowerShell@2
displayName: Wait for app to launch
Expand Down
11 changes: 9 additions & 2 deletions .ado/templates/react-native-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,19 @@ steps:
platform: ${{ parameters.platform }} # Optional
configuration: ${{ parameters.configuration }} # Optional
restoreNugetPackages: true
createLogFile: true
logFileVerbosity: detailed
msbuildArguments:
/p:PreferredToolArchitecture=$(MSBuildPreferredToolArchitecture)
/p:PlatformToolset=$(MSBuildPlatformToolset)
# /p:VCTargetsPath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VC\v150"

clean: true # Optional
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
timeoutInMinutes: 10
inputs:
pathtoPublish: $(Agent.BuildDirectory)/testcli/windows/testcli.sln.log
artifactName: Detailed Logs for testcli.sln ${{ parameters.platform }} ${{ parameters.configuration }}
publishLocation: 'Container'

- task: CmdLine@2
displayName: Create bundle testcli
Expand Down
3 changes: 0 additions & 3 deletions .ado/windows-vs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ jobs:
project: vnext/ReactWindows-Universal.sln
vsComponents: $(VsComponents),Microsoft.VisualStudio.Component.VC.v141.ARM
msbuildArguments:
# /p:VCTargetsPath="$(VCTargetsPath)"

- template: templates/publish-build-artifacts-for-nuget.yml
parameters:
Expand Down Expand Up @@ -201,7 +200,6 @@ jobs:
msbuildArguments:
/p:RNW_PKG_VERSION_STR="Private Build"
/p:RNW_PKG_VERSION="1000,0,0,0"
# /p:VCTargetsPath="$(VCTargetsPath)"

- task: VSTest@2
displayName: Run Desktop Unit Tests
Expand Down Expand Up @@ -429,7 +427,6 @@ jobs:
/p:PlatformToolset=$(MSBuildPlatformToolset)
/p:TargetPlatformVersion=$(TargetPlatformVersion)
/p:WindowsTargetPlatformVersion=$(TargetPlatformVersion)
# /p:VCTargetsPath="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v150"
#clean: true # Optional
#maximumCpuCount: false # Optional
#restoreNugetPackages: false # Optional
Expand Down
8 changes: 8 additions & 0 deletions change/react-native-windows-2019-10-16-16-00-10-clifix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Fix build issue with react-native run-windows",
"packageName": "react-native-windows",
"email": "kmelmon@microsoft.com",
"commit": "0faddb46f52a6409b802afa54df7ac33b6159681",
"date": "2019-10-16T23:00:10.422Z"
}
1 change: 1 addition & 0 deletions vnext/local-cli/runWindows/utils/msbuildtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class MSBuildTools {
} else if (this.version === '16.0') {
args.push('/p:VisualStudioVersion=16.0');
}
args.push('/bl');

if (config) {
Object.keys(config).forEach(function(key) {
Expand Down
17 changes: 9 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9831,10 +9831,10 @@ react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb"
integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw==

"react-native@https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.5.tar.gz":
version "0.60.0-microsoft.5"
uid "4c3fa1679b4ad4b45bf76e117dfa936359beef2a"
resolved "https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.5.tar.gz#4c3fa1679b4ad4b45bf76e117dfa936359beef2a"
"react-native@https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.8.tar.gz":
version "0.60.0-microsoft.8"
uid a2bd4cdb70c85ada46cea8fc3294c7e7bca5139c
resolved "https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.8.tar.gz#a2bd4cdb70c85ada46cea8fc3294c7e7bca5139c"
dependencies:
"@babel/core" "^7.4.0"
"@babel/generator" "^7.4.0"
Expand Down Expand Up @@ -9879,6 +9879,7 @@ react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6:
jsc-android "245459.0.0"
metro "0.54.1"
metro-babel-register "0.54.1"
metro-config "0.54.1"
metro-react-native-babel-transformer "0.54.1"
nullthrows "^1.1.0"
pretty-format "^24.7.0"
Expand Down Expand Up @@ -10368,10 +10369,10 @@ rimraf@~2.6.2:
dependencies:
glob "^7.1.3"

rnpm-plugin-windows@^0.3.5:
version "0.3.5"
resolved "https://registry.yarnpkg.com/rnpm-plugin-windows/-/rnpm-plugin-windows-0.3.5.tgz#6c84bedda93445017ce7d6d4035b25a1e86cdaf2"
integrity sha512-dCqiEr6QS7/yODKdoBY0b0VzocFilZ8RZDsnIPHIXtQhpo8y1VhJYqxoQAxnE3kFLGDKYuLwgfD8bTo0P2zZcg==
rnpm-plugin-windows@^0.3.7:
version "0.3.7"
resolved "https://registry.yarnpkg.com/rnpm-plugin-windows/-/rnpm-plugin-windows-0.3.7.tgz#0c76e8d7e34e7c24e6bc30a21a90463792ba6964"
integrity sha512-RsY1rEggkFGUggL+gIoSvdcnbPoG+47zVLf9mWCoD1uMz1y8brCE4Lfvg+HDsBkBMS3s1xG6Lni66Zp5D5/nUw==
dependencies:
chalk "^1.1.3"
extract-zip "^1.6.7"
Expand Down

0 comments on commit d203df0

Please sign in to comment.