diff --git a/.buildkite/browser-pipeline.yml b/.buildkite/basic/browser-pipeline.yml similarity index 100% rename from .buildkite/browser-pipeline.yml rename to .buildkite/basic/browser-pipeline.yml diff --git a/.buildkite/electron-pipeline.yml b/.buildkite/basic/electron-pipeline.yml similarity index 100% rename from .buildkite/electron-pipeline.yml rename to .buildkite/basic/electron-pipeline.yml diff --git a/.buildkite/node-pipeline.yml b/.buildkite/basic/node-pipeline.yml similarity index 100% rename from .buildkite/node-pipeline.yml rename to .buildkite/basic/node-pipeline.yml diff --git a/.buildkite/basic/react-native-android-pipeline.yml b/.buildkite/basic/react-native-android-pipeline.yml new file mode 100644 index 0000000000..575e487d26 --- /dev/null +++ b/.buildkite/basic/react-native-android-pipeline.yml @@ -0,0 +1,107 @@ +steps: + + - group: "React Native (Android) Tests" + steps: + # + # Android builder + # + - label: ":docker: Build RN Android Builder image" + key: "android-builder-image" + timeout_in_minutes: 30 + plugins: + - docker-compose#v4.12.0: + build: react-native-android-builder + image-repository: 855461928731.dkr.ecr.us-west-1.amazonaws.com/js + cache-from: react-native-android-builder:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-${BRANCH_NAME} + - docker-compose#v4.12.0: + push: react-native-android-builder:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-${BRANCH_NAME} + + # + # Test fixtures + # + - label: ":android: Build RN 0.72 (Old Arch) apk" + key: "rn-0-72-old-arch-apk" + depends_on: + - "android-builder-image" + timeout_in_minutes: 60 + env: + REACT_NATIVE_VERSION: "rn0.72" + RN_NEW_ARCH: "false" + ARTEFACT_NAME: "rn0.72-old-arch" + plugins: + - docker-compose#v4.12.0: + pull: react-native-android-builder + run: react-native-android-builder + artifact_paths: + - build/rn0.72-old-arch.apk + + - label: ":android: Build RN 0.72 (New Arch) apk" + key: "rn-0-72-new-arch-apk" + depends_on: + - "android-builder-image" + timeout_in_minutes: 60 + env: + REACT_NATIVE_VERSION: "rn0.72" + RN_NEW_ARCH: "true" + ARTEFACT_NAME: "rn0.72-new-arch" + plugins: + - docker-compose#v4.12.0: + pull: react-native-android-builder + run: react-native-android-builder + artifact_paths: + - build/rn0.72-new-arch.apk + + # + # End-to-end tests + # + - label: ":bitbar: :android: RN 0.72 (Old Arch) Android 12 end-to-end tests" + depends_on: "rn-0-72-old-arch-apk" + timeout_in_minutes: 60 + plugins: + artifacts#v1.9.0: + download: "build/rn0.72-old-arch.apk" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.7.0: + pull: react-native-maze-runner + run: react-native-maze-runner + service-ports: true + command: + - --app=build/rn0.72-old-arch.apk + - --farm=bb + - --device=ANDROID_12 + - --a11y-locator + - --fail-fast + - --no-tunnel + - --aws-public-ip + env: + SKIP_NAVIGATION_SCENARIOS: "true" + HERMES: "true" + concurrency: 25 + concurrency_group: "bitbar-app" + concurrency_method: eager + + - label: ":bitbar: :android: RN 0.72 (New Arch) Android 12 end-to-end tests" + depends_on: "rn-0-72-new-arch-apk" + timeout_in_minutes: 60 + plugins: + artifacts#v1.9.0: + download: "build/rn0.72-new-arch.apk" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.7.0: + pull: react-native-maze-runner + run: react-native-maze-runner + service-ports: true + command: + - --app=build/rn0.72-new-arch.apk + - --farm=bb + - --device=ANDROID_12 + - --a11y-locator + - --fail-fast + - --no-tunnel + - --aws-public-ip + env: + SKIP_NAVIGATION_SCENARIOS: "true" + HERMES: "true" + concurrency: 25 + concurrency_group: "bitbar-app" + concurrency_method: eager diff --git a/.buildkite/basic/react-native-ios-pipeline.yml b/.buildkite/basic/react-native-ios-pipeline.yml new file mode 100644 index 0000000000..ae949565d8 --- /dev/null +++ b/.buildkite/basic/react-native-ios-pipeline.yml @@ -0,0 +1,90 @@ +steps: + + - group: "React Native (iOS) Tests" + steps: + + # + # Test fixtures + # + - label: ":ios: Build RN 0.72 (Old Arch) ipa" + key: "rn-0-72-old-arch-ipa" + timeout_in_minutes: 60 + agents: + queue: "opensource-arm-mac-cocoa-12" + env: + REACT_NATIVE_VERSION: "rn0.72" + LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode14.app" + RCT_NEW_ARCH_ENABLED: "0" + ARTEFACT_NAME: "rn0.72-old-arch" + artifact_paths: build/rn0.72-old-arch.ipa + commands: + - npm run test:build-react-native-ios + + - label: ":ios: Build RN 0.72 (New Arch) ipa" + key: "rn-0-72-new-arch-ipa" + timeout_in_minutes: 60 + agents: + queue: "opensource-arm-mac-cocoa-12" + env: + REACT_NATIVE_VERSION: "rn0.72" + LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode14.app" + RCT_NEW_ARCH_ENABLED: "1" + ARTEFACT_NAME: "rn0.72-new-arch" + artifact_paths: build/rn0.72-new-arch.ipa + commands: + - npm run test:build-react-native-ios + + # + # End-to-end tests + # + - label: ":ios: RN 0.72 (Old Arch) iOS 14 end-to-end tests" + depends_on: "rn-0-72-old-arch-ipa" + timeout_in_minutes: 60 + plugins: + artifacts#v1.5.0: + download: "build/rn0.72-old-arch.ipa" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.12.0: + pull: react-native-maze-runner + run: react-native-maze-runner + use-aliases: true + command: + - --app=build/rn0.72-old-arch.ipa + - --farm=bs + - --device=IOS_14 + - --a11y-locator + - --appium-version=1.18.0 + - --fail-fast + env: + SKIP_NAVIGATION_SCENARIOS: "true" + HERMES: "true" + concurrency: 5 + concurrency_group: "browserstack-app" + concurrency_method: eager + + - label: ":ios: RN 0.72 (New Arch) iOS 14 end-to-end tests" + depends_on: "rn-0-72-new-arch-ipa" + timeout_in_minutes: 60 + plugins: + artifacts#v1.5.0: + download: "build/rn0.72-new-arch.ipa" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.12.0: + pull: react-native-maze-runner + run: react-native-maze-runner + use-aliases: true + command: + - --app=build/rn0.72-new-arch.ipa + - --farm=bs + - --device=IOS_14 + - --a11y-locator + - --appium-version=1.18.0 + - --fail-fast + env: + SKIP_NAVIGATION_SCENARIOS: "true" + HERMES: "true" + concurrency: 5 + concurrency_group: "browserstack-app" + concurrency_method: eager diff --git a/.buildkite/full/block.yml b/.buildkite/full/block.yml new file mode 100644 index 0000000000..b57fbfdead --- /dev/null +++ b/.buildkite/full/block.yml @@ -0,0 +1,7 @@ +steps: + - block: 'Trigger a full build' + key: 'trigger-full-build' + + - label: 'Upload the full test pipeline' + depends_on: 'trigger-full-build' + command: buildkite-agent pipeline upload .buildkite/full/pipeline.full.yml diff --git a/.buildkite/full/pipeline.full.yml b/.buildkite/full/pipeline.full.yml new file mode 100644 index 0000000000..9a3da5b684 --- /dev/null +++ b/.buildkite/full/pipeline.full.yml @@ -0,0 +1,61 @@ +steps: + + # + # Upload full React Native pipelines + # + - label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: FULL REACT NATIVE (ANDROID) STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:" + depends_on: + - "publish-js" + - "android-builder-image" + commands: + - buildkite-agent pipeline upload .buildkite/full/react-native-android-pipeline.full.yml + + - label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: FULL REACT NATIVE (IOS) STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:" + depends_on: + - "publish-js" + commands: + - buildkite-agent pipeline upload .buildkite/full/react-native-ios-pipeline.full.yml + + - label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: REACT NATIVE CLI STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:" + depends_on: + - "publish-js" + - "android-builder-base" + commands: + - buildkite-agent pipeline upload .buildkite/full/react-native-cli-pipeline.full.yml + + # + # Trigger Expo pipelines + # + - label: "@bugsnag/expo latest" + depends_on: "publish-js" + trigger: "bugsnag-expo" + build: + # don't specify 'branch' here so we build the default branch in the expo + # repo, which should be the most up-to-date @bugsnag/expo version + env: + BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}" + BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}" + # a branch name that's safe to use as a docker cache identifier + BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}" + + - label: "@bugsnag/expo v48/next" + depends_on: "publish-js" + trigger: "bugsnag-expo" + build: + branch: "v48/next" + env: + BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}" + BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}" + # a branch name that's safe to use as a docker cache identifier + BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}" + + - label: "@bugsnag/expo v47/next" + depends_on: "publish-js" + trigger: "bugsnag-expo" + build: + branch: "v47/next" + env: + BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}" + BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}" + # a branch name that's safe to use as a docker cache identifier + BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}" \ No newline at end of file diff --git a/.buildkite/react-native-android-pipeline.yml b/.buildkite/full/react-native-android-pipeline.full.yml similarity index 79% rename from .buildkite/react-native-android-pipeline.yml rename to .buildkite/full/react-native-android-pipeline.full.yml index 7251a8f155..85e6661125 100644 --- a/.buildkite/react-native-android-pipeline.yml +++ b/.buildkite/full/react-native-android-pipeline.full.yml @@ -2,20 +2,6 @@ steps: - group: "React Native (Android) Tests" steps: - # - # Android builder - # - - label: ":docker: Build RN Android Builder image" - key: "android-builder-image" - timeout_in_minutes: 30 - plugins: - - docker-compose#v4.12.0: - build: react-native-android-builder - image-repository: 855461928731.dkr.ecr.us-west-1.amazonaws.com/js - cache-from: react-native-android-builder:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-${BRANCH_NAME} - - docker-compose#v4.12.0: - push: react-native-android-builder:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-${BRANCH_NAME} - # # Test fixtures # @@ -29,6 +15,7 @@ steps: LANG: "en_US.UTF-8" plugins: - docker-compose#v4.12.0: + pull: react-native-android-builder run: react-native-android-builder artifact_paths: - build/rn0.60.apk @@ -42,6 +29,7 @@ steps: REACT_NATIVE_VERSION: "rn0.66" plugins: - docker-compose#v4.12.0: + pull: react-native-android-builder run: react-native-android-builder artifact_paths: - build/rn0.66.apk @@ -55,6 +43,7 @@ steps: REACT_NATIVE_VERSION: "rn0.67" plugins: - docker-compose#v4.12.0: + pull: react-native-android-builder run: react-native-android-builder artifact_paths: - build/rn0.67.apk @@ -68,6 +57,7 @@ steps: REACT_NATIVE_VERSION: "rn0.68-hermes" plugins: - docker-compose#v4.12.0: + pull: react-native-android-builder run: react-native-android-builder artifact_paths: - build/rn0.68-hermes.apk @@ -81,10 +71,43 @@ steps: REACT_NATIVE_VERSION: "rn0.69" plugins: - docker-compose#v4.12.0: + pull: react-native-android-builder run: react-native-android-builder artifact_paths: - build/rn0.69.apk + - label: ":android: Build RN 0.71 (Old Arch) apk" + key: "rn-0-71-old-arch-apk" + depends_on: + - "android-builder-image" + timeout_in_minutes: 60 + env: + REACT_NATIVE_VERSION: "rn0.71" + RN_NEW_ARCH: "false" + ARTEFACT_NAME: "rn0.71-old-arch" + plugins: + - docker-compose#v4.12.0: + pull: react-native-android-builder + run: react-native-android-builder + artifact_paths: + - build/rn0.71-old-arch.apk + + - label: ":android: Build RN 0.71 (New Arch) apk" + key: "rn-0-71-new-arch-apk" + depends_on: + - "android-builder-image" + timeout_in_minutes: 60 + env: + REACT_NATIVE_VERSION: "rn0.71" + RN_NEW_ARCH: "true" + ARTEFACT_NAME: "rn0.71-new-arch" + plugins: + - docker-compose#v4.12.0: + pull: react-native-android-builder + run: react-native-android-builder + artifact_paths: + - build/rn0.71-new-arch.apk + - label: ":android: Build react-navigation 0.60 apk" key: "react-navigation-0-60-apk" depends_on: @@ -96,6 +119,7 @@ steps: ARTEFACT_NAME: "r_navigation_0.60" plugins: - docker-compose#v4.12.0: + pull: react-native-android-builder run: react-native-android-builder artifact_paths: - build/r_navigation_0.60.apk @@ -111,6 +135,7 @@ steps: ARTEFACT_NAME: "r_navigation_0.69" plugins: - docker-compose#v4.12.0: + pull: react-native-android-builder run: react-native-android-builder artifact_paths: - build/r_navigation_0.69.apk @@ -126,6 +151,7 @@ steps: ARTEFACT_NAME: "r_native_navigation_0.60" plugins: - docker-compose#v4.12.0: + pull: react-native-android-builder run: react-native-android-builder artifact_paths: - build/r_native_navigation_0.60.apk @@ -141,6 +167,7 @@ steps: ARTEFACT_NAME: "r_native_navigation_0.66" plugins: - docker-compose#v4.12.0: + pull: react-native-android-builder run: react-native-android-builder artifact_paths: - build/r_native_navigation_0.66.apk @@ -276,6 +303,58 @@ steps: concurrency_group: 'bitbar-app' concurrency_method: eager + - label: ":bitbar: :android: RN 0.71 (Old Arch) Android 12 end-to-end tests" + depends_on: "rn-0-71-old-arch-apk" + timeout_in_minutes: 60 + plugins: + artifacts#v1.9.0: + download: "build/rn0.71-old-arch.apk" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.7.0: + pull: react-native-maze-runner + run: react-native-maze-runner + service-ports: true + command: + - --app=build/rn0.71-old-arch.apk + - --farm=bb + - --device=ANDROID_12 + - --a11y-locator + - --fail-fast + - --no-tunnel + - --aws-public-ip + env: + SKIP_NAVIGATION_SCENARIOS: "true" + HERMES: "true" + concurrency: 25 + concurrency_group: "bitbar-app" + concurrency_method: eager + + - label: ":bitbar: :android: RN 0.71 (New Arch) Android 12 end-to-end tests" + depends_on: "rn-0-71-new-arch-apk" + timeout_in_minutes: 60 + plugins: + artifacts#v1.9.0: + download: "build/rn0.71-new-arch.apk" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.7.0: + pull: react-native-maze-runner + run: react-native-maze-runner + service-ports: true + command: + - --app=build/rn0.71-new-arch.apk + - --farm=bb + - --device=ANDROID_12 + - --a11y-locator + - --fail-fast + - --no-tunnel + - --aws-public-ip + env: + SKIP_NAVIGATION_SCENARIOS: "true" + HERMES: "true" + concurrency: 25 + concurrency_group: "bitbar-app" + concurrency_method: eager + - label: ":bitbar: :android: react-navigation 0.60 Android end-to-end tests" depends_on: "react-navigation-0-60-apk" timeout_in_minutes: 60 diff --git a/.buildkite/react-native-cli-pipeline.yml b/.buildkite/full/react-native-cli-pipeline.full.yml similarity index 99% rename from .buildkite/react-native-cli-pipeline.yml rename to .buildkite/full/react-native-cli-pipeline.full.yml index b63a0b66f2..b9823b470c 100644 --- a/.buildkite/react-native-cli-pipeline.yml +++ b/.buildkite/full/react-native-cli-pipeline.full.yml @@ -377,7 +377,7 @@ steps: key: "rn-cli-0-60-ipa" timeout_in_minutes: 30 agents: - queue: "ms-mac-10-15-5" + queue: "macos-10.15" env: DEBUG: true LANG: "en_US.UTF-8" @@ -390,7 +390,7 @@ steps: key: "rn-cli-0-61-ipa" timeout_in_minutes: 30 agents: - queue: "ms-mac-10-15-5" + queue: "macos-10.15" env: DEBUG: true LANG: "en_US.UTF-8" @@ -403,7 +403,7 @@ steps: key: "rn-cli-0-62-ipa" timeout_in_minutes: 30 agents: - queue: "ms-mac-10-15-5" + queue: "macos-10.15" env: DEBUG: true LANG: "en_US.UTF-8" diff --git a/.buildkite/react-native-ios-pipeline.yml b/.buildkite/full/react-native-ios-pipeline.full.yml similarity index 81% rename from .buildkite/react-native-ios-pipeline.yml rename to .buildkite/full/react-native-ios-pipeline.full.yml index 43be4d83e4..1c90a173f8 100644 --- a/.buildkite/react-native-ios-pipeline.yml +++ b/.buildkite/full/react-native-ios-pipeline.full.yml @@ -10,7 +10,7 @@ steps: key: "rn-0-60-ipa" timeout_in_minutes: 60 agents: - queue: "ms-mac-10-15-5" + queue: "macos-10.15" env: REACT_NATIVE_VERSION: rn0.60 LANG: "en_US.UTF-8" @@ -71,13 +71,43 @@ steps: commands: - npm run test:build-react-native-ios + - label: ":ios: Build RN 0.71 (Old Arch) ipa" + key: "rn-0-71-old-arch-ipa" + timeout_in_minutes: 60 + agents: + queue: "opensource-arm-mac-cocoa-12" + env: + REACT_NATIVE_VERSION: "rn0.71" + LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode14.app" + RCT_NEW_ARCH_ENABLED: "0" + ARTEFACT_NAME: "rn0.71-old-arch" + artifact_paths: build/rn0.71-old-arch.ipa + commands: + - npm run test:build-react-native-ios + + - label: ":ios: Build RN 0.71 (New Arch) ipa" + key: "rn-0-71-new-arch-ipa" + timeout_in_minutes: 60 + agents: + queue: "opensource-arm-mac-cocoa-12" + env: + REACT_NATIVE_VERSION: "rn0.71" + LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode14.app" + RCT_NEW_ARCH_ENABLED: "1" + ARTEFACT_NAME: "rn0.71-new-arch" + artifact_paths: build/rn0.71-new-arch.ipa + commands: + - npm run test:build-react-native-ios + # See: PLAT-5173 - label: ":ios: Build react-navigation 0.60 ipa" skip: "See PLAT-5173" key: "react-navigation-0-60-ipa" timeout_in_minutes: 60 agents: - queue: "ms-mac-10-15-5" + queue: "macos-10.15" env: REACT_NATIVE_VERSION: rn0.60 JS_SOURCE_DIR: "react_navigation_js" @@ -109,7 +139,7 @@ steps: key: "react-native-navigation-0-60-ipa" timeout_in_minutes: 60 agents: - queue: "ms-mac-10-15-5" + queue: "macos-10.15" env: REACT_NATIVE_VERSION: rn0.60 JS_SOURCE_DIR: "react_native_navigation_js" @@ -263,6 +293,56 @@ steps: concurrency_group: "browserstack-app" concurrency_method: eager + - label: ":ios: RN 0.71 (Old Arch) iOS 14 end-to-end tests" + depends_on: "rn-0-71-old-arch-ipa" + timeout_in_minutes: 60 + plugins: + artifacts#v1.5.0: + download: "build/rn0.71-old-arch.ipa" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.12.0: + pull: react-native-maze-runner + run: react-native-maze-runner + use-aliases: true + command: + - --app=build/rn0.71-old-arch.ipa + - --farm=bs + - --device=IOS_14 + - --a11y-locator + - --appium-version=1.18.0 + - --fail-fast + env: + SKIP_NAVIGATION_SCENARIOS: "true" + HERMES: "true" + concurrency: 5 + concurrency_group: "browserstack-app" + concurrency_method: eager + + - label: ":ios: RN 0.71 (New Arch) iOS 14 end-to-end tests" + depends_on: "rn-0-71-new-arch-ipa" + timeout_in_minutes: 60 + plugins: + artifacts#v1.5.0: + download: "build/rn0.71-new-arch.ipa" + upload: ./test/react-native/maze_output/**/* + docker-compose#v4.12.0: + pull: react-native-maze-runner + run: react-native-maze-runner + use-aliases: true + command: + - --app=build/rn0.71-new-arch.ipa + - --farm=bs + - --device=IOS_14 + - --a11y-locator + - --appium-version=1.18.0 + - --fail-fast + env: + SKIP_NAVIGATION_SCENARIOS: "true" + HERMES: "true" + concurrency: 5 + concurrency_group: "browserstack-app" + concurrency_method: eager + # See: PLAT-5173 - label: ":browserstack: :ios: react-navigation 0.60 iOS 12 end-to-end tests" skip: "See PLAT-5173" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index caf1548428..e042d0ec89 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -105,68 +105,34 @@ steps: - label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: BROWSER STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:" depends_on: "package-js" commands: - - buildkite-agent pipeline upload .buildkite/browser-pipeline.yml + - buildkite-agent pipeline upload .buildkite/basic/browser-pipeline.yml - label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: ELECTRON STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:" skip: Skipped pending PLAT-10345 commands: - - buildkite-agent pipeline upload .buildkite/electron-pipeline.yml + - buildkite-agent pipeline upload .buildkite/basic/electron-pipeline.yml - label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: NODE STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:" depends_on: "package-js" commands: - - buildkite-agent pipeline upload .buildkite/node-pipeline.yml + - buildkite-agent pipeline upload .buildkite/basic/node-pipeline.yml - label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: REACT NATIVE (ANDROID) STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:" depends_on: - "publish-js" - "android-builder-base" commands: - - buildkite-agent pipeline upload .buildkite/react-native-android-pipeline.yml + - buildkite-agent pipeline upload .buildkite/basic/react-native-android-pipeline.yml - label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: REACT NATIVE (IOS) STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:" depends_on: - "publish-js" commands: - - buildkite-agent pipeline upload .buildkite/react-native-ios-pipeline.yml + - buildkite-agent pipeline upload .buildkite/basic/react-native-ios-pipeline.yml - - label: ":large_blue_circle: :large_blue_circle: :large_blue_circle: REACT NATIVE CLI STEPS :large_blue_circle: :large_blue_circle: :large_blue_circle:" - depends_on: - - "publish-js" - - "android-builder-base" - commands: - - buildkite-agent pipeline upload .buildkite/react-native-cli-pipeline.yml - - - label: "@bugsnag/expo latest" - depends_on: "publish-js" - trigger: "bugsnag-expo" - build: - # don't specify 'branch' here so we build the default branch in the expo - # repo, which should be the most up-to-date @bugsnag/expo version - env: - BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}" - BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}" - # a branch name that's safe to use as a docker cache identifier - BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}" - - - label: "@bugsnag/expo v48/next" - depends_on: "publish-js" - trigger: "bugsnag-expo" - build: - branch: "v48/next" - env: - BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}" - BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}" - # a branch name that's safe to use as a docker cache identifier - BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}" - - - label: "@bugsnag/expo v47/next" - depends_on: "publish-js" - trigger: "bugsnag-expo" - build: - branch: "v47/next" - env: - BUGSNAG_JS_BRANCH: "${BUILDKITE_BRANCH}" - BUGSNAG_JS_COMMIT: "${BUILDKITE_COMMIT}" - # a branch name that's safe to use as a docker cache identifier - BUGSNAG_JS_CACHE_SAFE_BRANCH_NAME: "${BRANCH_NAME}" + # + # Conditionally trigger full pipeline + # + - label: 'Conditionally trigger full set of tests' + timeout_in_minutes: 30 + command: sh -c .buildkite/pipeline_trigger.sh diff --git a/.buildkite/pipeline_trigger.sh b/.buildkite/pipeline_trigger.sh new file mode 100755 index 0000000000..207f6d9f40 --- /dev/null +++ b/.buildkite/pipeline_trigger.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +if [[ "$BUILDKITE_MESSAGE" == *"[full ci]"* || + "$BUILDKITE_BRANCH" == "next" || + "$BUILDKITE_BRANCH" == "main" || + "$BUILDKITE_BRANCH" == "master" || + "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" == "main" || + "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" == "master" ]]; then + echo "Running full build" + buildkite-agent pipeline upload .buildkite/full/pipeline.full.yml +else + # Basic build, but allow a full build to be triggered + echo "Running basic build" + buildkite-agent pipeline upload .buildkite/full/block.yml +fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 63711f6f57..89042b8e14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,21 @@ ## TBD +## 7.21.0 (2023-08-15) + +This release adds support for apps using React Native New Architecture + +### Added + +- (react-native) Support React Native New Architecture [#1973](https://github.com/bugsnag/bugsnag-js/pull/1973) + +### Fixed + +- (electron) Fix `onSendError` callbacks not being called [#1999](https://github.com/bugsnag/bugsnag-js/pull/1999) +- (plugin-inline-script-content) Ensure script metadata is added in Safari 16 [#1998](https://github.com/bugsnag/bugsnag-js/pull/1998) + +## 7.20.2 (2023-04-25) + ### Changes - (react-native) Update bugsnag-android from v5.28.3 to [v5.28.4](https://github.com/bugsnag/bugsnag-android/blob/master/CHANGELOG.md#5284-2023-02-08) diff --git a/docker-compose.yml b/docker-compose.yml index 25ec85526d..a002466c7d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -131,6 +131,7 @@ services: - BUILDKITE - REGISTRY_URL - REACT_NATIVE_VERSION + - RN_NEW_ARCH - NOTIFIER_VERSION - ARTEFACT_NAME - JS_SOURCE_DIR @@ -187,7 +188,7 @@ services: - ./test/react-native-cli/features/:/app/features react-native-maze-runner: - image: 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v7-cli + image: 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v8-cli environment: <<: *common-environment BITBAR_USERNAME: @@ -206,7 +207,7 @@ services: - /var/run/docker.sock:/var/run/docker.sock react-native-cli-maze-runner: - image: 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v7-cli + image: 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v8-cli environment: <<: *common-environment BITBAR_USERNAME: diff --git a/dockerfiles/Dockerfile.android-builder-base b/dockerfiles/Dockerfile.android-builder-base index 236d018863..e8a60ea5ac 100644 --- a/dockerfiles/Dockerfile.android-builder-base +++ b/dockerfiles/Dockerfile.android-builder-base @@ -1,7 +1,6 @@ FROM openjdk:11-jdk-bullseye # OS setup -RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get update && apt-get install -y gradle jq git-core build-essential openssl libssl-dev # Android tools diff --git a/dockerfiles/Dockerfile.node b/dockerfiles/Dockerfile.node index b29044d015..eb25763019 100644 --- a/dockerfiles/Dockerfile.node +++ b/dockerfiles/Dockerfile.node @@ -21,7 +21,7 @@ RUN npm pack --verbose packages/plugin-koa/ RUN npm pack --verbose packages/plugin-restify/ # The maze-runner node tests -FROM 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v7-cli as node-maze-runner +FROM 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v8-cli as node-maze-runner WORKDIR /app/ COPY packages/node/ . COPY test/node/features test/node/features diff --git a/dockerfiles/Dockerfile.react-native-android-builder b/dockerfiles/Dockerfile.react-native-android-builder index 8027bd9f27..c26546a07f 100644 --- a/dockerfiles/Dockerfile.react-native-android-builder +++ b/dockerfiles/Dockerfile.react-native-android-builder @@ -1,5 +1,6 @@ FROM 855461928731.dkr.ecr.us-west-1.amazonaws.com/js:android-builder-base +RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - RUN apt-get install -y nodejs rsync RUN npm i -g run-func diff --git a/dockerfiles/Dockerfile.react-native-cli-android-builder b/dockerfiles/Dockerfile.react-native-cli-android-builder index 45e0c60b18..7ef762d2f4 100644 --- a/dockerfiles/Dockerfile.react-native-cli-android-builder +++ b/dockerfiles/Dockerfile.react-native-cli-android-builder @@ -1,5 +1,6 @@ FROM 855461928731.dkr.ecr.us-west-1.amazonaws.com/js:android-builder-base +RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - RUN apt-get update && apt-get install -y nodejs rsync expect \ # Dependencies for MazeRunner ruby-full apt-utils docker-compose wget unzip bash bundler libcurl4 libcurl4-openssl-dev diff --git a/examples/reactnative/rn071example/.eslintrc.js b/examples/reactnative/rn071example/.eslintrc.js new file mode 100644 index 0000000000..40c6dcd05f --- /dev/null +++ b/examples/reactnative/rn071example/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: '@react-native-community', +}; diff --git a/examples/reactnative/rn071example/.gitignore b/examples/reactnative/rn071example/.gitignore new file mode 100644 index 0000000000..0cab2ac6fc --- /dev/null +++ b/examples/reactnative/rn071example/.gitignore @@ -0,0 +1,66 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +ios/.xcode.env.local + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml +*.hprof +.cxx/ +*.keystore +!debug.keystore + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +**/fastlane/report.xml +**/fastlane/Preview.html +**/fastlane/screenshots +**/fastlane/test_output + +# Bundle artifact +*.jsbundle + +# Ruby / CocoaPods +/ios/Pods/ +/vendor/bundle/ + +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# testing +/coverage diff --git a/examples/reactnative/rn071example/.prettierrc.js b/examples/reactnative/rn071example/.prettierrc.js new file mode 100644 index 0000000000..2b540746a7 --- /dev/null +++ b/examples/reactnative/rn071example/.prettierrc.js @@ -0,0 +1,7 @@ +module.exports = { + arrowParens: 'avoid', + bracketSameLine: true, + bracketSpacing: false, + singleQuote: true, + trailingComma: 'all', +}; diff --git a/examples/reactnative/rn071example/.watchmanconfig b/examples/reactnative/rn071example/.watchmanconfig new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/examples/reactnative/rn071example/.watchmanconfig @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/examples/reactnative/rn071example/App.tsx b/examples/reactnative/rn071example/App.tsx new file mode 100644 index 0000000000..226d2d7a99 --- /dev/null +++ b/examples/reactnative/rn071example/App.tsx @@ -0,0 +1,187 @@ +/** + * Sample React Native App + * https://github.com/facebook/react-native + * + * @format + */ + +import React from 'react' +import type {PropsWithChildren} from 'react' +import { + Button, + SafeAreaView, + ScrollView, + StatusBar, + StyleSheet, + Text, + useColorScheme, + Platform, + View, +} from 'react-native' + +// Setup Bugsnag client to capture errors automatically +import Bugsnag from '@bugsnag/react-native' +Bugsnag.start() + +const bogusObject = {} as any + +function triggerException() { + bogusObject.bogusFunction() +} + +function triggerHandledException() { + bogusObject.bogusHandledFunction() +} + +async function triggerPromiseRejection() { + // try { + // await NativeModules.CrashyCrashy.generatePromiseRejection() + // } catch (e: any) { + // Bugsnag.notify(e) + // } +} + +function triggerNativeException() { + // NativeModules.CrashyCrashy.generateCrash() +} + +function triggerNativeHandledError() { + // NativeModules.CrashyCrashy.handledError() +} + +type SectionProps = PropsWithChildren<{ + title: string +}> + +function App(): JSX.Element { + return ( + <> + + + + {global.HermesInternal == null ? null : ( + + Engine: Hermes ({global.__turboModuleProxy != null ? 'Turbo' : 'Native'} Modules) + + )} + + Press the buttons below to test examples of Bugsnag functionality. Make sure you have changed the API key in Info.plist or AndroidManifest.xml. + + + +