diff --git a/bitrise.yml b/bitrise.yml index 7e951ac1b2a3e..31b43fa59d6c0 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -27,7 +27,6 @@ stages: run_if: '{{getenv "BUILD_FIREFOX_IOS" | eq "true"}}' - build_and_test_4_SmokeTest4: run_if: '{{getenv "BUILD_FIREFOX_IOS" | eq "true"}}' - workflows: configure_build_fennec: before_run: @@ -76,24 +75,17 @@ workflows: ls /Users/vagrant/git/DerivedData/Build/Products echo "-- compress --" + # Add Fennec-iphonesimulator folder + # Add All .xctestrun files + # Add firefox-ios-test files and test plans exec zip -0 -qr "${BITRISE_SOURCE_DIR}/DerivedData.zip" \ - "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec-iphonesimulator/Client.app" \ - "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec-iphonesimulator/XCUITests-Runner.app" \ - "$BITRISE_SOURCE_DIR/firefox-ios/Client.xcodeproj" \ - "$BITRISE_SOURCE_DIR/firefox-ios/firefox-ios-tests/Tests/SmokeXCUITests.xctestplan" \ - "$BITRISE_SOURCE_DIR/firefox-ios/firefox-ios-tests/Tests/Smoketest2.xctestplan" \ - "$BITRISE_SOURCE_DIR/firefox-ios/firefox-ios-tests/Tests/Smoketest3.xctestplan" \ - "$BITRISE_SOURCE_DIR/firefox-ios/firefox-ios-tests/Tests/Smoketest4.xctestplan" \ - "$BITRISE_SOURCE_DIR/xcodebuild.log" \ - "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec_SmokeXCUITests_iphonesimulator17.2-arm64.xctestrun" \ - "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec_Smoketest2_iphonesimulator17.2-arm64.xctestrun" \ - "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec_Smoketest3_iphonesimulator17.2-arm64.xctestrun" \ - "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec_Smoketest4_iphonesimulator17.2-arm64.xctestrun" \ + "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/" \ "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec-iphonesimulator/" \ - "$BITRISE_SOURCE_DIR/firefox-ios/firefox-ios-tests/Tests/UnitTest.xctestplan" \ + "$BITRISE_SOURCE_DIR/firefox-ios/Client.xcodeproj" \ + "$BITRISE_SOURCE_DIR/firefox-ios/firefox-ios-tests/" \ "$BITRISE_SOURCE_DIR/firefox-ios/Client/" \ - "$BITRISE_SOURCE_DIR/firefox-ios/firefox-ios-tests/Tests/XCUITests" + "$BITRISE_SOURCE_DIR/xcodebuild.log" - deploy-to-bitrise-io@2: run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' inputs: @@ -161,35 +153,13 @@ workflows: - channel: "#firefox-ios" - text: Build status using latest Rust-Component - webhook_url: $WEBHOOK_SLACK_TOKEN_2 - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core build_and_test_1_SmokeTest2: before_run: - 0_detect_standalone_build - 1_git_clone_and_post_clone - decision_to_run_UI_Tests + - firefox_pull_and_unzip_dependencies steps: - - git::https://github.com/bitrise-steplib/bitrise-step-artifact-pull.git@main: - run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' - title: Pull artifacts - inputs: - - verbose: true - - artifact_sources: build_applications.configure_build_fennec - - script@1.1: - run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' - title: Unzip - inputs: - - content: | - set -euxo pipefail - echo "$BITRISE_ARTIFACT_PATHS" - - derived_data=${BITRISE_ARTIFACT_PATHS##*|} - echo "$derived_data" - - echo "-- unzip -- " - exec unzip "$derived_data" - xcode-test-without-building@0: run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' timeout: 1200 @@ -204,38 +174,13 @@ workflows: run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' inputs: - pipeline_intermediate_files: '$BITRISE_XCRESULT_PATH:BITRISE_UITESTS_2_XCRESULT_PATH' - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core build_and_test_2_SmokeTest: before_run: - 0_detect_standalone_build - 1_git_clone_and_post_clone - decision_to_run_UI_Tests + - firefox_pull_and_unzip_dependencies steps: - - git::https://github.com/bitrise-steplib/bitrise-step-artifact-pull.git@main: - run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' - title: Pull artifacts - inputs: - - verbose: true - - artifact_sources: build_applications.configure_build_fennec - - script@1.1: - run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' - title: Unzip - inputs: - - content: | - set -euxo pipefail - - echo "$BITRISE_ARTIFACT_PATHS" - - derived_data=${BITRISE_ARTIFACT_PATHS##*|} - echo "$derived_data" - - echo "-- unzip -- " - exec unzip "$derived_data" - echo "show dir" - ls - xcode-test-without-building@0: run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' timeout: 1200 @@ -250,38 +195,13 @@ workflows: run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' inputs: - pipeline_intermediate_files: '$BITRISE_XCRESULT_PATH:BITRISE_UITESTS_XCRESULT_PATH' - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core build_and_test_3_SmokeTest3: before_run: - 0_detect_standalone_build - 1_git_clone_and_post_clone - decision_to_run_UI_Tests + - firefox_pull_and_unzip_dependencies steps: - - git::https://github.com/bitrise-steplib/bitrise-step-artifact-pull.git@main: - run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' - title: Pull artifacts - inputs: - - verbose: true - - artifact_sources: build_applications.configure_build_fennec - - script@1.1: - run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' - title: Unzip - inputs: - - content: | - set -euxo pipefail - - echo "$BITRISE_ARTIFACT_PATHS" - - derived_data=${BITRISE_ARTIFACT_PATHS##*|} - echo "$derived_data" - - echo "-- unzip -- " - exec unzip "$derived_data" - echo "show dir" - ls - xcode-test-without-building@0: run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' timeout: 1200 @@ -296,38 +216,13 @@ workflows: run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' inputs: - pipeline_intermediate_files: '$BITRISE_XCRESULT_PATH:BITRISE_UITESTS_3_XCRESULT_PATH' - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core build_and_test_4_SmokeTest4: before_run: - 0_detect_standalone_build - 1_git_clone_and_post_clone - decision_to_run_UI_Tests + - firefox_pull_and_unzip_dependencies steps: - - git::https://github.com/bitrise-steplib/bitrise-step-artifact-pull.git@main: - run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' - title: Pull artifacts - inputs: - - verbose: true - - artifact_sources: build_applications.configure_build_fennec - - script@1.1: - run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' - title: Unzip - inputs: - - content: | - set -euxo pipefail - - echo "$BITRISE_ARTIFACT_PATHS" - - derived_data=${BITRISE_ARTIFACT_PATHS##*|} - echo "$derived_data" - - echo "-- unzip -- " - exec unzip "$derived_data" - echo "show dir" - ls - xcode-test-without-building@0: run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' timeout: 1200 @@ -342,10 +237,6 @@ workflows: run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' inputs: - pipeline_intermediate_files: '$BITRISE_XCRESULT_PATH:BITRISE_UITESTS_4_XCRESULT_PATH' - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core determine_apps_affected: steps: - git-clone@6.2: {} @@ -450,10 +341,32 @@ workflows: echo "BUILD_FIREFOX_IOS: $BUILD_FIREFOX_IOS" echo "BUILD_FOCUS_IOS: $BUILD_FOCUS_IOS" echo "BUILD_SAMPLE_BROWSER_IOS: $BUILD_SAMPLE_BROWSER_IOS" + + firefox_pull_and_unzip_dependencies: + steps: + - git::https://github.com/bitrise-steplib/bitrise-step-artifact-pull.git@main: + run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' + title: Pull artifacts + inputs: + - verbose: true + - artifact_sources: build_applications.configure_build_fennec + - script@1.1: + run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}' + title: Unzip + inputs: + - content: | + set -euxo pipefail + echo "$BITRISE_ARTIFACT_PATHS" + + derived_data=${BITRISE_ARTIFACT_PATHS##*|} + echo "$derived_data" + + echo "-- unzip -- " + exec unzip "$derived_data" + send_slack_notification: steps: - slack@3.1: - #run_if: '{{getenv "SHOW_WARNING_IN_SLACK" | eq "Show_Warnings" }}' inputs: - title: '' - author_name: '' @@ -621,7 +534,6 @@ workflows: #!/usr/bin/env bash # fail if any commands fails set -e - # debug log set -x npm install @@ -811,7 +723,6 @@ workflows: #!/usr/bin/env bash # fail if any commands fails set -e - # debug log set -x npm install @@ -837,10 +748,6 @@ workflows: - message: "The build run info: $BITRISE_GIT_MESSAGE" - webhook_url: "$WEBHOOK_SLACK_TOKEN" description: This Workflow is to build the app using latest xcode available in Bitrise - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core L10nBuild: steps: - activate-ssh-key@4: @@ -852,16 +759,11 @@ workflows: inputs: - content: >- #!/usr/bin/env bash - # fail if any commands fails - set -e - # debug log - set -x - echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8' > /tmp/tmp.xcconfig @@ -889,9 +791,7 @@ workflows: inputs: - content: |- #!/usr/bin/env bash - # fail if any commands fails set -e - # debug log set -x rm /tmp/tmp.xcconfig @@ -937,10 +837,6 @@ workflows: BITRISE_SCHEME: L10nSnapshotTest description: >- This Workflow is to run L10n tests in one locale and then share the bundle with the rest of the builds - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core L10nScreenshotsTests: steps: - activate-ssh-key@4: @@ -999,10 +895,6 @@ workflows: BITRISE_SCHEME: L10nSnapshotTest description: >- This Workflow is to run L10n tests for all locales - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core SPM_Deploy_Prod_Beta: steps: - activate-ssh-key@4.1: @@ -1127,10 +1019,6 @@ workflows: is_expand: false BITRISE_SCHEME: Firefox description: This step is to build, archive and upload Firefox Release and Beta - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core SPM_Deploy_Beta_Only: steps: - activate-ssh-key@4.1: @@ -1153,9 +1041,7 @@ workflows: inputs: - content: |- #!/usr/bin/env bash - # fail if any commands fails set -e - # debug log set -x ./bootstrap.sh @@ -1189,7 +1075,6 @@ workflows: set -x # write your script here - echo "Setting Nimbus variables" /usr/libexec/PlistBuddy -c "Set NimbusURL $NIMBUS_URL" "firefox-ios/Client/Info.plist" title: Nimbus Variable Setup @@ -1225,10 +1110,6 @@ workflows: is_expand: false BITRISE_SCHEME: Firefox description: This step is to build, archive and upload Firefox Release and Beta - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core SPM_Nightly_Beta_Only: steps: - activate-ssh-key@4.1: @@ -1324,10 +1205,7 @@ workflows: is_expand: false BITRISE_SCHEME: Firefox description: This step is to build, archive and upload Firefox Release and Beta - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core + Bitrise_Performance_Test: steps: - cache-pull@2.1: @@ -1371,10 +1249,6 @@ workflows: cat test.json python3 perfTestTransform.py - deploy-to-bitrise-io@1.9: {} - meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core before_run: - 1_git_clone_and_post_clone - 2_certificate_and_profile @@ -1695,6 +1569,536 @@ workflows: cat test.json python3 perfTestTransform.py + # FOCUS MAIN WORKFLOWS + configure_build_focus: + before_run: + - focus-clone-and-build-dependencies + steps: + - cache-pull@2: {} + - swiftlint-extended@1: + inputs: + - linting_path: "$BITRISE_SOURCE_DIR" + - script@1: + title: Set Default Web Browser Entitlement + inputs: + - content: |- + #!/usr/bin/env bash + set -x + /usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" Focus.entitlements + /usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" Klar.entitlements + - script@1.1: + title: Build for Testing Focus + inputs: + - content: | + set -euxo pipefail + echo "-- build-for-testing --" + mkdir DerivedData + #xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile + xcodebuild "-project" "/Users/vagrant/git/focus-ios/Blockzilla.xcodeproj" "-scheme" "Focus" -configuration "FocusDebug" "CODE_SIGNING_ALLOWED=NO" "-destination" "platform=iOS Simulator,name=iPhone 15,OS=17.2" "COMPILER_INDEX_STORE_ENABLE=NO" "build-for-testing" "CODE_SIGN_IDENTITY=" "CODE_SIGNING_REQUIRED=NO" "CODE_SIGNING_ALLOWED=NO" -derivedDataPath "/Users/vagrant/git/DerivedData" | xcpretty | tee xcodebuild_test.log + - script@1.1: + title: Build for Testing Klar + inputs: + - content: | + set -euxo pipefail + echo "-- build-for-testing --" + xcodebuild "-project" "/Users/vagrant/git/focus-ios/Blockzilla.xcodeproj" "-scheme" "Klar" -configuration "KlarDebug" "CODE_SIGNING_ALLOWED=NO" "-destination" "platform=iOS Simulator,name=iPhone 15,OS=17.2" "COMPILER_INDEX_STORE_ENABLE=NO" "build-for-testing" "CODE_SIGN_IDENTITY=" "CODE_SIGNING_REQUIRED=NO" "CODE_SIGNING_ALLOWED=NO" -derivedDataPath "/Users/vagrant/git/DerivedData" | xcpretty | tee xcodebuild_test.log + - script@1.1: + title: Compress Derived Data + is_always_run: true + inputs: + - content: | + set -euxo pipefail + echo "-- compress --" + # Add FocusDebug-iphonesimulator folder + # Add All .xctestrun files + # Add focuos-ios-test files and test plans + # Add KlarDebug-iphonesimulator folder + exec zip -0 -qr "${BITRISE_SOURCE_DIR}/DerivedData.zip" \ + "${BITRISE_SOURCE_DIR}/focus-ios/Blockzilla.xcodeproj" \ + "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/FocusDebug-iphonesimulator/" \ + "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/KlarDebug-iphonesimulator/" \ + "$BITRISE_SOURCE_DIR/DerivedData/Build/Products/" \ + "$BITRISE_SOURCE_DIR/focus-ios/focus-ios-tests/" \ + "$BITRISE_SOURCE_DIR/focus-ios/xcodebuild.log" \ + "$BITRISE_SOURCE_DIR/focus-ios/Blockzilla/" + - deploy-to-bitrise-io@2: + inputs: + - deploy_path: "${BITRISE_SOURCE_DIR}/DerivedData.zip" + - slack@3: + run_if: ".IsBuildFailed" + inputs: + - channel: "#mobile-alerts-ios" + - message: "The build failed to build" + - webhook_url: "$SLACK_WEBHOOK" + + focus_ui_test: + before_run: + - focus-pull-and-unzip-dependencies + steps: + - script@1: + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # debug log + set -x + # Check if it is a scheduled or regular build + # to select the testPlan to run + + if [[ $BITRISE_GIT_MESSAGE == Schedule* ]] + then + echo "Scheduled build, running Full Functional Tests" + envman add --key TEST_PLAN_NAME --value FullFunctionalTests + else + echo "Regular build, running Smoke Test" + envman add --key TEST_PLAN_NAME --value SmokeTest + fi + - title: Check if build is scheduled or regular to set the test plan + - script@1.1: + title: Test without Building + inputs: + - content: | + #!/usr/bin/env bash + set -ex + ls ./Users/vagrant/git/focus-ios/focus-ios-tests/XCUITest/ + ls ./Users/vagrant/git/DerivedData/Build/Products + cp -r ./Users/vagrant/git/focus-ios/focus-ios-tests/XCUITest/* . + mv ./Users/vagrant/git/* . + ls -la + echo "-- test-without-building --" + xcodebuild -resultBundlePath "xcodebuild.xcresult" -derivedDataPath "/Users/vagrant/git/DerivedData" -destination "platform=iOS Simulator,name=iPhone 15,OS=17.2" test-without-building -xctestrun "/Users/vagrant/git/DerivedData/Build/Products/Focus_SmokeTest_iphonesimulator17.2-arm64.xctestrun" + - custom-test-results-export@0: + inputs: + - search_pattern: "$BITRISE_SOURCE_DIR/xcodebuild.xcresult" + - test_name: SmokeTest + - deploy-to-bitrise-io@2: {} + - github-status@2: + inputs: + - status_identifier: "Focus-build" + - slack@3: + run_if: ".IsBuildFailed" + inputs: + - channel: "#mobile-alerts-ios" + - message: "The build run the Focus testPlan: $TEST_PLAN_NAME" + - webhook_url: "$SLACK_WEBHOOK" + + klar_unit_test: + before_run: + - focus-pull-and-unzip-dependencies + steps: + - script@1.1: + title: Test without Building + inputs: + - content: | + #!/usr/bin/env bash + set -ex + ls ./Users/vagrant/git/focus-ios/Blockzilla.xcodeproj/ + cp -r ./Users/vagrant/git/focus-ios/Blockzilla.xcodeproj/* . + mv ./Users/vagrant/git/* . + ls -la + echo "-- test-without-building --" + xcodebuild -resultBundlePath "xcodebuild.xcresult" -derivedDataPath "/Users/vagrant/git/DerivedData" -destination "platform=iOS Simulator,name=iPhone 15,OS=17.2" test-without-building -xctestrun "/Users/vagrant/git/DerivedData/Build/Products/Klar_UnitTests_iphonesimulator17.2-arm64.xctestrun" + - custom-test-results-export@0: + inputs: + - search_pattern: "$BITRISE_SOURCE_DIR/xcodebuild.xcresult" + - test_name: UnitTestsKlar + - deploy-to-bitrise-io@2: {} + - slack@3: + run_if: ".IsBuildFailed" + inputs: + - channel: "#mobile-alerts-ios" + - message: "The build run the Klar testPlan: UnitTests" + - webhook_url: "$SLACK_WEBHOOK" + + focus_unit_test: + before_run: + - focus-pull-and-unzip-dependencies + steps: + - script@1.1: + title: Test without Building + inputs: + - content: | + #!/usr/bin/env bash + set -ex + ls ./Users/vagrant/git/focus-ios/Blockzilla.xcodeproj/ + cp -r ./Users/vagrant/git/focus-ios/Blockzilla.xcodeproj/* . + mv ./Users/vagrant/git/* . + ls -la + echo "-- test-without-building --" + xcodebuild -resultBundlePath "xcodebuild.xcresult" -derivedDataPath "/Users/vagrant/git/DerivedData" -destination "platform=iOS Simulator,name=iPhone 15,OS=17.2" test-without-building -xctestrun "/Users/vagrant/git/DerivedData/Build/Products/Focus_UnitTests_iphonesimulator17.2-arm64.xctestrun" + - custom-test-results-export@0: + inputs: + - search_pattern: "$BITRISE_SOURCE_DIR/xcodebuild.xcresult" + - test_name: UnitTests + - deploy-to-bitrise-io@2: {} + - slack@3: + run_if: ".IsBuildFailed" + inputs: + - channel: "#mobile-alerts-ios" + - message: "The build run the Focus testPlan: UnitTests" + - webhook_url: "$SLACK_WEBHOOK" + + # FOCUS UTILITIES WORKFLOWS + focus-clone-and-build-dependencies: + description: Clones the repo and builds dependencies + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@6.2: {} + - certificate-and-profile-installer@1: {} + - script@1: + inputs: + - content: |- + #!/usr/bin/env bash + ./checkout.sh + title: ContentBlockerGen + + focus-pull-and-unzip-dependencies: + description: Pulls and unzip the dependencis from previous stage_1_focus + steps: + - git::https://github.com/bitrise-steplib/bitrise-step-artifact-pull.git@main: + title: Pull artifacts + inputs: + - verbose: true + - artifact_sources: stage_1_focus.* + - script@1.1: + title: Unzip + inputs: + - content: | + set -euxo pipefail + echo "$BITRISE_ARTIFACT_PATHS" + echo "-- unzip -- " + exec unzip "${BITRISE_ARTIFACT_PATHS}" + echo "show dir" + ls + + focus-set-project-version: + steps: + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_RELEASE_VERSION" + - plist_path: focus-ios/Blockzilla/Info.plist + title: Set Blockzilla version numbers + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_RELEASE_VERSION" + - plist_path: focus-ios/ContentBlocker/Info.plist + title: Set ContentBlocker version numbers + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_RELEASE_VERSION" + - plist_path: focus-ios/FocusIntentExtension/Info.plist + title: Set FocusIntentExtension version numbers + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_RELEASE_VERSION" + - plist_path: focus-ios/OpenInFocus/Info.plist + title: Set OpenInFocus version numbers + + focus-configure-nimbus: + steps: + - script@1: + title: Configure Nimbus + inputs: + - content: |- + #!/usr/bin/env bash + set -x + /usr/libexec/PlistBuddy -c "Add :NimbusServerURL string ${NIMBUS_SERVER_URL}" focus-ios/Blockzilla/Info.plist + /usr/libexec/PlistBuddy -c "Add :NimbusStagingServerURL string ${NIMBUS_STAGING_SERVER_URL}" focus-ios/Blockzilla/Info.plist + /usr/libexec/PlistBuddy -c "Set :NimbusAppName ${NIMBUS_APP_NAME}" focus-ios/Blockzilla/Info.plist + /usr/libexec/PlistBuddy -c "Set :NimbusAppChannel ${NIMBUS_APP_CHANNEL}" focus-ios/Blockzilla/Info.plist + + focus-configure-sentry: + steps: + - script@1: + title: Configure Sentry + inputs: + - content: |- + #!/usr/bin/env bash + set -x + /usr/libexec/PlistBuddy -c "Add :SentryDSN string ${SENTRY_DSN}" focus-ios/Blockzilla/Info.plist + + focus-set-default-browser-entitlement: + steps: + - script@1: + title: Set Default Web Browser Entitlement + inputs: + - content: |- + #!/usr/bin/env bash + set -x + /usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Focus.entitlements + /usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Klar.entitlements + + # Update the name change in Taskcluster files + focus_l10n_build: + before_run: + - focus-clone-and-build-dependencies + steps: + - script@1: + title: Set Default Web Browser Entitlement + inputs: + - content: |- + #!/usr/bin/env bash + set -x + /usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Focus.entitlements + /usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Klar.entitlements + - script@1: + title: Generate screenshots + inputs: + - content: |- + #!/usr/bin/env bash + set -x + # workaround until 2.187 version is installed. Error with 2.186 + ./focus-ios/focus-ios-tests/l10n-screenshots.sh en-US + - deploy-to-bitrise-io@1.10: + inputs: + - deploy_path: l10n-screenshots-dd/ + - is_compress: 'true' + - deploy-to-bitrise-io@1.10: + inputs: + - deploy_path: l10n-screenshots/en-US/en-US + - is_compress: 'true' + + focus_l10n_screenshots_tests: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@6.2: {} + - cache-pull@2: {} + - certificate-and-profile-installer@1: {} + - script@1: + title: Set Default Web Browser Entitlement + inputs: + - content: |- + #!/usr/bin/env bash + set -x + /usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Focus.entitlements + /usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Klar.entitlements + - script@1: + inputs: + - content: >- + #!/usr/bin/env bash + # fail if any commands fails + set -e + + # debug log + set -x + + echo "curl to Download derived data" + curl --location --retry 5 --output l10n-screenshots-dd.zip "$MOZ_DERIVED_DATA_PATH" + mkdir l10n-screenshots-dd + unzip l10n-screenshots-dd.zip -d l10n-screenshots-dd + rm l10n-screenshots-dd.zip + title: Download derived data path + - script@1: + title: Generate screenshots + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # debug log + set -x + # workaround until 2.187 version is installed. Error with 2.186 + ./focus-ios/focus-ios-tests/l10n-screenshots.sh --test-without-building $MOZ_LOCALES + mkdir -p artifacts + + for locale in $(echo $MOZ_LOCALES); do + # Only Focus for now + zip -9 -j "$locale.zip" "l10n-screenshots/$locale/$locale/"* + mv "$locale.zip" artifacts/ + done + - deploy-to-bitrise-io@1.10: + inputs: + - deploy_path: artifacts/ + + # FOCUS RELEASE WORKFLOWS + focus_SPM_Beta: + before_run: + - focus-clone-and-build-dependencies + - focus-set-default-browser-entitlement + - focus-configure-nimbus + - focus-configure-sentry + steps: + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_BETA_VERSION" + - plist_path: focus-ios/Blockzilla/Info.plist + title: Set Blockzilla version numbers + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_BETA_VERSION" + - plist_path: focus-ios/ContentBlocker/Info.plist + title: Set ContentBlocker version numbers + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_BETA_VERSION" + - plist_path: focus-ios/FocusIntentExtension/Info.plist + title: Set FocusIntentExtension version numbers + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_BETA_VERSION" + - plist_path: focus-ios/OpenInFocus/Info.plist + title: Set OpenInFocus version numbers + - certificate-and-profile-installer@1: {} + - xcode-archive@3: + inputs: + - project_path: focus-ios/Blockzilla.xcodeproj + - scheme: Focus + - team_id: 43AQ936H96 + - export_method: app-store + title: Build Focus + - deploy-to-itunesconnect-application-loader@1: + inputs: + - connection: 'off' + - app_password: "$APPLE_ACCOUNT_PW" + - itunescon_user: "$APPLE_ACCOUNT_ID" + - script@1: + title: Upload Focus Symbols + inputs: + - content: |- + #!/usr/bin/env bash + set -x + focus-ios/focus-ios-tests/tools/sentry-cli --auth-token "$SENTRY_AUTH_TOKEN" upload-dif \ + --org mozilla --project focus-ios "$BITRISE_DSYM_DIR_PATH" + - xcode-archive@3: + inputs: + - project_path: focus-ios/Blockzilla.xcodeproj + - scheme: Klar + - export_method: app-store + title: Build Klar + - deploy-to-itunesconnect-application-loader@1: + inputs: + - connection: 'off' + - app_password: "$APPLE_ACCOUNT_PW" + - itunescon_user: "$APPLE_ACCOUNT_ID" + - script@1: + title: Upload Klar Symbols + inputs: + - content: |- + #!/usr/bin/env bash + set -x + focus-ios/focus-ios-tests/tools/sentry-cli --auth-token "$SENTRY_AUTH_TOKEN" upload-dif \ + --org mozilla --project klar-ios "$BITRISE_DSYM_DIR_PATH" + + focus_SPM_Nightly: + before_run: + - focus-clone-and-build-dependencies + - focus-set-default-browser-entitlement + - focus-configure-nimbus + - focus-configure-sentry + steps: + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_NIGHTLY_VERSION" + - plist_path: focus-ios/Blockzilla/Info.plist + title: Set Blockzilla version numbers + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_NIGHTLY_VERSION" + - plist_path: focus-ios/ContentBlocker/Info.plist + title: Set ContentBlocker version numbers + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_NIGHTLY_VERSION" + - plist_path: focus-ios/FocusIntentExtension/Info.plist + title: Set FocusIntentExtension version numbers + - set-xcode-build-number@1: + inputs: + - build_short_version_string: "$BITRISE_NIGHTLY_VERSION" + - plist_path: focus-ios/OpenInFocus/Info.plist + title: Set OpenInFocus version numbers + - certificate-and-profile-installer@1: {} + - xcode-archive@3: + inputs: + - project_path: focus-ios/Blockzilla.xcodeproj + - scheme: Focus + - team_id: 43AQ936H96 + - export_method: app-store + title: Build Focus + - deploy-to-itunesconnect-application-loader@1: + inputs: + - connection: 'off' + - app_password: "$APPLE_ACCOUNT_PW" + - itunescon_user: "$APPLE_ACCOUNT_ID" + - script@1: + title: Upload Focus Symbols + inputs: + - content: |- + #!/usr/bin/env bash + set -x + focus-ios/focus-ios-tests/tools/sentry-cli --auth-token "$SENTRY_AUTH_TOKEN" upload-dif \ + --org mozilla --project focus-ios "$BITRISE_DSYM_DIR_PATH" + - xcode-archive@3: + inputs: + - project_path: focus-ios/Blockzilla.xcodeproj + - scheme: Klar + - export_method: app-store + title: Build Klar + - deploy-to-itunesconnect-application-loader@1: + inputs: + - connection: 'off' + - app_password: "$APPLE_ACCOUNT_PW" + - itunescon_user: "$APPLE_ACCOUNT_ID" + - script@1: + title: Upload Klar Symbols + inputs: + - content: |- + #!/usr/bin/env bash + set -x + focus-ios/focus-ios-tests/tools/sentry-cli --auth-token "$SENTRY_AUTH_TOKEN" upload-dif \ + --org mozilla --project klar-ios "$BITRISE_DSYM_DIR_PATH" + + focus_release: + before_run: + - focus-clone-and-build-dependencies + - focus-set-project-version + - focus-set-default-browser-entitlement + - focus-configure-nimbus + - focus-configure-sentry + steps: + - certificate-and-profile-installer@1: {} + - xcode-archive@3: + inputs: + - project_path: focus-ios/Blockzilla.xcodeproj + - scheme: Focus + - team_id: 43AQ936H96 + - export_method: app-store + title: Build Focus + - deploy-to-itunesconnect-application-loader@1: + inputs: + - connection: 'off' + - app_password: "$APPLE_ACCOUNT_PW" + - itunescon_user: "$APPLE_ACCOUNT_ID" + - script@1: + title: Upload Focus Symbols + inputs: + - content: |- + #!/usr/bin/env bash + set -x + focus-ios/focus-ios-tests/tools/sentry-cli --auth-token "$SENTRY_AUTH_TOKEN" upload-dif \ + --org mozilla --project focus-ios "$BITRISE_DSYM_DIR_PATH" + - xcode-archive@3: + inputs: + - project_path: focus-ios/Blockzilla.xcodeproj + - scheme: Klar + - export_method: app-store + title: Build Klar + - deploy-to-itunesconnect-application-loader@1: + inputs: + - connection: 'off' + - app_password: "$APPLE_ACCOUNT_PW" + - itunescon_user: "$APPLE_ACCOUNT_ID" + - script@1: + title: Upload Klar Symbols + inputs: + - content: |- + #!/usr/bin/env bash + set -x + focus-ios/focus-ios-tests/tools/sentry-cli --auth-token "$SENTRY_AUTH_TOKEN" upload-dif \ + --org mozilla --project klar-ios "$BITRISE_DSYM_DIR_PATH" + app: envs: - opts: @@ -1710,11 +2114,6 @@ app: is_expand: false BITRISE_BETA_VERSION: '124.0' -meta: - bitrise.io: - stack: osx-xcode-15.2.x - machine_type_id: g2-m1.8core - trigger_map: - push_branch: main pipeline: pipeline_build_and_test @@ -1728,3 +2127,9 @@ trigger_map: pipeline: pipeline_build_and_test - pull_request_target_branch: release/v* pipeline: pipeline_build_and_test + +meta: + bitrise.io: + stack: osx-xcode-15.2.x + machine_type_id: g2-m1.8core +