From d203df02beac193a6661bc037bb987166c6a3dc5 Mon Sep 17 00:00:00 2001 From: kmelmon <33470154+kmelmon@users.noreply.github.com> Date: Mon, 21 Oct 2019 17:57:40 -0700 Subject: [PATCH] Capture detailed logs from CI loop (#3464) * 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 --- .ado/templates/build-rnw.yml | 11 +++++++++++ .ado/templates/e2e-test-job.yml | 8 ++++++++ .ado/templates/react-native-init.yml | 11 +++++++++-- .ado/windows-vs-pr.yml | 3 --- ...tive-windows-2019-10-16-16-00-10-clifix.json | 8 ++++++++ .../local-cli/runWindows/utils/msbuildtools.js | 1 + yarn.lock | 17 +++++++++-------- 7 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 change/react-native-windows-2019-10-16-16-00-10-clifix.json diff --git a/.ado/templates/build-rnw.yml b/.ado/templates/build-rnw.yml index b5ee8eeabe6..f4db9237960 100644 --- a/.ado/templates/build-rnw.yml +++ b/.ado/templates/build-rnw.yml @@ -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' + diff --git a/.ado/templates/e2e-test-job.yml b/.ado/templates/e2e-test-job.yml index 27ce3dce06c..c15cef58412 100644 --- a/.ado/templates/e2e-test-job.yml +++ b/.ado/templates/e2e-test-job.yml @@ -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 diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index 3bc36e3c248..effd2a71014 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -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 diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index aa073089bb5..83c1a6f568b 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -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: @@ -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 @@ -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 diff --git a/change/react-native-windows-2019-10-16-16-00-10-clifix.json b/change/react-native-windows-2019-10-16-16-00-10-clifix.json new file mode 100644 index 00000000000..80c91bac452 --- /dev/null +++ b/change/react-native-windows-2019-10-16-16-00-10-clifix.json @@ -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" +} \ No newline at end of file diff --git a/vnext/local-cli/runWindows/utils/msbuildtools.js b/vnext/local-cli/runWindows/utils/msbuildtools.js index e955dda5910..7d4819206a0 100644 --- a/vnext/local-cli/runWindows/utils/msbuildtools.js +++ b/vnext/local-cli/runWindows/utils/msbuildtools.js @@ -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) { diff --git a/yarn.lock b/yarn.lock index 3e891538535..cb2a1402f4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" @@ -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" @@ -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"