From ccdf2a9e4686875eface26cfa92d02e8fe1076ec Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 8 Mar 2023 18:07:32 -0330 Subject: [PATCH] Add "preview build" support to Bitrise (#5807) The Bitrise workflows for QA builds and e2e tests now support using "preview builds" from the core monorepo [1]. The release builds still won't work with preview builds, which should ensure we don't accidentally include a preview build in a release. [1]: https://github.com/MetaMask/core/blob/main/docs/contributing.md#using-packages-in-other-projects-during-developmenttesting --- bitrise.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 6e94fd0689e..d0e668215b7 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -28,6 +28,18 @@ workflows: inputs: - command: audit:ci title: Audit Dependencies + code_setup_dev: + before_run: + - setup + steps: + - script@1: + title: Generate `.npmrc` file for preview builds + inputs: + - content: | + #!/bin/bash + printf '%s\n\n%s' '@metamask:registry=https://npm.pkg.github.com' "//npm.pkg.github.com/:_authToken=${PACKAGE_READ_TOKEN}" > .npmrc + after_run: + - code_setup # Notifications utility workflows # Provides values for commit or branch message and path depending on commit env setup initialised or not @@ -141,7 +153,7 @@ workflows: title: Detox - Install CLI android_e2e_test: before_run: - - code_setup + - code_setup_dev - e2e_setup after_run: - _e2e_notify_on_slack @@ -168,7 +180,7 @@ workflows: is_always_run: false ios_e2e_test: before_run: - - code_setup + - code_setup_dev - e2e_setup after_run: - _e2e_notify_on_slack @@ -257,7 +269,7 @@ workflows: is_always_run: false create_qa_builds: before_run: - - code_setup + - code_setup_dev steps: - build-router-start@0: inputs: @@ -331,7 +343,7 @@ workflows: title: Bitrise Deploy Sourcemaps build_android_qa: before_run: - - code_setup + - code_setup_dev after_run: - _upload_apk_to_browserstack - _build_failure_notify_on_slack @@ -510,7 +522,7 @@ workflows: title: Deploy Source Map build_ios_qa: before_run: - - code_setup + - code_setup_dev after_run: - _build_failure_notify_on_slack steps: