Revision control

Copy as Markdown

format_version: '8'
project_type: ios
pipelines:
pipeline_multiple_shards:
stages:
- stage_1: {}
- stage_2: {}
stages:
stage_1:
workflows:
- configure_build: {}
stage_2:
workflows:
- build_and_test_1_SmokeTest2: {}
- build_and_test_2_SmokeTest: {}
- build_and_test_3_SmokeTest3: {}
- build_and_test_4_SmokeTest4: {}
- build_and_test_5_UnitTest: {}
- just_build_fennec_to_get_warnings: {}
workflows:
configure_build:
before_run:
- 1_git_clone_and_post_clone
- 2_certificate_and_profile
- 3_provisioning_and_npm_installation
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
title: Bitrise Test Plan Sharder
inputs:
- xcode_project: Client.xcodeproj
- target: Client
- shards: '3'
- scheme: Fennec_Enterprise_XCUITests
- test_plan: SmokeXCUITests.xctestplan
- debug_mode: 'true'
- test_path: ''
- file_type: ".swift"
- script@1.1:
title: Build for Testing
inputs:
- content: |
set -euxo pipefail
echo "-- build-for-testing --"
mkdir DerivedData
xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile
xcodebuild "-project" "/Users/vagrant/git/Client.xcodeproj" "-scheme" "Fennec_Enterprise_XCUITests" -configuration "Fennec" "CODE_SIGNING_ALLOWED=NO" -sdk "iphonesimulator" "-destination" "platform=iOS Simulator,name=iPhone 14,OS=latest" "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: Detect number of warnings
is_always_run: true
inputs:
- content: |
set -e
set -x
echo "bitrise_xcode"
echo "$BITRISE_XCODEBUILD_TEST_LOG_PATH"
COUNT_XCUI=$(./test-fixtures/generate-metrics.sh /Users/vagrant/git/xcodebuild_test.log all)
envman add --key SHOW_WARNING_COUNT_XCUI --value "$COUNT_XCUI"
envman add --key SHOW_WARNING_IN_SLACK --value Show_Warnings
STR=$COUNT_XCUI
SUB='greater'
if [[ "$STR" == *"$SUB"* ]]; then
echo "Failure, the number of warnings increased"
exit 1
fi
- slack@3.1:
is_always_run: true
inputs:
- title: ''
- author_name: ''
- webhook_url: "$WEBHOOK_SLACK_TOKEN"
- footer: Created by Mobile Test Engineering
- pretext_on_error: "*Firefox-iOS* :firefox: *Build/XCUITests* :x:"
- pretext: "*Firefox-iOS* :firefox: *Build/XCUITests* :white_check_mark:"
- timestamp: 'no'
- fields: |
Task | ${BITRISE_BUILD_URL}
Owner | ${GIT_CLONE_COMMIT_AUTHOR_NAME}
Commit | ${GIT_CLONE_COMMIT_MESSAGE_SUBJECT}
Source-Workflow | ${BITRISE_TRIGGERED_WORKFLOW_TITLE}
Branch | ${BITRISE_GIT_BRANCH}
Warnings-in-code-test | ${SHOW_WARNING_COUNT_XCUI}
- buttons: |
App|${BITRISE_APP_URL}
- slack@3.1:
is_always_run: true
run_if: '{{getenv "NEW_RC_VERSION" | eq "New_RC_Version"}}'
inputs:
- channel: "#firefox-ios"
- text: Build status using latest Rust-Component
- webhook_url: $WEBHOOK_SLACK_TOKEN_2
- script@1.1:
title: Compress Derived Data
is_always_run: true
inputs:
- content: |
set -euxo pipefail
echo "-- compress --"
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/DerivedData/Build/Products/Fennec_iphonesimulator15.2-x86_64.xctestrun" \
"$BITRISE_SOURCE_DIR/Client.xcodeproj" \
"$BITRISE_SOURCE_DIR/Tests/SmokeXCUITests.xctestplan" \
"$BITRISE_SOURCE_DIR/Tests/Smoketest2.xctestplan" \
"$BITRISE_SOURCE_DIR/Tests/Smoketest3.xctestplan" \
"$BITRISE_SOURCE_DIR/Tests/Smoketest4.xctestplan" \
"$BITRISE_SOURCE_DIR/xcodebuild.log" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_Fennec_Enterprise_XCUITests_iphonesimulator16.1-x86_64.xctestrun" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_SmokeXCUITests_iphonesimulator16.1-x86_64.xctestrun" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_Smoketest2_iphonesimulator16.1-x86_64.xctestrun" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_Smoketest3_iphonesimulator16.1-x86_64.xctestrun" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_Smoketest4_iphonesimulator16.1-x86_64.xctestrun" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_UnitTest_iphonesimulator16.1-x86_64.xctestrun" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Fennec-iphonesimulator/" \
"$BITRISE_SOURCE_DIR/Tests/UnitTest.xctestplan" \
"$BITRISE_SOURCE_DIR/Client/" \
"$BITRISE_SOURCE_DIR/Tests/XCUITests"
- deploy-to-bitrise-io@2:
inputs:
- deploy_path: "${BITRISE_SOURCE_DIR}/DerivedData.zip"
build_and_test_1_SmokeTest2:
before_run:
- 1_git_clone_and_post_clone
- Decision_to_run_UI_Tests
steps:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Pull artifacts
inputs:
- verbose: true
- artifact_sources: stage_1.*
- script@1.1:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Unzip
inputs:
- content: |
set -euxo pipefail
echo "$BITRISE_ARTIFACT_PATHS"
echo "-- unzip -- "
exec unzip "${BITRISE_ARTIFACT_PATHS}"
echo "show dir"
ls
- script@1.1:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Test without Building
inputs:
- content: |
#!/usr/bin/env bash
set -ex
ls ./Users/vagrant/git/Tests/
cp -r ./Users/vagrant/git/Tests/* .
mv ./Users/vagrant/git/DerivedData .
ls -la
echo "-- test-without-building --"
xcodebuild -resultBundlePath "xcodebuild.xcresult" -derivedDataPath "/Users/vagrant/git/DerivedData" -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" test-without-building -xctestrun "/Users/vagrant/git/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_Smoketest2_iphonesimulator16.1-x86_64.xctestrun"
- custom-test-results-export@0:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
inputs:
- search_pattern: "$BITRISE_SOURCE_DIR/xcodebuild.xcresult"
- test_name: Smoketest2
- deploy-to-bitrise-io@2:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
build_and_test_2_SmokeTest:
before_run:
- 1_git_clone_and_post_clone
- Decision_to_run_UI_Tests
steps:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Pull artifacts
inputs:
- verbose: true
- artifact_sources: stage_1.*
- script@1.1:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Unzip
inputs:
- content: |
set -euxo pipefail
echo "$BITRISE_ARTIFACT_PATHS"
echo "-- unzip -- "
exec unzip "${BITRISE_ARTIFACT_PATHS}"
echo "show dir"
ls
- script@1.1:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Test without Building
inputs:
- content: |
#!/usr/bin/env bash
set -ex
ls ./Users/vagrant/git/Tests/
cp -r ./Users/vagrant/git/Tests/* .
mv ./Users/vagrant/git/DerivedData .
ls -la
echo "-- test-without-building --"
xcodebuild -resultBundlePath "xcodebuild.xcresult" -derivedDataPath "/Users/vagrant/git/DerivedData" -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" test-without-building -xctestrun "/Users/vagrant/git/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_SmokeXCUITests_iphonesimulator16.1-x86_64.xctestrun"
- custom-test-results-export@0:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
inputs:
- search_pattern: "$BITRISE_SOURCE_DIR/xcodebuild.xcresult"
- test_name: SmokeTest
- deploy-to-bitrise-io@2:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
build_and_test_3_SmokeTest3:
before_run:
- 1_git_clone_and_post_clone
- Decision_to_run_UI_Tests
steps:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Pull artifacts
inputs:
- verbose: true
- artifact_sources: stage_1.*
- script@1.1:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Unzip
inputs:
- content: |
set -euxo pipefail
echo "$BITRISE_ARTIFACT_PATHS"
echo "-- unzip -- "
exec unzip "${BITRISE_ARTIFACT_PATHS}"
echo "show dir"
ls
- script@1.1:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Test without Building
inputs:
- content: |
#!/usr/bin/env bash
set -ex
ls ./Users/vagrant/git/Tests/
cp -r ./Users/vagrant/git/Tests/* .
mv ./Users/vagrant/git/DerivedData .
ls -la
echo "-- test-without-building --"
xcodebuild -resultBundlePath "xcodebuild.xcresult" -derivedDataPath "/Users/vagrant/git/DerivedData" -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" test-without-building -xctestrun "/Users/vagrant/git/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_Smoketest3_iphonesimulator16.1-x86_64.xctestrun"
- custom-test-results-export@0:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
inputs:
- search_pattern: "$BITRISE_SOURCE_DIR/xcodebuild.xcresult"
- test_name: SmokeTest3
- deploy-to-bitrise-io@2:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
build_and_test_4_SmokeTest4:
before_run:
- 1_git_clone_and_post_clone
- Decision_to_run_UI_Tests
steps:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Pull artifacts
inputs:
- verbose: true
- artifact_sources: stage_1.*
- script@1.1:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Unzip
inputs:
- content: |
set -euxo pipefail
echo "$BITRISE_ARTIFACT_PATHS"
echo "-- unzip -- "
exec unzip "${BITRISE_ARTIFACT_PATHS}"
echo "show dir"
ls
- script@1.1:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
title: Test without Building
inputs:
- content: |
#!/usr/bin/env bash
set -ex
ls ./Users/vagrant/git/Tests/
cp -r ./Users/vagrant/git/Tests/* .
mv ./Users/vagrant/git/DerivedData .
ls -la
echo "-- test-without-building --"
xcodebuild -resultBundlePath "xcodebuild.xcresult" -derivedDataPath "/Users/vagrant/git/DerivedData" -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" test-without-building -xctestrun "/Users/vagrant/git/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_Smoketest4_iphonesimulator16.1-x86_64.xctestrun"
- custom-test-results-export@0:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
inputs:
- search_pattern: "$BITRISE_SOURCE_DIR/xcodebuild.xcresult"
- test_name: SmokeTest4
- deploy-to-bitrise-io@2:
run_if: '{{getenv "RUN_UI_TESTS" | eq "Run_UI_Tests"}}'
build_and_test_5_UnitTest:
steps:
title: Pull artifacts
inputs:
- verbose: true
- artifact_sources: stage_1.*
- 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
- script@1.1:
title: Test without Building
inputs:
- content: |
#!/usr/bin/env bash
set -ex
ls -la
ls ./Users/vagrant/git/Tests/
cp -r ./Users/vagrant/git/Tests/* .
mv ./Users/vagrant/git/* .
ls -la
pwd
echo "-- test-without-building --"
xcodebuild -resultBundlePath "xcodebuild.xcresult" -derivedDataPath "/Users/vagrant/git/DerivedData" -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" test-without-building -xctestrun "/Users/vagrant/git/DerivedData/Build/Products/Fennec_Enterprise_XCUITests_UnitTest_iphonesimulator16.1-x86_64.xctestrun"
- script@1.1:
title: Compress Result Bundle
is_always_run: true
inputs:
- content: |-
set -euxo pipefail
echo "-- compress --"
cd "${BITRISE_DEPLOY_DIR}/"
exec zip -0 -qr "${BITRISE_SOURCE_DIR}/TestResults.zip" "/Users/vagrant/git/xcodebuild.xcresult"
- deploy-to-bitrise-io@2:
inputs:
- deploy_path: "${BITRISE_SOURCE_DIR}/TestResults.zip"
- custom-test-results-export@0:
inputs:
- search_pattern: "$BITRISE_SOURCE_DIR/xcodebuild.xcresult"
- test_name: Unit Test
- deploy-to-bitrise-io@2.0: {}
meta:
bitrise.io:
stack: osx-xcode-14.1.x
machine_type_id: g2.8core
just_build_fennec_to_get_warnings:
before_run:
- 1_git_clone_and_post_clone
- 2_certificate_and_profile
- 3_provisioning_and_npm_installation
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- script@1.1:
title: Build for Warnings
inputs:
- content: |
set -euxo pipefail
echo "-- build-for-testing --"
mkdir DerivedData2
xcodebuild "-project" "/Users/vagrant/git/Client.xcodeproj" "-scheme" "Fennec" -configuration "Fennec" "CODE_SIGNING_ALLOWED=NO" -sdk "iphonesimulator" "-destination" "platform=iOS Simulator,name=iPhone 14,OS=latest" "COMPILER_INDEX_STORE_ENABLE=NO" "build" "CODE_SIGN_IDENTITY=" "CODE_SIGNING_REQUIRED=NO" "CODE_SIGNING_ALLOWED=NO" | xcpretty | tee xcodebuild_fennec.log
echo "show files"
ls
- script@1.1:
title: Detect number of warnings
is_always_run: true
inputs:
- content: |
set -e
set -x
echo "$SHOW_WARNING_COUNT_XCUI"
COUNT_XCUI=$(./test-fixtures/generate-metrics.sh /Users/vagrant/git/xcodebuild_fennec.log all)
envman add --key SHOW_WARNING_COUNT --value "$COUNT_XCUI"
envman add --key SHOW_WARNING_IN_SLACK --value Show_Warnings
STR=$COUNT_XCUI
SUB='greater'
if [[ "$STR" == *"$SUB"* ]]; then
echo "Failure, the number of warnings increased"
exit 1
fi
- slack@3.1:
is_always_run: true
inputs:
- title: ''
- author_name: ''
- webhook_url: "$WEBHOOK_SLACK_TOKEN"
- footer: Created by Mobile Test Engineering
- pretext_on_error: "*Firefox-iOS* :firefox: *Build/XCUITests* :x:"
- pretext: "*Firefox-iOS* :firefox: *Build/XCUITests* :white_check_mark:"
- timestamp: 'no'
- fields: |
Task | ${BITRISE_BUILD_URL}
Owner | ${GIT_CLONE_COMMIT_AUTHOR_NAME}
Commit | ${GIT_CLONE_COMMIT_MESSAGE_SUBJECT}
Source-Workflow | ${BITRISE_TRIGGERED_WORKFLOW_TITLE}
Branch | ${BITRISE_GIT_BRANCH}
Warnings-in-code | ${SHOW_WARNING_COUNT}
- buttons: |
App|${BITRISE_APP_URL}
meta:
bitrise.io:
stack: osx-xcode-14.1.x
machine_type_id: g2.4core
send_slack_notification:
steps:
- slack@3.1:
#run_if: '{{getenv "SHOW_WARNING_IN_SLACK" | eq "Show_Warnings" }}'
inputs:
- title: ''
- author_name: ''
- webhook_url: "$WEBHOOK_SLACK_TOKEN"
- footer: Created by Mobile Test Engineering
- pretext_on_error: "*Firefox-iOS* :firefox: *Build/XCUITests* :x:"
- pretext: "*Firefox-iOS* :firefox: *Build/XCUITests* :white_check_mark:"
- timestamp: 'no'
- fields: |
Task | ${BITRISE_BUILD_URL}
Owner | ${GIT_CLONE_COMMIT_AUTHOR_NAME}
Commit | ${GIT_CLONE_COMMIT_MESSAGE_SUBJECT}
Source-Workflow | ${BITRISE_TRIGGERED_WORKFLOW_TITLE}
Branch | ${BITRISE_GIT_BRANCH}
Warnings-in-code | ${SHOW_WARNING_COUNT}
Warnings-in-code-test | ${SHOW_WARNING_COUNT_XCUI}
- buttons: |
App|${BITRISE_APP_URL}
1_git_clone_and_post_clone:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@6.2: {}
- script@1.1:
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -x
BRANCH=$BITRISE_GIT_BRANCH
if [[ $BRANCH == update-spm-new-rust-component-tag-* ]]
then
echo "Building with new Rust-Component version"
envman add --key NEW_RC_VERSION --value New_RC_Version
fi
title: Save Branch Name
- script@1:
title: Add default web browser entitlement for Fennec
inputs:
- content: |-
#/usr/bin/env bash
set -x
echo "Adding com.apple.developer.web-browser to entitlements"
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" Client/Entitlements/FennecApplication.entitlements
- cache-pull@2.1: {}
2_certificate_and_profile:
steps:
- certificate-and-profile-installer@1.10: {}
- script@1:
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
echo 'EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))' >> /tmp/tmp.xcconfig
echo 'IPHONEOS_DEPLOYMENT_TARGET=11.4' >> /tmp/tmp.xcconfig
echo 'SWIFT_TREAT_WARNINGS_AS_ERRORS=NO' >> /tmp/tmp.xcconfig
echo 'GCC_TREAT_WARNINGS_AS_ERRORS=NO' >> /tmp/tmp.xcconfig
export XCODE_XCCONFIG_FILE=/tmp/tmp.xcconfig
envman add --key XCODE_XCCONFIG_FILE --value /tmp/tmp.xcconfig
title: Workaround carthage lipo
- script@1:
inputs:
- content: |-
./bootstrap.sh
title: Run bootstrap
- swiftlint-extended@1:
inputs:
- linting_path: "$BITRISE_SOURCE_DIR"
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -x
rm /tmp/tmp.xcconfig
envman add --key XCODE_XCCONFIG_FILE --value ''
title: Remove carthage lipo workaround
3_provisioning_and_npm_installation:
steps:
- script@1.1:
title: NPM install and build
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
npm install
npm run build
4_A_xcode_build_and_test_Fennec:
steps:
- xcode-build-for-simulator@0.12:
inputs:
- scheme: Fennec
- xcodebuild_options: CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- xcode-test@4.5:
inputs:
- scheme: Fennec
- simulator_device: iPhone 8
5_deploy_and_slack:
steps:
- deploy-to-bitrise-io@1.9: {}
- cache-push@2.2:
is_always_run: true
- slack@3.1:
run_if: '{{getenv "SHOW_WARNING_IN_SLACK" | eq "Show_Warnings" }}'
inputs:
- title: ''
- author_name: ''
- webhook_url: "$WEBHOOK_SLACK_TOKEN"
- footer: Created by Mobile Test Engineering
- pretext_on_error: "*Firefox-iOS* :firefox: *Build/XCUITests* :x:"
- pretext: "*Firefox-iOS* :firefox: *Build/XCUITests* :white_check_mark:"
- timestamp: 'no'
- fields: |
Task | ${BITRISE_BUILD_URL}
Owner | ${GIT_CLONE_COMMIT_AUTHOR_NAME}
Commit | ${GIT_CLONE_COMMIT_MESSAGE_SUBJECT}
Source-Workflow | ${BITRISE_TRIGGERED_WORKFLOW_TITLE}
Branch | ${BITRISE_GIT_BRANCH}
Warnings-in-code | ${SHOW_WARNING_COUNT}
Warnings-in-code-test | ${SHOW_WARNING_COUNT_XCUI}
- buttons: |
App|${BITRISE_APP_URL}
- slack@3.1:
run_if: '{{getenv "SHOW_WARNING_IN_SLACK" | ne "Show_Warnings" }}'
inputs:
- title: ''
- author_name: ''
- webhook_url: "$WEBHOOK_SLACK_TOKEN"
- footer: Created by Mobile Test Engineering
- pretext_on_error: "*Firefox-iOS* :firefox: *Build/XCUITests* :x:"
- pretext: "*Firefox-iOS* :firefox: *Build/XCUITests* :white_check_mark:"
- timestamp: 'no'
- fields: |
Task | ${BITRISE_BUILD_URL}
Owner | ${GIT_CLONE_COMMIT_AUTHOR_NAME}
Commit | ${GIT_CLONE_COMMIT_MESSAGE_SUBJECT}
Source-Workflow | ${BITRISE_TRIGGERED_WORKFLOW_TITLE}
Branch | ${BITRISE_GIT_BRANCH}
- buttons: |
App|${BITRISE_APP_URL}
4_B_xcode_build_and_test_Fennec_Enterprise_XCUITests:
steps:
- xcode-build-for-simulator@0.12:
inputs:
- xcodebuild_options: CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- scheme: Fennec_Enterprise_XCUITests
- xcode-test@4.5:
inputs:
- scheme: Fennec_Enterprise_XCUITests
- xcodebuild_test_options: "-testPlan Fennec_Enterprise_XCUITests"
- simulator_device: "$IOS_DEVICE"
Detect_warnings:
steps:
- script@1.1:
title: Detect number of warnings
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
TEST_LOG_PATH=$BITRISE_XCODEBUILD_TEST_LOG_PATH
COUNT_XCUI=$(./test-fixtures/generate-metrics.sh $TEST_LOG_PATH all)
envman add --key SHOW_WARNING_COUNT_XCUI --value "$COUNT_XCUI"
envman add --key SHOW_WARNING_IN_SLACK --value Show_Warnings
STR=$COUNT_XCUI
SUB='greater'
if [[ "$STR" == *"$SUB"* ]]; then
echo "Failure, the number of warnings increased"
exit 1
fi
is_always_run: true
Decision_to_run_UI_Tests:
steps:
- script@1:
title: Files changed in commit
inputs:
- content: |-
#!/usr/bin/env bash
set -e
echo "Commit on origin/main"
COMMIT_ON_MAIN_ORIGIN=`git log -n 1 origin/main --pretty=format:"%H"`
echo $COMMIT_ON_MAIN_ORIGIN
echo "Files changed with origin"
echo `git diff --name-only $GIT_CLONE_COMMIT_HASH $COMMIT_ON_MAIN_ORIGIN`
echo "Commit on main branch"
echo $GIT_CLONE_COMMIT_HASH
COMMIT_ON_MAIN_PR=`git log -n 2 main --pretty=format:"%H" | tail -n 1`
echo $COMMIT_ON_MAIN_PR
filesChanged=""
if [[ $COMMIT_ON_MAIN_PR == $COMMIT_ON_MAIN_ORIGIN ]]
then
echo "First commit, use origin/main"
filesChanged=`git diff --name-only $GIT_CLONE_COMMIT_HASH $COMMIT_ON_MAIN_ORIGIN`
echo $filesChanged
elif [[ $COMMIT_ON_MAIN_PR == $GIT_CLONE_COMMIT_HASH ]]
then
echo "Merge made by the 'ort' strategy"
filesChanged=`git diff --name-only $GIT_CLONE_COMMIT_HASH $COMMIT_ON_MAIN_ORIGIN`
echo $filesChanged
else
echo "Commits on PR"
echo "Files changed betwee commits"
echo `git diff --name-only $GIT_CLONE_COMMIT_HASH $COMMIT_ON_MAIN_PR`
filesChanged=`git diff --name-only $GIT_CLONE_COMMIT_HASH $COMMIT_ON_MAIN_PR`
echo $filesChanged
fi
doNotRunTests='^(\.[a-zA-Z]+\.y*|Docs/*|Sync*/*|.github/|[a-zA-Z]+\.md|[a-zA-Z]+\.sh|[a-zA-Z0-9]+[-_]+[a-zA-Z]+\.sh)|fastlane/*|taskcluster/*|L10nSnapshotTests/*|Shared/[a-zA-Z]+\.lproj/*|Shared/[A-Za-z]/*|WidgetKit/[a-zA-Z]+\.lproj/*|Client/*/[a-zA-Z]+\.lproj/*)'
if egrep -v "${doNotRunTests}" <<< "${filesChanged}" && [ ! -z "$filesChanged" ];
then
echo "Running UI Tests"
envman add --key RUN_UI_TESTS --value Run_UI_Tests
else
echo "Not Running UI Tests"
fi
NewXcodeVersions:
steps:
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
YESTERDAY=`date -v -1d '+%Y-%m-%d'`
brew install jq
resp=$(curl -X GET -s -H 'Accept: application/vnd.github.v3+json' -H "authorization: Bearer ${GITHUB_ACCESS_TOKEN}" https://api.github.com/repos/mozilla-mobile/firefox-ios/commits\?sha\=main\&since\=$YESTERDAY | jq -r '.[].commit.message | select(contains("Auto Update Bitrise.YML"))')
echo $resp
if [ -z "$resp" ]
then
echo "There is not any new commit, stop building"
else
echo "There is a new commit, continue building"
envman add --key NEW_XCODE_VERSION --value New_Version_Found
fi
if [[ $BITRISE_GIT_MESSAGE == BuildAndRun* ]]
then
echo "Scheduled build to run the rest of steps once xcode version has been updated"
envman add --key RUN_ALL_STEPS --value Run_All_Steps
fi
title: Check main branch for recent activity before continuing
- activate-ssh-key@4.0:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@6.2: {}
- cache-pull@2.4: {}
- certificate-and-profile-installer@1.10: {}
- script@1:
run_if: '{{getenv "NEW_XCODE_VERSION" | eq "New_Version_Found" | or (getenv "RUN_ALL_STEPS" | eq "Run_All_Steps")}}'
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -x
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8' > /tmp/tmp.xcconfig
echo 'EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))' >> /tmp/tmp.xcconfig
echo 'IPHONEOS_DEPLOYMENT_TARGET=11.4' >> /tmp/tmp.xcconfig
echo 'SWIFT_TREAT_WARNINGS_AS_ERRORS=NO' >> /tmp/tmp.xcconfig
echo 'GCC_TREAT_WARNINGS_AS_ERRORS=NO' >> /tmp/tmp.xcconfig
export XCODE_XCCONFIG_FILE=/tmp/tmp.xcconfig
envman add --key XCODE_XCCONFIG_FILE --value /tmp/tmp.xcconfig
title: Workaround carthage lipo bug
- script@1:
run_if: '{{getenv "NEW_XCODE_VERSION" | eq "New_Version_Found" | or (getenv "RUN_ALL_STEPS" | eq "Run_All_Steps")}}'
inputs:
- content: |-
./bootstrap.sh
title: Run bootstrap
- script@1:
run_if: '{{getenv "NEW_XCODE_VERSION" | eq "New_Version_Found" | or (getenv "RUN_ALL_STEPS" | eq "Run_All_Steps")}}'
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -x
rm /tmp/tmp.xcconfig
envman add --key XCODE_XCCONFIG_FILE --value ''
title: Remove carthage lipo workaround
- script@1:
run_if: '{{getenv "NEW_XCODE_VERSION" | eq "New_Version_Found" | or (getenv "RUN_ALL_STEPS" | eq "Run_All_Steps")}}'
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -x
cd Client.xcodeproj
sed -i '' 's/"Fennec Development"/"Bitrise Firefox iOS Dev"/' project.pbxproj
sed -i '' 's/Fennec Today Development/Bitrise Firefox iOS Dev - Fennec Today/' project.pbxproj
sed -i '' 's/Fennec ShareTo Development/Bitrise Firefox iOS Dev - Share To/' project.pbxproj
sed -i '' 's/Fennec WidgetKit Development/Bitrise Firefox iOS Dev - WidgetKit/' project.pbxproj
sed -i '' 's/"XCUITests"/"Bitrise Firefox iOS Dev - XCUI Tests"/' project.pbxproj
sed -i '' 's/Fennec NotificationService Development/Bitrise Firefox iOS Dev - Notification Service/' project.pbxproj
sed -i '' 's/CODE_SIGN_IDENTITY = "iPhone Developer"/CODE_SIGN_IDENTITY = "iPhone Distribution"/' project.pbxproj
cd -
title: Set provisioning to Bitrise in xcodeproj
- script@1.1:
run_if: '{{getenv "NEW_XCODE_VERSION" | eq "New_Version_Found" | or (getenv "RUN_ALL_STEPS" | eq "Run_All_Steps")}}'
title: NPM install and build
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
npm install
npm run build
- xcode-build-for-simulator@0.12:
run_if: '{{getenv "NEW_XCODE_VERSION" | eq "New_Version_Found" | or (getenv "RUN_ALL_STEPS" | eq "Run_All_Steps")}}'
inputs:
- xcodebuild_options: CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- scheme: Fennec
- simulator_device: iPhone 14
- xcode-test@4.5:
run_if: '{{getenv "NEW_XCODE_VERSION" | eq "New_Version_Found" | or (getenv "RUN_ALL_STEPS" | eq "Run_All_Steps")}}'
inputs:
- scheme: Fennec
- destination: platform=iOS Simulator,name=iPhone 14,OS=latest
- deploy-to-bitrise-io@1.9: {}
- cache-push@2.4: {}
- slack@3.1:
run_if: '{{getenv "NEW_XCODE_VERSION" | eq "New_Version_Found" | or (getenv "RUN_ALL_STEPS" | eq "Run_All_Steps")}}'
inputs:
- channel: "#firefox-ios"
- text: Build status using latest Xcode detected
- 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-14.1.x
machine_type_id: g2.4core
RunAllXCUITests:
steps: []
after_run:
- 1_git_clone_and_post_clone
- 2_certificate_and_profile
- 3_provisioning_and_npm_installation
- 4_B_xcode_build_and_test_Fennec_Enterprise_XCUITests
- 5_deploy_and_slack
meta:
bitrise.io:
stack: osx-xcode-14.1.x
machine_type_id: g2.4core
RunSmokeXCUITestsiPad:
steps:
- xcode-build-for-simulator@0.12:
inputs:
- xcodebuild_options: CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- scheme: Fennec_Enterprise_XCUITests
- xcode-test@4.5:
is_always_run: true
inputs:
- scheme: Fennec_Enterprise_XCUITests
- test_plan: "SmokeXCUITests"
- destination: platform=iOS Simulator,name=iPad Pro (12.9-inch) (5th generation),OS=latest
description: This Workflow is to run SmokeTest on iPad simulator device
- xcode-test@4.5:
is_always_run: true
inputs:
- scheme: Fennec_Enterprise_XCUITests
- test_plan: "Smoketest2"
- destination: platform=iOS Simulator,name=iPad Pro (12.9-inch) (5th generation),OS=latest
description: This Workflow is to run SmokeTest on iPad simulator device Smoketest2
- xcode-test@4.5:
is_always_run: true
inputs:
- scheme: Fennec_Enterprise_XCUITests
- test_plan: "Smoketest3"
- destination: platform=iOS Simulator,name=iPad Pro (12.9-inch) (5th generation),OS=latest
description: This Workflow is to run SmokeTest on iPad simulator device Smoketest3
- xcode-test@4.5:
is_always_run: true
inputs:
- scheme: Fennec_Enterprise_XCUITests
- test_plan: "Smoketest4"
- destination: platform=iOS Simulator,name=iPad Pro (12.9-inch) (5th generation),OS=latest
description: This Workflow is to run SmokeTest on iPad simulator device Smoketest4
meta:
bitrise.io:
stack: osx-xcode-14.1.x
machine_type_id: g2.4core
before_run:
- 1_git_clone_and_post_clone
- 2_certificate_and_profile
- 3_provisioning_and_npm_installation
after_run:
- 5_deploy_and_slack
RunUITests:
steps:
- xcode-build-for-simulator@0.12:
inputs:
- configuration: Release
- xcodebuild_options: CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO -testPlan SmokeXCUITests
- scheme: Fennec_Enterprise_XCUITests
- xcodebuild_test_options: "-testPlan SmokeXCUITests"
- xcode-test@4.5:
inputs:
- scheme: Fennec_Enterprise_UITests
- simulator_device: iPhone 8
is_always_run: true
meta:
bitrise.io:
stack: osx-xcode-14.1.x
machine_type_id: g2.4core
before_run:
- 1_git_clone_and_post_clone
- 2_certificate_and_profile
- 3_provisioning_and_npm_installation
after_run:
- 5_deploy_and_slack
L10nBuild:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@6.2: {}
- cache-pull@2.1: {}
- certificate-and-profile-installer@1.10: {}
- script@1:
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
echo 'EXCLUDED_ARCHS=$(inherited)
$(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))'
>> /tmp/tmp.xcconfig
echo 'IPHONEOS_DEPLOYMENT_TARGET=11.4' >> /tmp/tmp.xcconfig
echo 'SWIFT_TREAT_WARNINGS_AS_ERRORS=NO' >> /tmp/tmp.xcconfig
echo 'GCC_TREAT_WARNINGS_AS_ERRORS=NO' >> /tmp/tmp.xcconfig
export XCODE_XCCONFIG_FILE=/tmp/tmp.xcconfig
envman add --key XCODE_XCCONFIG_FILE --value /tmp/tmp.xcconfig
title: Workaround carthage lipo
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -x
# Import only the shipping locales (from shipping_locales.txt) onRelease
git clone --depth 1 https://github.com/mozilla-l10n/firefoxios-l10n firefoxios-l10n || exit 1
title: Pull in L10n
- script@1:
inputs:
- content: |-
./bootstrap.sh
title: Run bootstrap
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
rm /tmp/tmp.xcconfig
envman add --key XCODE_XCCONFIG_FILE --value ''
title: Remove carthage lip
- script@1.1:
title: NPM install and build
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
npm install
npm run build
- script@1.1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
fastlane -v
./l10n-screenshots.sh en-US
title: Generate screenshots
- 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'
- cache-push@2.3: {}
envs:
- opts:
is_expand: false
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-14.1.x
machine_type_id: g2.4core
L10nScreenshotsTests:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@6.2: {}
- certificate-and-profile-installer@1.10: {}
- script@1.1:
title: Pull in L10n
inputs:
- content: |
#!/usr/bin/env bash
set -e
set -x
# Import only the shipping locales (from shipping_locales.txt) on Release
# builds. Import all locales on Beta and Fennec_Enterprise, except for pull
# requests.
pip3 install --user virtualenv
cd /usr/local/bin
ln -s /Users/vagrant/Library/Python/3.10/bin/virtualenv .
cd -
virtualenv --version
./ios-l10n-scripts/import-locales-firefox.sh --release
- script@1:
inputs:
- content: >-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
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.1:
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
# fastlane update_fastlane
./l10n-screenshots.sh --test-without-building $MOZ_LOCALES
mkdir -p artifacts
for locale in $(echo $MOZ_LOCALES); do
zip -9 -j "$locale.zip" "l10n-screenshots/$locale/$locale/"*
mv "$locale.zip" artifacts/
done
title: Generate screenshots
- deploy-to-bitrise-io@1.10:
inputs:
- deploy_path: artifacts/
envs:
- opts:
is_expand: false
BITRISE_SCHEME: L10nSnapshotTest
description: >-
This Workflow is to run L10n tests for all locales
meta:
bitrise.io:
stack: osx-xcode-14.1.x
machine_type_id: g2.4core
RunUnitTests:
steps:
- script@1.1:
title: Detect number of warnings
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
TEST_LOG_PATH=$BITRISE_XCODEBUILD_TEST_LOG_PATH
COUNT=$(./test-fixtures/generate-metrics.sh $TEST_LOG_PATH unit-test)
envman add --key SHOW_WARNING_COUNT --value "$COUNT"
envman add --key SHOW_WARNING_IN_SLACK --value Show_Warnings
STR=$COUNT
SUB='greater'
if [[ "$STR" == *"$SUB"* ]]; then
echo "Failure, the number of warnings increased"
exit 1
fi
is_always_run: true
- slack@3.1:
run_if: '{{getenv "NEW_RC_VERSION" | eq "New_RC_Version"}}'
inputs:
- channel: "#firefox-ios"
- text: Build status using latest Rust-Component
- webhook_url: $WEBHOOK_SLACK_TOKEN_2
description: >-
This Workflow is to run tests (currently SmokeTest) when there is a merge
in master
meta:
bitrise.io:
stack: osx-xcode-14.1.x
machine_type_id: g2.8core
before_run:
- 1_git_clone_and_post_clone
- 2_certificate_and_profile
- 3_provisioning_and_npm_installation
- 4_A_xcode_build_and_test_Fennec
after_run:
- RunSmokeXCUITests
- Detect_warnings
- 5_deploy_and_slack
RunSmokeXCUITests:
steps:
- cache-pull@2.1:
is_always_run: true
- xcode-test@4.5:
inputs:
- scheme: Fennec_Enterprise_XCUITests
- xcodebuild_test_options: "-testPlan SmokeXCUITests"
- simulator_device: iPhone 11
is_always_run: true
- deploy-to-bitrise-io@1.9: {}
- cache-push@2.2: {}
description: This Workflow is to run tests UI TESTS
meta:
bitrise.io:
stack: osx-xcode-14.1.x
machine_type_id: g2.8core
SPM_Deploy_Prod_Beta:
steps:
- activate-ssh-key@4.1:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@6.2: {}
- certificate-and-profile-installer@1.10: {}
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -x
cd Client.xcodeproj
sed -i '' 's/CODE_SIGN_IDENTITY = "iPhone Developer"/CODE_SIGN_IDENTITY = "iPhone Distribution"/' project.pbxproj
cd -
title: Set xcodeproj code_sign_identity
- script@1.1:
title: NPM, ContentBlockerGen
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
./content_blocker_update.sh
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_RELEASE_VERSION"
- plist_path: Client/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_RELEASE_VERSION"
- plist_path: Extensions/NotificationService/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_RELEASE_VERSION"
- plist_path: Extensions/ShareTo/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_RELEASE_VERSION"
- plist_path: Extensions/Today/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_RELEASE_VERSION"
- plist_path: WidgetKit/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_RELEASE_VERSION"
- plist_path: CredentialProvider/Info.plist
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
# write your script here
echo "Setting Nimbus variables"
/usr/libexec/PlistBuddy -c "Set NimbusURL $NIMBUS_URL" "Client/Info.plist"
title: Nimbus Variable Setup
- xcode-archive@4.0:
inputs:
- compile_bitcode: 'no'
- upload_bitcode: 'no'
- team_id: 43AQ936H96
- export_method: app-store
- output_tool: xcodebuild
- distribution_method: app-store
- export_development_team: 43AQ936H96
- configuration: "$BITRISE_SCHEME"
- deploy-to-bitrise-io@2.0: {}
- deploy-to-itunesconnect-application-loader@1.3:
inputs:
- app_password: "$APPLE_ACCOUNT_PW"
- password: "$APPLE_ACCOUNT_PW"
- connection: 'off'
- itunescon_user: "$APPLE_ACCOUNT_ID"
- script@1:
title: Upload Firefox Prod Beta Symbols
inputs:
- content: |-
#!/usr/bin/env bash
set -x
ThirdParty/sentry-cli --auth-token "$SENTRY_AUTH_TOKEN" upload-dif \
--org mozilla --project firefox-ios "$BITRISE_DSYM_DIR_PATH"
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -x
# sleep 9999
is_always_run: true
title: debug-sleep
- slack@3.2:
inputs:
- webhook_url: "$WEBHOOK_SLACK_TOKEN"
- xcode-archive@4.0:
inputs:
- compile_bitcode: 'no'
- upload_bitcode: 'no'
- team_id: 43AQ936H96
- export_method: app-store
- output_tool: xcodebuild
- scheme: FirefoxBeta
- export_development_team: 43AQ936H96
- distribution_method: app-store
- configuration: FirefoxBeta
title: 'FirefoxBeta: Xcode Archive & Export for iOS'
- deploy-to-itunesconnect-application-loader@1.3:
inputs:
- app_password: "$APPLE_ACCOUNT_PW"
- connection: 'off'
- itunescon_user: "$APPLE_ACCOUNT_ID"
title: 'FirefoxBeta: Deploy to iTunes Connect'
envs:
- opts:
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-14.1.x
machine_type_id: g2.8core
SPM_Deploy_Beta_Only:
steps:
- activate-ssh-key@4.1:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@6.2: {}
- certificate-and-profile-installer@1.10: {}
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -x
cd Client.xcodeproj
sed -i '' 's/CODE_SIGN_IDENTITY = "iPhone Developer"/CODE_SIGN_IDENTITY = "iPhone Distribution"/' project.pbxproj
cd -
title: Set xcodeproj code_sign_identity
- script@1.1:
title: NPM, ContentBlockerGen
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
./content_blocker_update.sh
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_BETA_VERSION"
- plist_path: Client/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_BETA_VERSION"
- plist_path: Extensions/NotificationService/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_BETA_VERSION"
- plist_path: Extensions/ShareTo/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_BETA_VERSION"
- plist_path: Extensions/Today/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_BETA_VERSION"
- plist_path: WidgetKit/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_BETA_VERSION"
- plist_path: CredentialProvider/Info.plist
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
# write your script here
echo "Setting Nimbus variables"
/usr/libexec/PlistBuddy -c "Set NimbusURL $NIMBUS_URL" "Client/Info.plist"
title: Nimbus Variable Setup
- xcode-archive@4.0:
inputs:
- compile_bitcode: 'no'
- upload_bitcode: 'no'
- team_id: 43AQ936H96
- export_method: app-store
- output_tool: xcodebuild
- scheme: FirefoxBeta
- export_development_team: 43AQ936H96
- distribution_method: app-store
- configuration: FirefoxBeta
title: 'FirefoxBeta: Xcode Archive & Export for iOS'
- deploy-to-itunesconnect-application-loader@1.3:
inputs:
- app_password: "$APPLE_ACCOUNT_PW"
- connection: 'off'
- itunescon_user: "$APPLE_ACCOUNT_ID"
title: 'FirefoxBeta: Xcode Archive & Export for iOS'
- script@1:
title: Upload Firefox Beta Symbols
inputs:
- content: |-
#!/usr/bin/env bash
set -x
ThirdParty/sentry-cli --auth-token "$SENTRY_AUTH_TOKEN" upload-dif \
--org mozilla --project firefox-ios "$BITRISE_DSYM_DIR_PATH"
envs:
- opts:
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-14.1.x
machine_type_id: g2.8core
SPM_Nightly_Beta_Only:
steps:
- activate-ssh-key@4.1:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@6.2: {}
- certificate-and-profile-installer@1.10: {}
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
set -e
set -x
cd Client.xcodeproj
sed -i '' 's/CODE_SIGN_IDENTITY = "iPhone Developer"/CODE_SIGN_IDENTITY = "iPhone Distribution"/' project.pbxproj
cd -
title: Set xcodeproj code_sign_identity
- script@1.1:
title: NPM, ContentBlockerGen
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
./content_blocker_update.sh
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_NIGHTLY_VERSION"
- plist_path: Client/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_NIGHTLY_VERSION"
- plist_path: Extensions/NotificationService/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_NIGHTLY_VERSION"
- plist_path: Extensions/ShareTo/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_NIGHTLY_VERSION"
- plist_path: Extensions/Today/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_NIGHTLY_VERSION"
- plist_path: WidgetKit/Info.plist
- set-xcode-build-number@1:
inputs:
- build_short_version_string: "$BITRISE_NIGHTLY_VERSION"
- plist_path: CredentialProvider/Info.plist
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
# write your script here
echo "Setting Nimbus variables"
/usr/libexec/PlistBuddy -c "Set NimbusURL $NIMBUS_URL" "Client/Info.plist"
title: Nimbus Variable Setup
- xcode-archive@4.0:
inputs:
- compile_bitcode: 'no'
- upload_bitcode: 'no'
- team_id: 43AQ936H96
- export_method: app-store
- output_tool: xcodebuild
- scheme: FirefoxBeta
- export_development_team: 43AQ936H96
- distribution_method: app-store
- configuration: FirefoxBeta
title: 'FirefoxBeta: Xcode Archive & Export for iOS'
- deploy-to-bitrise-io@2: {}
- deploy-to-itunesconnect-application-loader@1.3:
inputs:
- app_password: "$APPLE_ACCOUNT_PW"
- connection: 'off'
- itunescon_user: "$APPLE_ACCOUNT_ID"
title: 'Nightly FirefoxBeta: Xcode Archive & Export for iOS'
- script@1:
title: Upload NightlyBeta Symbols
inputs:
- content: |-
#!/usr/bin/env bash
set -x
ThirdParty/sentry-cli --auth-token "$SENTRY_AUTH_TOKEN" upload-dif \
--org mozilla --project firefox-ios "$BITRISE_DSYM_DIR_PATH"
envs:
- opts:
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-14.1.x
machine_type_id: g2.8core
app:
envs:
- opts:
is_expand: false
BITRISE_PROJECT_PATH: Client.xcodeproj
- opts:
is_expand: false
BITRISE_EXPORT_METHOD: development
- opts:
is_expand: false
BITRISE_NIGHTLY_VERSION: '9000'
- opts:
is_expand: false
BITRISE_RELEASE_VERSION: '110.0'
- opts:
is_expand: false
BITRISE_BETA_VERSION: '110.0'
meta:
bitrise.io:
stack: osx-xcode-14.1.x
machine_type_id: g2.4core
trigger_map:
- push_branch: main
pipeline: pipeline_multiple_shards
- push_branch: epic-branch/*
pipeline: pipeline_multiple_shards
- push_branch: release/v110.0
workflow: SPM_Deploy_Prod_Beta
- pull_request_target_branch: main
pipeline: pipeline_multiple_shards
- pull_request_target_branch: epic-branch/*
pipeline: pipeline_multiple_shards