From fb8740b578c8f8120bf0300dee65c7638d345384 Mon Sep 17 00:00:00 2001 From: rasaha91 <55814622+rasaha91@users.noreply.github.com> Date: Mon, 11 Jul 2022 12:28:21 -0700 Subject: [PATCH 1/3] Merge pull request #1250 from rasaha91/add-rntester-to-artifacts Publish rn-tester apks and bundle to build artifacts --- .ado/android-pr.yml | 26 ---------------- .ado/publish.yml | 15 +++------- .ado/templates/android-build-office.yml | 40 +++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 37 deletions(-) diff --git a/.ado/android-pr.yml b/.ado/android-pr.yml index 2fa6ba1be1fdb1..6bd4ea57917655 100644 --- a/.ado/android-pr.yml +++ b/.ado/android-pr.yml @@ -31,32 +31,6 @@ jobs: - template: templates/android-build-office.yml - - task: CmdLine@2 - displayName: Remove RNTesterApp.android.bundle - inputs: - script: rm -f ./packages/rn-tester/js/RNTesterApp.android.bundle - - - task: CmdLine@2 - displayName: Create RNTester bundle - inputs: - script: node cli.js bundle --entry-file ./packages/rn-tester/js/RNTesterApp.android.js --bundle-output ./packages/rn-tester/js/RNTesterApp.android.bundle --platform android - - - task: CmdLine@2 - displayName: gradlew installArchives - inputs: - script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew installArchives -Pparam="excludeLibs" - - # We have separate tasks to build rn-tester for debug and release due to a regression upstream. See https://github.com/facebook/react-native/issues/34168. - - task: CmdLine@2 - displayName: Build rn-tester debug - inputs: - script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew :packages:rn-tester:android:app:assembleDebug - - - task: CmdLine@2 - displayName: Build rn-tester release - inputs: - script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew :packages:rn-tester:android:app:assembleRelease - - template: templates/prep-android-nuget.yml - template: templates/download-android-dependencies.yml diff --git a/.ado/publish.yml b/.ado/publish.yml index 4975968183601b..41da5ff1b2a940 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -208,19 +208,12 @@ jobs: inputs: script: node .ado/removeWorkspaceConfig.js - - task: CmdLine@2 - displayName: gradlew installArchives - inputs: - script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew installArchives -Pparam="excludeLibs" - - - template: templates\prep-android-nuget.yml + - template: templates/prep-android-nuget.yml # Enumerate and download all dependencies .. - - task: CmdLine@2 - displayName: 'Verify Dependencies can be enumerated' - inputs: - script: sudo apt-get install python3-pip && sudo apt-get install python3-setuptools && pip3 install BeautifulSoup4 && pip3 install wheel && pip3 install wget && python3 .ado/downloadAndroidDependencies.py $(Build.SourcesDirectory) && tree $(Build.SourcesDirectory)/android - + - template: templates/download-android-dependencies.yml + parameters: + artifact_feed: react-native/react-native-public # Very similar to the default pack task .. but appends 'ndk21b' to the nuget pack version - task: CmdLine@2 diff --git a/.ado/templates/android-build-office.yml b/.ado/templates/android-build-office.yml index e09f41670b1ca8..d51a2eae2a9816 100644 --- a/.ado/templates/android-build-office.yml +++ b/.ado/templates/android-build-office.yml @@ -55,3 +55,43 @@ steps: displayName: Setup Build Dependencies inputs: script: chmod +x .ado/setup_droid_deps.sh && .ado/setup_droid_deps.sh + + - task: CmdLine@2 + displayName: Remove RNTesterApp.android.bundle + inputs: + script: rm -f ./packages/rn-tester/js/RNTesterApp.android.bundle + + - task: CmdLine@2 + displayName: Create RNTester bundle + inputs: + script: node cli.js bundle --entry-file ./packages/rn-tester/js/RNTesterApp.android.js --bundle-output ./packages/rn-tester/js/RNTesterApp.android.bundle --platform android + + - task: CmdLine@2 + displayName: gradlew installArchives + inputs: + script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew installArchives -Pparam="excludeLibs" + + # We have separate tasks to build rn-tester for debug and release due to a regression upstream. See https://github.com/facebook/react-native/issues/34168. + - task: CmdLine@2 + displayName: Build rn-tester debug + inputs: + script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew :packages:rn-tester:android:app:assembleDebug + + - task: CmdLine@2 + displayName: Build rn-tester release + inputs: + script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew :packages:rn-tester:android:app:assembleRelease + + - task: CopyFiles@2 + displayName: 'Copy rn-tester apks to build artifacts' + inputs: + SourceFolder: '$(System.DefaultWorkingDirectory)/packages/rn-tester/android/app/build/outputs/apk' + Contents: '**' + TargetFolder: '$(Build.StagingDirectory)/final/rn-tester' + + - task: CopyFiles@2 + displayName: 'Copy rn-tester android bundle to build artifacts' + inputs: + SourceFolder: '$(System.DefaultWorkingDirectory)/packages/rn-tester/js' + Contents: 'RNTesterApp.android.bundle' + TargetFolder: '$(Build.StagingDirectory)/final/rn-tester' \ No newline at end of file From 9c91703e00cb7f04a89f5290e1718929231bb755 Mon Sep 17 00:00:00 2001 From: rasaha91 <55814622+rasaha91@users.noreply.github.com> Date: Mon, 11 Jul 2022 23:09:00 -0700 Subject: [PATCH 2/3] Merge pull request #1254 from rasaha91/fix-incorrect-feed Use the Office feed for the publish pipeline --- .ado/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ado/publish.yml b/.ado/publish.yml index 41da5ff1b2a940..75c4d0fb2131d7 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -213,7 +213,7 @@ jobs: # Enumerate and download all dependencies .. - template: templates/download-android-dependencies.yml parameters: - artifact_feed: react-native/react-native-public + artifact_feed: Office # Very similar to the default pack task .. but appends 'ndk21b' to the nuget pack version - task: CmdLine@2 From 3d8691c29d2c7273cd934dc532cb61a2817d8da2 Mon Sep 17 00:00:00 2001 From: rasaha91 <55814622+rasaha91@users.noreply.github.com> Date: Tue, 12 Jul 2022 11:37:50 -0700 Subject: [PATCH 3/3] Merge pull request #1255 from rasaha91/fix-missing-requests Fix missing requests python package --- .ado/templates/download-android-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ado/templates/download-android-dependencies.yml b/.ado/templates/download-android-dependencies.yml index 41d1cc80de3429..50b565f86ad01e 100644 --- a/.ado/templates/download-android-dependencies.yml +++ b/.ado/templates/download-android-dependencies.yml @@ -11,4 +11,4 @@ steps: - task: CmdLine@2 displayName: 'Verify Dependencies can be enumerated' inputs: - script: pip3 install maven-dependency-utils==1.22.0 && python3 .ado/downloadAndroidDependencies.py $(Build.SourcesDirectory) && tree $(Build.SourcesDirectory)/android + script: pip3 install maven-dependency-utils==1.22.0 requests && python3 .ado/downloadAndroidDependencies.py $(Build.SourcesDirectory) && tree $(Build.SourcesDirectory)/android