|
16 | 16 | - E2E_BROWSERSTACK_POLL_SECONDS: "30" |
17 | 17 | - E2E_IOS_EXPORT_METHOD: development |
18 | 18 | - E2E_ANDROID_COMMAND_TIMEOUT_SECONDS: "1800" |
| 19 | + - E2E_IOS_COMMAND_TIMEOUT_SECONDS: "1800" |
19 | 20 | - E2E_PACKAGE_COMMAND_TIMEOUT_SECONDS: "300" |
20 | 21 | - E2E_RUBY_INSTALL_TIMEOUT_SECONDS: "1800" |
21 | 22 |
|
@@ -62,28 +63,87 @@ workflows: |
62 | 63 | $BITRISE_DEPLOY_DIR/e2e-matrix.json:E2E_MATRIX_JSON |
63 | 64 |
|
64 | 65 | e2e-build-react-native-ios: |
| 66 | + meta: |
| 67 | + bitrise.io: |
| 68 | + stack: osx-xcode-26.0.x-edge |
| 69 | + machine_type_id: g2.mac.4large |
65 | 70 | steps: |
66 | 71 | - git-clone@8: {} |
| 72 | + - certificate-and-profile-installer@1: {} |
67 | 73 | - restore-cache@1: |
68 | 74 | inputs: |
69 | 75 | - key: |- |
70 | | - rn-ios-{{ checksum "platforms/react-native/pnpm-lock.yaml" }}-{{ checksum "platforms/react-native/sample/ios/Podfile.lock" }} |
| 76 | + rn-ios-macos-{{ checksum "platforms/react-native/pnpm-lock.yaml" }}-{{ checksum "platforms/react-native/sample/ios/Podfile.lock" }} |
71 | 77 | - script@1: |
72 | | - title: Create React Native iOS artifact placeholder |
| 78 | + title: Build React Native iOS IPA artifact |
73 | 79 | inputs: |
74 | 80 | - content: |- |
75 | 81 | set -euo pipefail |
| 82 | + source e2e/scripts/bitrise_ci_helpers |
| 83 | + e2e_prepare_ruby |
| 84 | + e2e_log "Enabling Corepack" |
| 85 | + corepack enable |
| 86 | + e2e_log "Checking storefront configuration secrets" |
| 87 | + : "${STOREFRONT_DOMAIN:?STOREFRONT_DOMAIN is required. Check https://app.bitrise.io/app/f51f9054-053e-40f1-81e9-ae727567ae76/workflow_editor#!/secrets and enable Expose for pull requests.}" |
| 88 | + : "${STOREFRONT_ACCESS_TOKEN:?STOREFRONT_ACCESS_TOKEN is required. Check https://app.bitrise.io/app/f51f9054-053e-40f1-81e9-ae727567ae76/workflow_editor#!/secrets and enable Expose for pull requests.}" |
| 89 | + e2e_log "Configuring storefront environment" |
| 90 | + ./scripts/setup_storefront_env --skip-optional-prompts |
| 91 | + e2e_log "Installing React Native dependencies" |
| 92 | + cd platforms/react-native |
| 93 | + e2e_run_with_timeout "${E2E_IOS_COMMAND_TIMEOUT_SECONDS:-1800}" pnpm install --frozen-lockfile |
| 94 | + cd sample |
| 95 | + e2e_log "Installing iOS Ruby dependencies" |
| 96 | + e2e_run_with_timeout "${E2E_IOS_COMMAND_TIMEOUT_SECONDS:-1800}" bundle install |
| 97 | + cd ios |
| 98 | + e2e_log "Installing CocoaPods dependencies" |
| 99 | + e2e_run_with_timeout "${E2E_IOS_COMMAND_TIMEOUT_SECONDS:-1800}" bundle exec pod install --deployment --repo-update |
76 | 100 | mkdir -p "$BITRISE_DEPLOY_DIR/e2e" |
77 | | - echo "Phase 2 placeholder for React Native iOS IPA" > "$BITRISE_DEPLOY_DIR/e2e/react-native-ios.ipa" |
78 | | - envman add --key E2E_REACT_NATIVE_IOS_APP_PATH --value "$BITRISE_DEPLOY_DIR/e2e/react-native-ios.ipa" |
| 101 | + archive_path="$BITRISE_DEPLOY_DIR/e2e/CheckoutKitReactNativeDemo.xcarchive" |
| 102 | + export_path="$BITRISE_DEPLOY_DIR/e2e/react-native-ios-export" |
| 103 | + export_options="$BITRISE_DEPLOY_DIR/e2e/ExportOptions.plist" |
| 104 | + export_method="${E2E_IOS_EXPORT_METHOD:-development}" |
| 105 | + cat > "$export_options" <<PLIST |
| 106 | + <?xml version="1.0" encoding="UTF-8"?> |
| 107 | + <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| 108 | + <plist version="1.0"> |
| 109 | + <dict> |
| 110 | + <key>method</key> |
| 111 | + <string>$export_method</string> |
| 112 | + <key>signingStyle</key> |
| 113 | + <string>automatic</string> |
| 114 | + <key>stripSwiftSymbols</key> |
| 115 | + <true/> |
| 116 | + <key>compileBitcode</key> |
| 117 | + <false/> |
| 118 | + </dict> |
| 119 | + </plist> |
| 120 | + PLIST |
| 121 | + e2e_log "Archiving React Native iOS app" |
| 122 | + e2e_run_with_timeout "${E2E_IOS_COMMAND_TIMEOUT_SECONDS:-1800}" xcodebuild archive \ |
| 123 | + -workspace CheckoutKitReactNativeDemo.xcworkspace \ |
| 124 | + -scheme CheckoutKitReactNativeDemo \ |
| 125 | + -configuration Release \ |
| 126 | + -sdk iphoneos \ |
| 127 | + -destination generic/platform=iOS \ |
| 128 | + -archivePath "$archive_path" \ |
| 129 | + -skipPackagePluginValidation |
| 130 | + e2e_log "Exporting React Native iOS IPA" |
| 131 | + e2e_run_with_timeout "${E2E_IOS_COMMAND_TIMEOUT_SECONDS:-1800}" xcodebuild -exportArchive \ |
| 132 | + -archivePath "$archive_path" \ |
| 133 | + -exportPath "$export_path" \ |
| 134 | + -exportOptionsPlist "$export_options" |
| 135 | + ios_ipa="$(find "$export_path" -name "*.ipa" -print -quit)" |
| 136 | + test -f "$ios_ipa" |
| 137 | + e2e_log "Publishing iOS IPA path" |
| 138 | + envman add --key E2E_REACT_NATIVE_IOS_APP_PATH --value "$ios_ipa" |
79 | 139 | - deploy-to-bitrise-io@2: |
80 | 140 | inputs: |
81 | 141 | - pipeline_intermediate_files: |- |
82 | 142 | $E2E_REACT_NATIVE_IOS_APP_PATH:E2E_REACT_NATIVE_IOS_APP_PATH |
83 | 143 | - save-cache@1: |
84 | 144 | inputs: |
85 | 145 | - key: |- |
86 | | - rn-ios-{{ checksum "platforms/react-native/pnpm-lock.yaml" }}-{{ checksum "platforms/react-native/sample/ios/Podfile.lock" }} |
| 146 | + rn-ios-macos-{{ checksum "platforms/react-native/pnpm-lock.yaml" }}-{{ checksum "platforms/react-native/sample/ios/Podfile.lock" }} |
87 | 147 | - paths: |- |
88 | 148 | platforms/react-native/node_modules |
89 | 149 | platforms/react-native/sample/ios/Pods |
|
0 commit comments