From dcffb4dcef153ae70597b48a2f630e7d96bc36d6 Mon Sep 17 00:00:00 2001 From: Andrew Coates <> Date: Wed, 5 Jun 2019 11:05:05 -0700 Subject: [PATCH 01/23] Move win32 to hosted too --- .ado/windows-vs-pr.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index 0416585785d..12b9f69997c 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -131,8 +131,7 @@ jobs: BuildConfiguration: Release BuildPlatform: arm pool: - name: OE Standard Pool - demands: ['VisualStudio_15.0', 'OnPrem -equals False'] + vmImage: vs2017-win2016 timeoutInMinutes: 120 # how long to run the job before automatically cancelling cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them steps: From 141a5d7781d9296ba00e5048f87388aa5ec96361 Mon Sep 17 00:00:00 2001 From: Andrew Coates <> Date: Wed, 5 Jun 2019 11:07:55 -0700 Subject: [PATCH 02/23] yarn already installed... --- .ado/windows-vs-pr.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index 12b9f69997c..411fe53ed9a 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -142,8 +142,20 @@ jobs: submodules: false # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules persistCredentials: false # set to 'true' to leave the OAuth token in the Git config after the initial fetch - - template: templates/npm-install-and-build.yml + - task: CmdLine@2 + displayName: yarn install + inputs: + script: yarn install --frozen-lockfile + workingDirectory: vnext + + - template: templates/stop-packagers.yml + - task: CmdLine@2 + displayName: yarn build + inputs: + script: yarn build + workingDirectory: vnext + - template: templates/vs-build.yml parameters: BuildConfiguration: $(BuildConfiguration) From d064432f363b402772f092a7c16c60d1fa4ebcaf Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Wed, 5 Jun 2019 19:28:03 -0700 Subject: [PATCH 03/23] Rename Microsoft.ChakraCore.Debugger to ChakraCore.Debugger --- vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj | 4 ++-- vnext/Desktop.DLL/packages.config | 2 +- .../React.Windows.Desktop.IntegrationTests.vcxproj | 4 ++-- vnext/Desktop.IntegrationTests/packages.config | 2 +- vnext/Desktop/React.Windows.Desktop.vcxproj | 4 ++-- vnext/Desktop/packages.config | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index 0450e9fa76c..929cd9092d0 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -147,7 +147,7 @@ - + @@ -157,6 +157,6 @@ - + \ No newline at end of file diff --git a/vnext/Desktop.DLL/packages.config b/vnext/Desktop.DLL/packages.config index 45e6ddc4b1e..108f4b4577d 100644 --- a/vnext/Desktop.DLL/packages.config +++ b/vnext/Desktop.DLL/packages.config @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj index 5de62a4c9a6..5d8277b5865 100644 --- a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj +++ b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj @@ -137,7 +137,7 @@ - + @@ -147,7 +147,7 @@ - + diff --git a/vnext/Desktop.IntegrationTests/packages.config b/vnext/Desktop.IntegrationTests/packages.config index 45e6ddc4b1e..108f4b4577d 100644 --- a/vnext/Desktop.IntegrationTests/packages.config +++ b/vnext/Desktop.IntegrationTests/packages.config @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index e7020b82b49..fa4678c35ae 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -163,7 +163,7 @@ - + @@ -173,6 +173,6 @@ - + \ No newline at end of file diff --git a/vnext/Desktop/packages.config b/vnext/Desktop/packages.config index 45e6ddc4b1e..108f4b4577d 100644 --- a/vnext/Desktop/packages.config +++ b/vnext/Desktop/packages.config @@ -2,7 +2,7 @@ - + \ No newline at end of file From c0e73ad9eadb94c5989746978090397d7e6f2431 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Wed, 5 Jun 2019 19:37:53 -0700 Subject: [PATCH 04/23] Remove office from nuget.config --- .ado/windows-vs-pr.yml | 4 ++-- vnext/NuGet.Config | 2 -- vnext/NuGet.NoOffice.Config | 13 ------------- vnext/ReactWindows-UWP.sln | 2 +- 4 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 vnext/NuGet.NoOffice.Config diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index 622c38be8b1..411fe53ed9a 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -60,7 +60,7 @@ jobs: command: restore restoreSolution: vnext/ReactWindows-UWP.sln feedsToUse: config - nugetConfigPath: vnext/NuGet.NoOffice.config + nugetConfigPath: vnext/NuGet.config restoreDirectory: packages/ verbosityRestore: Detailed # Options: quiet, normal, detailed @@ -81,7 +81,7 @@ jobs: command: restore restoreSolution: vnext/Playground/Playground.sln feedsToUse: config - nugetConfigPath: vnext/NuGet.NoOffice.config + nugetConfigPath: vnext/NuGet.config restoreDirectory: packages/ verbosityRestore: Detailed # Options: quiet, normal, detailed diff --git a/vnext/NuGet.Config b/vnext/NuGet.Config index e90b452b046..8d20b78648d 100644 --- a/vnext/NuGet.Config +++ b/vnext/NuGet.Config @@ -8,8 +8,6 @@ - - diff --git a/vnext/NuGet.NoOffice.Config b/vnext/NuGet.NoOffice.Config deleted file mode 100644 index 8d20b78648d..00000000000 --- a/vnext/NuGet.NoOffice.Config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/vnext/ReactWindows-UWP.sln b/vnext/ReactWindows-UWP.sln index c5324033ca8..a7fa08413bd 100644 --- a/vnext/ReactWindows-UWP.sln +++ b/vnext/ReactWindows-UWP.sln @@ -33,7 +33,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig Directory.Build.props = Directory.Build.props - NuGet.Config = NuGet.NoOffice.Config + NuGet.Config = NuGet.Config ReactUwp.nuspec = ReactUwp.nuspec README.md = README.md EndProjectSection From 2eac10706e111afc28b6b36c98ef2104c1b167a6 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Wed, 5 Jun 2019 20:26:46 -0700 Subject: [PATCH 05/23] Try using old targets path --- vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj | 4 ++-- .../React.Windows.Desktop.IntegrationTests.vcxproj | 4 ++-- vnext/Desktop/React.Windows.Desktop.vcxproj | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index 929cd9092d0..ba71fea2de5 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -147,7 +147,7 @@ - + @@ -157,6 +157,6 @@ - + \ No newline at end of file diff --git a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj index 5d8277b5865..bd6fc032bae 100644 --- a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj +++ b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj @@ -137,7 +137,7 @@ - + @@ -147,7 +147,7 @@ - + diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index fa4678c35ae..f5f90fafd7b 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -163,7 +163,7 @@ - + @@ -173,6 +173,6 @@ - + \ No newline at end of file From fbfd5134bae6178a4ec8a39b497464f0ef611f0c Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Wed, 5 Jun 2019 20:56:36 -0700 Subject: [PATCH 06/23] Use standard pool for last PR step too --- .ado/windows-vs-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index 411fe53ed9a..74a379bf292 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -266,7 +266,7 @@ jobs: dependsOn: RnwNativePRBuild displayName: React-Native-Windows Build and Pack Nuget pool: - name: OE Standard Pool + vmImage: vs2017-win2016 steps: - checkout: none #skip checking out the default repository resource From cf62a692c23614e8b8fc2c8f8aded383e8151918 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Wed, 5 Jun 2019 22:37:48 -0700 Subject: [PATCH 07/23] See if builds work on windows-2019 image --- .ado/windows-vs-pr.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index 74a379bf292..201efc7cd4c 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -29,7 +29,7 @@ jobs: BuildConfiguration: Release BuildPlatform: arm pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 timeoutInMinutes: 120 # how long to run the job before automatically cancelling cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them steps: @@ -131,7 +131,7 @@ jobs: BuildConfiguration: Release BuildPlatform: arm pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 timeoutInMinutes: 120 # how long to run the job before automatically cancelling cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them steps: @@ -163,7 +163,7 @@ jobs: - task: VSTest@2 displayName: Run Desktop Unit Tests - timeoutInMinutes: 10 # Set smaller timeout for UTs, since there have been some hangs, and this allows the job to timeout quicker + timeoutInMinutes: 5 # Set smaller timeout for UTs, since there have been some hangs, and this allows the job to timeout quicker condition: and(succeeded(), ne(variables['BuildPlatform'], 'ARM')) inputs: testSelector: 'testAssemblies' # Options: testAssemblies, testPlan, testRun @@ -266,7 +266,7 @@ jobs: dependsOn: RnwNativePRBuild displayName: React-Native-Windows Build and Pack Nuget pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 steps: - checkout: none #skip checking out the default repository resource From 770294113a3368b71a608ce405c7d4f6f8b77b43 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Wed, 5 Jun 2019 22:45:56 -0700 Subject: [PATCH 08/23] Back to vs2017-win2016 --- .ado/windows-vs-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index 201efc7cd4c..c2c686941d4 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -29,7 +29,7 @@ jobs: BuildConfiguration: Release BuildPlatform: arm pool: - vmImage: windows-2019 + vmImage: vs2017-win2016 timeoutInMinutes: 120 # how long to run the job before automatically cancelling cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them steps: @@ -131,7 +131,7 @@ jobs: BuildConfiguration: Release BuildPlatform: arm pool: - vmImage: windows-2019 + vmImage: vs2017-win2016 timeoutInMinutes: 120 # how long to run the job before automatically cancelling cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them steps: @@ -266,7 +266,7 @@ jobs: dependsOn: RnwNativePRBuild displayName: React-Native-Windows Build and Pack Nuget pool: - vmImage: windows-2019 + vmImage: vs2017-win2016 steps: - checkout: none #skip checking out the default repository resource From a1460707303b33fa8b6e8fb9588bbe4d676f42b8 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Wed, 5 Jun 2019 23:46:03 -0700 Subject: [PATCH 09/23] Add a timeout to the desktop UTs --- .ado/windows-vs-pr.yml | 2 +- vnext/Desktop.UnitTests/tests.runsettings | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 vnext/Desktop.UnitTests/tests.runsettings diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index c2c686941d4..6f1aa68848f 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -180,7 +180,7 @@ jobs: #vstestLocationMethod: 'version' # Optional. Options: version, location vsTestVersion: '15.0' # Optional. Options: latest, 15.0, 14.0, toolsInstaller #vstestLocation: # Optional - #runSettingsFile: # Optional + runSettingsFile: $(Build.SourcesDirectory)\vnext\Desktop.UnitTests\tests.runsettings # Optional #overrideTestrunParameters: # Optional #pathtoCustomTestAdapters: # Optional #runInParallel: False # Optional diff --git a/vnext/Desktop.UnitTests/tests.runsettings b/vnext/Desktop.UnitTests/tests.runsettings new file mode 100644 index 00000000000..9f0a7fa8140 --- /dev/null +++ b/vnext/Desktop.UnitTests/tests.runsettings @@ -0,0 +1,8 @@ + + + + + + 10000 + + \ No newline at end of file From faa968c22a998eaa4f5686e4321fac2c3a45dca2 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Thu, 6 Jun 2019 09:14:30 -0700 Subject: [PATCH 10/23] Disable bytecode tests to see if they are the ones hanging --- vnext/Desktop.UnitTests/BytecodeUnitTests.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vnext/Desktop.UnitTests/BytecodeUnitTests.cpp b/vnext/Desktop.UnitTests/BytecodeUnitTests.cpp index 9356fd128c8..c8bfddd34da 100644 --- a/vnext/Desktop.UnitTests/BytecodeUnitTests.cpp +++ b/vnext/Desktop.UnitTests/BytecodeUnitTests.cpp @@ -40,6 +40,9 @@ std::vector ReadFile(const char* filename) TEST_CLASS(BytecodeUnitTests) { + BEGIN_TEST_CLASS_ATTRIBUTE() + TEST_CLASS_ATTRIBUTE(L"Ignore", L"true") + END_TEST_CLASS_ATTRIBUTE() private: MinimalChakraRuntime m_chakraRuntime; From d8b0162275cbd516522533e0408862b0de6ac05f Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Thu, 6 Jun 2019 09:49:35 -0700 Subject: [PATCH 11/23] Try disabling websocket tests instead --- vnext/Desktop.UnitTests/BaseWebSocketTests.cpp | 4 ++++ vnext/Desktop.UnitTests/BytecodeUnitTests.cpp | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vnext/Desktop.UnitTests/BaseWebSocketTests.cpp b/vnext/Desktop.UnitTests/BaseWebSocketTests.cpp index 0b5ea05a108..e0a0e3ca098 100644 --- a/vnext/Desktop.UnitTests/BaseWebSocketTests.cpp +++ b/vnext/Desktop.UnitTests/BaseWebSocketTests.cpp @@ -21,6 +21,10 @@ using Error = IWebSocket::Error; TEST_CLASS(BaseWebSocketTest) { + BEGIN_TEST_CLASS_ATTRIBUTE() + TEST_CLASS_ATTRIBUTE(L"Ignore", L"true") + END_TEST_CLASS_ATTRIBUTE() + TEST_METHOD(CreateAndSetHandlers) { auto ws = make_unique(Url("ws://localhost")); diff --git a/vnext/Desktop.UnitTests/BytecodeUnitTests.cpp b/vnext/Desktop.UnitTests/BytecodeUnitTests.cpp index c8bfddd34da..9356fd128c8 100644 --- a/vnext/Desktop.UnitTests/BytecodeUnitTests.cpp +++ b/vnext/Desktop.UnitTests/BytecodeUnitTests.cpp @@ -40,9 +40,6 @@ std::vector ReadFile(const char* filename) TEST_CLASS(BytecodeUnitTests) { - BEGIN_TEST_CLASS_ATTRIBUTE() - TEST_CLASS_ATTRIBUTE(L"Ignore", L"true") - END_TEST_CLASS_ATTRIBUTE() private: MinimalChakraRuntime m_chakraRuntime; From c78e0293b1e946eaecbf5d9002b3692a27aed4c1 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Thu, 6 Jun 2019 10:50:15 -0700 Subject: [PATCH 12/23] Change nuget prep script to not create copies of files. - (Fix out of disk space error) --- .ado/templates/prep-and-pack-nuget.yml | 45 +++++++++----------------- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index 466b7a191e6..acf7a786e2c 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -36,36 +36,21 @@ steps: artifactName: ReactWindows-source downloadPath: $(System.DefaultWorkingDirectory) - - task: CopyFiles@2 - displayName: 'Copy Win32 debug x64 files' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)/ReactWindows-debug-x64' - TargetFolder: '$(System.DefaultWorkingDirectory)/NugetRoot/target/x64/Debug' - - task: CopyFiles@2 - displayName: 'Copy Win32 debug x86 files' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)/ReactWindows-debug-x86' - TargetFolder: '$(System.DefaultWorkingDirectory)/NugetRoot/target/x86/Debug' - - task: CopyFiles@2 - displayName: 'Copy Win32 ship x64 files' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)/ReactWindows-ship-x64' - TargetFolder: '$(System.DefaultWorkingDirectory)/NugetRoot/target/x64/ship' - - task: CopyFiles@2 - displayName: 'Copy Win32 ship x86 files' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)/ReactWindows-ship-x86' - TargetFolder: '$(System.DefaultWorkingDirectory)/NugetRoot/target/x86/ship' - - task: CopyFiles@2 - displayName: 'Copy arm debug' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)/ReactWindows-debug-arm' - TargetFolder: '$(System.DefaultWorkingDirectory)/NugetRoot/target/arm/debug' - - task: CopyFiles@2 - displayName: 'Copy arm ship' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)/ReactWindows-ship-arm' - TargetFolder: '$(System.DefaultWorkingDirectory)/NugetRoot/target/arm/ship' +- script: | + rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-x64 Debug + robocopy $(System.DefaultWorkingDirectory)/Debug $(System.DefaultWorkingDirectory)/NugetRoot/target/x64 /E /MOV + rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-x86 Debug + robocopy $(System.DefaultWorkingDirectory)/Debug $(System.DefaultWorkingDirectory)/NugetRoot/target/x86 /E /MOV + rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-x64 ship + robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/x64 /E /MOV + rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-x86 ship + robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/x86 /E /MOV + rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-arm debug + robocopy $(System.DefaultWorkingDirectory)/debug $(System.DefaultWorkingDirectory)/NugetRoot/target/arm /E /MOV + rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-arm ship + robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/arm /E /MOV + displayName: Copy files from Artifact dirs to nuget staging + - task: CopyFiles@2 displayName: 'Copy Nuget source files' inputs: From 04bf78d9cee3f170cf941c872479d357ff4331ed Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Thu, 6 Jun 2019 10:56:18 -0700 Subject: [PATCH 13/23] formatting --- .ado/templates/prep-and-pack-nuget.yml | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index acf7a786e2c..c4ce6affa39 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -36,20 +36,20 @@ steps: artifactName: ReactWindows-source downloadPath: $(System.DefaultWorkingDirectory) -- script: | - rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-x64 Debug - robocopy $(System.DefaultWorkingDirectory)/Debug $(System.DefaultWorkingDirectory)/NugetRoot/target/x64 /E /MOV - rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-x86 Debug - robocopy $(System.DefaultWorkingDirectory)/Debug $(System.DefaultWorkingDirectory)/NugetRoot/target/x86 /E /MOV - rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-x64 ship - robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/x64 /E /MOV - rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-x86 ship - robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/x86 /E /MOV - rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-arm debug - robocopy $(System.DefaultWorkingDirectory)/debug $(System.DefaultWorkingDirectory)/NugetRoot/target/arm /E /MOV - rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-arm ship - robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/arm /E /MOV - displayName: Copy files from Artifact dirs to nuget staging + - script: | + rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-x64 Debug + robocopy $(System.DefaultWorkingDirectory)/Debug $(System.DefaultWorkingDirectory)/NugetRoot/target/x64 /E /MOV + rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-x86 Debug + robocopy $(System.DefaultWorkingDirectory)/Debug $(System.DefaultWorkingDirectory)/NugetRoot/target/x86 /E /MOV + rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-x64 ship + robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/x64 /E /MOV + rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-x86 ship + robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/x86 /E /MOV + rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-arm debug + robocopy $(System.DefaultWorkingDirectory)/debug $(System.DefaultWorkingDirectory)/NugetRoot/target/arm /E /MOV + rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-arm ship + robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/arm /E /MOV + displayName: Copy files from Artifact dirs to nuget staging - task: CopyFiles@2 displayName: 'Copy Nuget source files' From 6a42a67bc5d580b69d95d134efaaa46f87498d51 Mon Sep 17 00:00:00 2001 From: Andrew Coates <> Date: Thu, 6 Jun 2019 12:38:42 -0700 Subject: [PATCH 14/23] use backslash for path seperators --- .ado/templates/prep-and-pack-nuget.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index c4ce6affa39..0914297b85a 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -37,18 +37,18 @@ steps: downloadPath: $(System.DefaultWorkingDirectory) - script: | - rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-x64 Debug - robocopy $(System.DefaultWorkingDirectory)/Debug $(System.DefaultWorkingDirectory)/NugetRoot/target/x64 /E /MOV - rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-x86 Debug - robocopy $(System.DefaultWorkingDirectory)/Debug $(System.DefaultWorkingDirectory)/NugetRoot/target/x86 /E /MOV - rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-x64 ship - robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/x64 /E /MOV - rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-x86 ship - robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/x86 /E /MOV - rename $(System.DefaultWorkingDirectory)/ReactWindows-debug-arm debug - robocopy $(System.DefaultWorkingDirectory)/debug $(System.DefaultWorkingDirectory)/NugetRoot/target/arm /E /MOV - rename $(System.DefaultWorkingDirectory)/ReactWindows-ship-arm ship - robocopy $(System.DefaultWorkingDirectory)/ship $(System.DefaultWorkingDirectory)/NugetRoot/target/arm /E /MOV + rename $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 Debug + robocopy $(System.DefaultWorkingDirectory)\Debug $(System.DefaultWorkingDirectory)\NugetRoot\target\x64 /E /MOV + rename $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 Debug + robocopy $(System.DefaultWorkingDirectory)\Debug $(System.DefaultWorkingDirectory)\NugetRoot\target\x86 /E /MOV + rename $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 ship + robocopy $(System.DefaultWorkingDirectory)\ship $(System.DefaultWorkingDirectory)\NugetRoot\target\x64 /E /MOV + rename $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 ship + robocopy $(System.DefaultWorkingDirectory)\ship $(System.DefaultWorkingDirectory)\NugetRoot\target\x86 /E /MOV + rename $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm debug + robocopy $(System.DefaultWorkingDirectory)\debug $(System.DefaultWorkingDirectory)\NugetRoot\target\arm /E /MOV + rename $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm ship + robocopy $(System.DefaultWorkingDirectory)\ship $(System.DefaultWorkingDirectory)\NugetRoot\target\arm /E /MOV displayName: Copy files from Artifact dirs to nuget staging - task: CopyFiles@2 From 92f4c390bfadc817c871667e979363e6e356f168 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Thu, 6 Jun 2019 20:38:32 -0700 Subject: [PATCH 15/23] more fix --- .ado/templates/prep-and-pack-nuget.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index 0914297b85a..23f5e6e8ee4 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -37,19 +37,13 @@ steps: downloadPath: $(System.DefaultWorkingDirectory) - script: | - rename $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 Debug - robocopy $(System.DefaultWorkingDirectory)\Debug $(System.DefaultWorkingDirectory)\NugetRoot\target\x64 /E /MOV - rename $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 Debug - robocopy $(System.DefaultWorkingDirectory)\Debug $(System.DefaultWorkingDirectory)\NugetRoot\target\x86 /E /MOV - rename $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 ship - robocopy $(System.DefaultWorkingDirectory)\ship $(System.DefaultWorkingDirectory)\NugetRoot\target\x64 /E /MOV - rename $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 ship - robocopy $(System.DefaultWorkingDirectory)\ship $(System.DefaultWorkingDirectory)\NugetRoot\target\x86 /E /MOV - rename $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm debug - robocopy $(System.DefaultWorkingDirectory)\debug $(System.DefaultWorkingDirectory)\NugetRoot\target\arm /E /MOV - rename $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm ship - robocopy $(System.DefaultWorkingDirectory)\ship $(System.DefaultWorkingDirectory)\NugetRoot\target\arm /E /MOV - displayName: Copy files from Artifact dirs to nuget staging + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\Debug /E /MOVE + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\Debug /E /MOVE + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\ship /E /MOVE + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\ship /E /MOVE + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\debug /E /MOVE + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\ship /E /MOVE + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE - task: CopyFiles@2 displayName: 'Copy Nuget source files' From 53bdced1c6112eb5bcf51ba7779a6da5d8058de5 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Thu, 6 Jun 2019 21:34:31 -0700 Subject: [PATCH 16/23] dont print % progress --- .ado/templates/prep-and-pack-nuget.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index 23f5e6e8ee4..5d00a7e14ce 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -37,19 +37,16 @@ steps: downloadPath: $(System.DefaultWorkingDirectory) - script: | - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\Debug /E /MOVE - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\Debug /E /MOVE - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\ship /E /MOVE - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\ship /E /MOVE - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\debug /E /MOVE - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\ship /E /MOVE - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\Debug /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\Debug /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\ship /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\ship /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\debug /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\ship /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE /NP + echo Done + displayName: Copy files from build artifacts to nuget root - - task: CopyFiles@2 - displayName: 'Copy Nuget source files' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)/ReactWindows-source' - TargetFolder: '$(System.DefaultWorkingDirectory)/NugetRoot' - task: PowerShell@2 displayName: Extract version from package.json, and put it in nuspec inputs: From 4abe31a8ffc3ecd4fdb5820cdae201fede3f922e Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Thu, 6 Jun 2019 22:42:38 -0700 Subject: [PATCH 17/23] try failOnStderr --- .ado/templates/prep-and-pack-nuget.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index 5d00a7e14ce..4ea7cbc6008 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -46,6 +46,7 @@ steps: robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE /NP echo Done displayName: Copy files from build artifacts to nuget root + failOnStderr: true - task: PowerShell@2 displayName: Extract version from package.json, and put it in nuspec From 6fcddffe1256969b99e66344852747f2f4da97c1 Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Thu, 6 Jun 2019 23:08:01 -0700 Subject: [PATCH 18/23] poke build --- .ado/templates/publish-build-artifacts-for-nuget.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.ado/templates/publish-build-artifacts-for-nuget.yml b/.ado/templates/publish-build-artifacts-for-nuget.yml index 5aa1065b650..d177ea60acb 100644 --- a/.ado/templates/publish-build-artifacts-for-nuget.yml +++ b/.ado/templates/publish-build-artifacts-for-nuget.yml @@ -1,6 +1,4 @@ - steps: - - task: BatchScript@1 displayName: 'Copy Nuget source files' inputs: From 84acf5357846dda24d87956fc528591ac30fa9ad Mon Sep 17 00:00:00 2001 From: "Andrew Coates (REDMOND)" Date: Thu, 6 Jun 2019 23:46:50 -0700 Subject: [PATCH 19/23] switch to powershell --- .ado/templates/prep-and-pack-nuget.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index 4ea7cbc6008..4ceab69b1e7 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -36,17 +36,18 @@ steps: artifactName: ReactWindows-source downloadPath: $(System.DefaultWorkingDirectory) - - script: | - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\Debug /E /MOVE /NP - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\Debug /E /MOVE /NP - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\ship /E /MOVE /NP - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\ship /E /MOVE /NP - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\debug /E /MOVE /NP - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\ship /E /MOVE /NP - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE /NP - echo Done + - task: PowerShell@2 displayName: Copy files from build artifacts to nuget root - failOnStderr: true + inputs: + targetType: inline # filePath | inline + script: | + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\Debug /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\Debug /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\ship /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\ship /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\debug /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\ship /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE /NP - task: PowerShell@2 displayName: Extract version from package.json, and put it in nuspec From d64f85ec9e89dbf98faa9ec887c0b01058a9dda0 Mon Sep 17 00:00:00 2001 From: "REDMOND\\acoates" Date: Fri, 7 Jun 2019 09:44:54 -0700 Subject: [PATCH 20/23] Try again --- .ado/templates/prep-and-pack-nuget.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index 4ceab69b1e7..f2ba72019c8 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -41,13 +41,14 @@ steps: inputs: targetType: inline # filePath | inline script: | + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE /NP robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\Debug /E /MOVE /NP robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\Debug /E /MOVE /NP robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\ship /E /MOVE /NP robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\ship /E /MOVE /NP robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\debug /E /MOVE /NP robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\ship /E /MOVE /NP - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE /NP + echo Done - task: PowerShell@2 displayName: Extract version from package.json, and put it in nuspec From d25bfc58c828f44c682c509233304371c5609119 Mon Sep 17 00:00:00 2001 From: "REDMOND\\acoates" Date: Fri, 7 Jun 2019 10:26:19 -0700 Subject: [PATCH 21/23] Split copy script into seperate steps --- .ado/templates/prep-and-pack-nuget.yml | 37 +++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index f2ba72019c8..9b52c12597f 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -42,13 +42,48 @@ steps: targetType: inline # filePath | inline script: | robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE /NP + + - task: PowerShell@2 + displayName: Copy files from build artifacts to nuget root + inputs: + targetType: inline # filePath | inline + script: | robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\Debug /E /MOVE /NP + + - task: PowerShell@2 + displayName: Copy files from build artifacts to nuget root + inputs: + targetType: inline # filePath | inline + script: | robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\Debug /E /MOVE /NP + + - task: PowerShell@2 + displayName: Copy files from build artifacts to nuget root + inputs: + targetType: inline # filePath | inline + script: | robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\ship /E /MOVE /NP + + - task: PowerShell@2 + displayName: Copy files from build artifacts to nuget root + inputs: + targetType: inline # filePath | inline + script: | robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\ship /E /MOVE /NP + + - task: PowerShell@2 + displayName: Copy files from build artifacts to nuget root + inputs: + targetType: inline # filePath | inline + script: | robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\debug /E /MOVE /NP + + - task: PowerShell@2 + displayName: Copy files from build artifacts to nuget root + inputs: + targetType: inline # filePath | inline + script: | robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\ship /E /MOVE /NP - echo Done - task: PowerShell@2 displayName: Extract version from package.json, and put it in nuspec From 31f723a3e64cdd09217c9a1329f3029444db79d9 Mon Sep 17 00:00:00 2001 From: "REDMOND\\acoates" Date: Fri, 7 Jun 2019 11:46:15 -0700 Subject: [PATCH 22/23] Move to script instead of inline ps --- .ado/copy-build-artifacts-to-nugetroot.ps1 | 16 ++++++ .ado/templates/prep-and-pack-nuget.yml | 59 +--------------------- 2 files changed, 17 insertions(+), 58 deletions(-) create mode 100644 .ado/copy-build-artifacts-to-nugetroot.ps1 diff --git a/.ado/copy-build-artifacts-to-nugetroot.ps1 b/.ado/copy-build-artifacts-to-nugetroot.ps1 new file mode 100644 index 00000000000..87183b9a2c8 --- /dev/null +++ b/.ado/copy-build-artifacts-to-nugetroot.ps1 @@ -0,0 +1,16 @@ +robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-source $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot /E /MOVE /NP +robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-debug-x64 $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\x64\Debug /E /MOVE /NP +robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-debug-x86 $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\x86\Debug /E /MOVE /NP +robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-ship-x64 $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\x64\ship /E /MOVE /NP +robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-ship-x86 $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\x86\ship /E /MOVE /NP +robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-debug-arm $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\arm\debug /E /MOVE /NP +robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-ship-arm $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\arm\ship /E /MOVE /NP + +if (Test-Path $env:SYSTEM_DEFAULTWORKINGDIRECTORY/UpdatedPackageJson/package.json) { + $lines = Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/UpdatedPackageJson/package.json | Where {$_ -match '^\s*"version":.*'} + $npmVersion = $lines.Trim().Split()[1].Trim('",'); +} else { + $npmVersion = "0.0.1-pr" +} +(Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactWin32.nuspec).replace('__BuildBuildNumber__', $npmVersion) | Set-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactWin32.nuspec +(Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactUwp.nuspec).replace('__BuildBuildNumber__', $npmVersion) | Set-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactUwp.nuspec diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index 9b52c12597f..e8e3ff8920d 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -39,65 +39,8 @@ steps: - task: PowerShell@2 displayName: Copy files from build artifacts to nuget root inputs: - targetType: inline # filePath | inline - script: | - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE /NP + filePath: ./.ado/copy-build-artifacts-to-nugetroot.ps1 - - task: PowerShell@2 - displayName: Copy files from build artifacts to nuget root - inputs: - targetType: inline # filePath | inline - script: | - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\Debug /E /MOVE /NP - - - task: PowerShell@2 - displayName: Copy files from build artifacts to nuget root - inputs: - targetType: inline # filePath | inline - script: | - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\Debug /E /MOVE /NP - - - task: PowerShell@2 - displayName: Copy files from build artifacts to nuget root - inputs: - targetType: inline # filePath | inline - script: | - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\ship /E /MOVE /NP - - - task: PowerShell@2 - displayName: Copy files from build artifacts to nuget root - inputs: - targetType: inline # filePath | inline - script: | - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\ship /E /MOVE /NP - - - task: PowerShell@2 - displayName: Copy files from build artifacts to nuget root - inputs: - targetType: inline # filePath | inline - script: | - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\debug /E /MOVE /NP - - - task: PowerShell@2 - displayName: Copy files from build artifacts to nuget root - inputs: - targetType: inline # filePath | inline - script: | - robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\ship /E /MOVE /NP - - - task: PowerShell@2 - displayName: Extract version from package.json, and put it in nuspec - inputs: - targetType: inline # filePath | inline - script: | - if (Test-Path $env:SYSTEM_DEFAULTWORKINGDIRECTORY/UpdatedPackageJson/package.json) { - $lines = Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/UpdatedPackageJson/package.json | Where {$_ -match '^\s*"version":.*'} - $npmVersion = $lines.Trim().Split()[1].Trim('",'); - } else { - $npmVersion = "0.0.1-pr" - } - (Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactWin32.nuspec).replace('__BuildBuildNumber__', $npmVersion) | Set-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactWin32.nuspec - (Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactUwp.nuspec).replace('__BuildBuildNumber__', $npmVersion) | Set-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactUwp.nuspec - task: NuGetCommand@2 displayName: 'NuGet pack' inputs: From 12aababc45be3b135c134c5d93d69ebc6e697abb Mon Sep 17 00:00:00 2001 From: "REDMOND\\acoates" Date: Fri, 7 Jun 2019 12:24:20 -0700 Subject: [PATCH 23/23] more try --- .ado/copy-build-artifacts-to-nugetroot.ps1 | 16 -------------- .ado/templates/prep-and-pack-nuget.yml | 25 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 17 deletions(-) delete mode 100644 .ado/copy-build-artifacts-to-nugetroot.ps1 diff --git a/.ado/copy-build-artifacts-to-nugetroot.ps1 b/.ado/copy-build-artifacts-to-nugetroot.ps1 deleted file mode 100644 index 87183b9a2c8..00000000000 --- a/.ado/copy-build-artifacts-to-nugetroot.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-source $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot /E /MOVE /NP -robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-debug-x64 $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\x64\Debug /E /MOVE /NP -robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-debug-x86 $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\x86\Debug /E /MOVE /NP -robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-ship-x64 $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\x64\ship /E /MOVE /NP -robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-ship-x86 $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\x86\ship /E /MOVE /NP -robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-debug-arm $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\arm\debug /E /MOVE /NP -robocopy $env:SYSTEM_DEFAULTWORKINGDIRECTORY\ReactWindows-ship-arm $env:SYSTEM_DEFAULTWORKINGDIRECTORY\NugetRoot\target\arm\ship /E /MOVE /NP - -if (Test-Path $env:SYSTEM_DEFAULTWORKINGDIRECTORY/UpdatedPackageJson/package.json) { - $lines = Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/UpdatedPackageJson/package.json | Where {$_ -match '^\s*"version":.*'} - $npmVersion = $lines.Trim().Split()[1].Trim('",'); -} else { - $npmVersion = "0.0.1-pr" -} -(Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactWin32.nuspec).replace('__BuildBuildNumber__', $npmVersion) | Set-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactWin32.nuspec -(Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactUwp.nuspec).replace('__BuildBuildNumber__', $npmVersion) | Set-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactUwp.nuspec diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index e8e3ff8920d..b7ce2fcb293 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -39,7 +39,30 @@ steps: - task: PowerShell@2 displayName: Copy files from build artifacts to nuget root inputs: - filePath: ./.ado/copy-build-artifacts-to-nugetroot.ps1 + ignoreLASTEXITCODE: true + targetType: inline # filePath | inline + script: | + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-source $(System.DefaultWorkingDirectory)\NugetRoot /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\Debug /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\Debug /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x64 $(System.DefaultWorkingDirectory)\NugetRoot\target\x64\ship /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-x86 $(System.DefaultWorkingDirectory)\NugetRoot\target\x86\ship /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-debug-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\debug /E /MOVE /NP + robocopy $(System.DefaultWorkingDirectory)\ReactWindows-ship-arm $(System.DefaultWorkingDirectory)\NugetRoot\target\arm\ship /E /MOVE /NP + + - task: PowerShell@2 + displayName: Extract version from package.json, and put it in nuspec + inputs: + targetType: inline # filePath | inline + script: | + if (Test-Path $env:SYSTEM_DEFAULTWORKINGDIRECTORY/UpdatedPackageJson/package.json) { + $lines = Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/UpdatedPackageJson/package.json | Where {$_ -match '^\s*"version":.*'} + $npmVersion = $lines.Trim().Split()[1].Trim('",'); + } else { + $npmVersion = "0.0.1-pr" + } + (Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactWin32.nuspec).replace('__BuildBuildNumber__', $npmVersion) | Set-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactWin32.nuspec + (Get-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactUwp.nuspec).replace('__BuildBuildNumber__', $npmVersion) | Set-Content $env:SYSTEM_DEFAULTWORKINGDIRECTORY/NugetRoot/ReactUwp.nuspec - task: NuGetCommand@2 displayName: 'NuGet pack'