Skip to content

Commit

Permalink
Feature/bitrise circle ci hybrid (#2713)
Browse files Browse the repository at this point in the history
* updated yml segmented code cov

* updated yml triggers

* updated yml triggers

* updated yml triggers

* updated yml codecov

* switched to ci

* switched to ci

* test deploy

* test deploy ios

* format

* imported env variables

* added env variables

* added env variables

* reconfigured build triggers

* reconfigured build triggers

* reconfigured build triggers

* removed fastlane from build scripts and added commnets to bitrise scripts

* testing android artifact upload

* commented out code that is not needed

* added android deploy paths

* test

* Revert "test"

This reverts commit 77ef282.

* updated android deploy paths

* bitrise-yml-bump-version

* bump_version_minor

* workflow

* PROJECT_LOCATION

* bump_version_minor

* new_version_name

* space

* Revert "space"

This reverts commit e0eb5ad.

* 2.1.1

* new_version_name

* torevert

* Revert "torevert"

This reverts commit a315582.

* d

* revert

* env

* ios

* test android build

* bump_version_minor

* temporarily creating debug android build for testing

* VERSION_NAME

* e2e testing

* modified build script to generate debug app for testing

* added pod file install into code prep

* moved pod install to e2e workflow

* update e2e

* updated e2e

* updated e2e script

* added back envs

* updated e2e

* updated e2e

* updated code_setup & e2e

* updated detox script

* added test deploy

* commented out steps for testing

* updated build announce to use bitrise script

* added bitrise announcement script

* refactored bitrise scripts to reflect the notion workflows

* added new yarn step to audit dependencies

* removing scripts and using yarn e2e test

* moved the trigger

* updated yarn audit command

* updated e2e

* updated e2e

* updated build scripts to generate release and added dependency for android test release

* test-android-build

* generic-file-storage

* file-downloader

* Revert "file-downloader"

This reverts commit db69ef5.

* Download keystore

* moved keystore download up in the workflow

* updated keystore pull script

* updated keystore pull script

* added file downloader

* added file downloader

* uploaded keystore file android test

* updated android release

* updated release build to pull keystore from bitrise

* update android bitrise deploy

* added android e2e workflow and updated release signing config

* commented out e2e

* uncommented e2e setup

* uncommented e2e

* updated file format

* uncommented e2e

* comment e2e

* uncommented e2e

* formatting bitrise file

* updated build scripts to use release

* swaped password for release

* test ios release

* updated yarn steps

* update slack bot script

* added group test release

* run android test release

* updated announce script

* update triggers and typos

* update to test ios build

* updated build type for pre-release

* ios app generation

* ios app generation

* updated iOS builds

* use bitrise xcode deploy

* update ios release steps

* added deploy to itunes connect

* formatting

* updated node version

* udpated node version

* Bitrise yml bump version (#2535)

* scriptsworking

* scripts

* scripts

* working

* newscript

* works

* pre-merge-hook

* 1.0.0 (#2560)

* dah

* actions?

* branchasinput

* update

* branch

* Release/testing minor (#2563)

* Bitrise yml bump version (#1)

* added new bitrise yml file

* updated unit test yml

* updated yml

* added code coverage

* added code coverage install

* segment out code setup and validation from test cases

* updating yml audit

* updated yml

* updated yml

* updated yml audits

* updated yml audits

* updated yml audits

* updated yml audits

* updated yml install

* updated yml audit

* updated yml audit

* updated yml segmented code_setup

* updated yml segmented code_setup

* updated yml segmented set to not always run

* updated yml segmented code cov

* updated yml triggers

* updated yml triggers

* updated yml triggers

* updated yml codecov

* switched to ci

* switched to ci

* test deploy

* test deploy ios

* format

* imported env variables

* added env variables

* added env variables

* reconfigured build triggers

* reconfigured build triggers

* reconfigured build triggers

* removed fastlane from build scripts and added commnets to bitrise scripts

* testing android artifact upload

* commented out code that is not needed

* added android deploy paths

* test

* Revert "test"

This reverts commit 77ef282.

* updated android deploy paths

* bitrise-yml-bump-version

* bump_version_minor

* workflow

* PROJECT_LOCATION

* bump_version_minor

* new_version_name

* space

* Revert "space"

This reverts commit e0eb5ad.

* 2.1.1

* new_version_name

* torevert

* Revert "torevert"

This reverts commit a315582.

* d

* revert

* env

* ios

* test android build

* bump_version_minor

* temporarily creating debug android build for testing

* VERSION_NAME

* scriptsworking

* scripts

* scripts

* working

* newscript

* works

* pre-merge-hook

* 1.0.0 (#2560)

* dah

* actions?

* branchasinput

* update

* branch

Co-authored-by: sethkfman <seth.kaufman@consensys.net>

* changename (#2)

* Changetorun (#3)

* changename

* run

* release/test-minor (#4)

* rm-condition (#5)

* Filelocation (#6)

* rm-condition

* file

* Checkout step (#7)

* rm-condition

* file

* checkout-step

* Try (#8)

* a

* Revert "a"

This reverts commit 5df3682.

* Logs (#9)

* a

* Revert "a"

This reverts commit 5df3682.

* logs

* Branch (#10)

* a

* Revert "a"

This reverts commit 5df3682.

* logs

* branch

* Var (#11)

* a

* Revert "a"

This reverts commit 5df3682.

* logs

* branch

* correct

* echo (#12)

* echo

* rm

* pull-request (#13)

* Pull request 2 (#14)

* pull-request

* ref

* GITHUB_REF

* parse

* with-branch (#15)

* Origin branch (#16)

* with-branch

* origin-branch

* base_ref (#17)

* push

* rmrnv

* gh

* action

* event_name

* base_ref

* location

* location

* ls

* find

* file

* file

* GITHUB_TOKEN

* persist

* with

* uses

* bitrise

* sed

* commit

* diff

* release/fake-major

* add-and-commit

* with

* author

* path-to-th-repo

* checkout@v1

* v2

* Bump version name

* useref (#18)

* change

* ref

* something (#19)

* Branch 3 (#20)

* something

* onmerge

* fix

* Branch 4 (#21)

* something

* onmerge

* fix

* GITHUB_REF

* GITHUB_CONTEXT

* GITHUB_CONTEXT

* BASE_REF

* HEAD_REF

* nobump

* something (#22)

* s (#23)

* s

* Bump version name

* types (#24)

* create-pr

* something (#25)

* Release/ww patch (#26)

* something

* opened

* Bump version name

* othercommit

* Release/nohead patch (#36)

* ghactions

* something

* fix

* nopush

* head

* pull

* nohead

* nopull

* nohead

* update

* gitpush

* force

* Bump version name

* opened

Co-authored-by: github-actions <github-actions@github.com>

* rmonpush

* Bump version name

* startsWith

* main

* rmstartwith

* line

Co-authored-by: sethkfman <seth.kaufman@consensys.net>
Co-authored-by: github-actions <github-actions@github.com>

* newscript

* release/testbump-patch (#2570)

* space

* branch

* notopenend

* diff

* Bump version name

Co-authored-by: github-actions <github-actions@github.com>

* addbranch

* version

* ifrelease

* add

* lasttest

* ifcontains

* branch

Co-authored-by: sethkfman <seth.kaufman@consensys.net>
Co-authored-by: github-actions <github-actions@github.com>

* iOS build update

* iOS build update

* added android and ios in a single release build

* added android and ios in a single release build

* updated iOS release

* updated iOS release

* updated iOS release

* updated iOS release

* added android to test_release

* test iOS build with export options

* test iOS build with export options

* setup android release build

* fix action condition (#2576)

* updated export options to include provisioning profile and added deploy to bitrise steps to ios

* bump_version

* start_release_builds

* androidthenios

* cachepull

* before_run

* deploy-to-itunesconnect

* onefirsttheother

* iosfirst

* comments

* updated slack announce script

* uncommented deploy and slack announce

* testing full release (#2582)

* testing full release

* Bump version name

Co-authored-by: github-actions <github-actions@github.com>

* update ios deploy step

* removed test comment (#2584)

* removed test comment

* Bump version name

Co-authored-by: github-actions <github-actions@github.com>

* testing android google play staging

* increased versionCode & PROJECT VERSION

* added iOS build

* added test comment (#2585)

* added test comment

* Bump version name

Co-authored-by: github-actions <github-actions@github.com>

* run android only deploy

* run ios only deploy

* run ios only deploy

* run ios only deploy

* Release/testbuild patch (#2589)

* Swaps: BSC Support (#2468)

* Swaps: Add cache thresholds configuration (#2514)

* removed test comments

* Bump version name

Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>

* removed fastlane files and minor tweaks to scripts

* updated e2e tests

* updated e2e tests

* updated yarn steps e2e

* updated android scripts

* updated build scrips and yml

* updated e2e builds

* remove CircleCi yml

* added circleci script back

* added emulator print out command

* updated ios e2e test steps

* removed devices

* added creation of emulator to script

* added creation of emulator to script

* added creation of emulator to script

* added creation of emulator to script

* added creation of emulator to script

* removed starting emulators

* updated emulator name

* avd list

* avd creation

* updated bitrise to tigger for v2.3.0 release build test

* updated bundler version

* updated build script

* updated build script

* updated change log with hide zero balance change (#2623)

* updated version name

* updated android emulator name

* added build comments and verbose logging for tests

* added build comments and refactored test inits

* testing parallel deploys

* added comments

* formatting

* moved code snipets

* modified build triggers

* modified build triggers

* added deploy steps for parallel deploy

* updated triggers

* updated trigger

* updated change log

* stop caching

* update build triggers

* update build triggers

* update audit script

* testing parallel deployment

* testing parallel deployment

* testing parallel deployment

* disable release in circleCI

* testing parallel deployment

* updated deploy directory

* updated deploy step

* deploy apk

* updated changelog (#2648)

* updated deploy scripts

* remove code coverage

* updated provisioning profile name

* updated provisioning profile name

* updated version for test 2.3.1

* updated provisioning profile

* update provisioning profile

* added fastlane and gemfiles back

* disabled circle CI and added back slack bot announcement

* commented all CI related tasks

* revert bitrise specific scripting

* commented out bitrise release triggers

* removed ci commneted code

* reverted script changes

* minor syntax tweaks to scripts

* updated the bitrise version to match package

Co-authored-by: Esteban Mino <efmino@uc.cl>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
  • Loading branch information
4 people committed Jun 2, 2021
1 parent da7f49a commit 6d84285
Show file tree
Hide file tree
Showing 7 changed files with 447 additions and 30 deletions.
28 changes: 0 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,40 +195,12 @@ jobs:
workflows:
full_test:
jobs:
- test-deps:
requires:
- prep-node-deps
- prep-deps:
filters:
branches:
only:
- main
- develop
- prep-node-deps:
filters:
branches:
ignore:
- main
- develop
- lint:
requires:
- prep-node-deps
- test-unit:
requires:
- prep-node-deps
# - test-e2e-ios:
# requires:
# - prep-node-deps
# - test-unit
- all-tests-pass:
requires:
- test-deps
- lint
- test-unit
# - test-e2e-ios
# - upload-coverage:
# requires:
# - test-unit
- publish-pre-release-ios:
requires:
- prep-deps
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/bump-version-name.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Bump version name
on:
# push:
# branches:
# - develop
pull_request:
branches:
- develop
- main
- bitrise_yml_new
types: [opened]
jobs:
bump-version-name:
runs-on: ubuntu-latest
if: "contains(github.head_ref, 'release/')"
steps:
- uses: actions/checkout@v2
- name: Bump script
env:
HEAD_REF: ${{ github.head_ref }}
run: |
./scripts/bump-version.sh "$HEAD_REF"
git diff
git config user.name github-actions
git config user.email github-actions@github.com
git add bitrise.yml
git add package.json
git commit -m "Bump version name"
git push origin HEAD:"$HEAD_REF" --force
312 changes: 312 additions & 0 deletions bitrise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,312 @@
---
format_version: '8'
default_step_lib_source: 'https://github.com/bitrise-io/bitrise-steplib.git'
project_type: react-native
trigger_map:
# - push_branch: 'develop'
# workflow: start_release_builds
# - push_branch: 'main'
# workflow: start_release_builds
- pull_request_source_branch: '*'
workflow: ci_test
workflows:
# Code Setups
setup:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4: {}
code_setup_cache:
before_run:
- setup
steps:
- cache-pull@2: {}
- nvm@1:
inputs:
- node_version: '14'
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- command: install --network-timeout 300000 --frozen-lockfile --network-concurrency 1
title: Yarn Install
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- command: audit:ci
title: Audit Dependencies
- yarn@0:
title: Lint
inputs:
- cache_local_deps: 'yes'
- command: lint
is_always_run: true
- cache-push@2: {}
code_setup:
before_run:
- setup
steps:
- nvm@1:
inputs:
- node_version: '14'
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- command: install --network-timeout 300000 --frozen-lockfile --network-concurrency 1
title: Yarn Install
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- command: audit:ci
title: Audit Dependencies
- yarn@0:
title: Lint
inputs:
- cache_local_deps: 'yes'
- command: lint
is_always_run: true
# CI Steps
ci_test:
before_run:
- code_setup_cache
steps:
- yarn@0:
inputs:
- args: ''
- command: test:unit --silent
title: Unit Test
is_always_run: false
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
echo 'weew - everything passed!'
title: All Tests Passed
is_always_run: false
# E2E Steps
e2e_setup:
steps:
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
curl -sL https://sentry.io/get-cli/
title: Install Test Dependencies (Sentry)
is_always_run: false
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- command: global add detox-cli
title: Install Detox CLI
android_e2e_test:
before_run:
- code_setup
- e2e_setup
steps:
- install-missing-android-tools@2:
inputs:
- gradlew_path: $PROJECT_LOCATION/gradlew
- avd-manager@1:
inputs:
- api_level: '29'
- profile: pixel
- wait-for-android-emulator@1: {}
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- command: test:e2e:android
title: E2E Tests on Android
is_always_run: false
ios_e2e_test:
before_run:
- code_setup_cache
- e2e_setup
steps:
- script:
inputs:
- content: |-
# Add cache directory to environment variable
envman add --key BREW_APPLESIMUTILS --value "$(brew --cellar)/applesimutils"
envman add --key BREW_OPT_APPLESIMUTILS --value "/usr/local/opt/applesimutils"
brew tap wix/brew
title: Set Env Path for caching deps
- cocoapods-install@2:
is_always_run: false
- yarn@0:
inputs:
- cache_local_deps: 'yes'
- command: test:e2e:ios
title: E2E Tests on iOS
is_always_run: false
start_e2e_tests:
steps:
- build-router-start@0:
inputs:
- workflows: |-
android_e2e_test
ios_e2e_test
- wait_for_builds: 'true'
- access_token: $BITRISE_START_BUILD_ACCESS_TOKEN
- build-router-wait@0:
inputs:
- abort_on_fail: 'yes'
- access_token: $BITRISE_START_BUILD_ACCESS_TOKEN
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash echo 'weew - everything passed!'
title: All Tests Passed
is_always_run: false
# Parallel Build & Deploy Steps
start_release_builds:
steps:
- build-router-start@0:
inputs:
- workflows: |-
android_test_release_step
ios_test_release_step
- wait_for_builds: 'true'
- abort_on_fail: 'yes'
- access_token: $BITRISE_START_BUILD_ACCESS_TOKEN
- build-router-wait@0:
inputs:
- abort_on_fail: 'yes'
- build_artifacts_save_path: $BITRISE_DEPLOY_DIR
- access_token: $BITRISE_START_BUILD_ACCESS_TOKEN
- deploy-to-bitrise-io@1:
inputs:
- deploy_path: $BITRISE_DEPLOY_DIR/app-release.apk
title: Bitrise Deploy APK
- yarn@0:
inputs:
- command: build:announce
title: Accouncing pre-release
is_always_run: false
android_test_release_step:
before_run:
- code_setup
steps:
- change-android-versioncode-and-versionname@1:
inputs:
- new_version_name: $VERSION_NAME
- build_gradle_path: $PROJECT_LOCATION_ANDROID/app/build.gradle
- file-downloader@1:
inputs:
- source: $BITRISEIO_ANDROID_KEYSTORE_URL
- destination: android/keystores/release.keystore
- install-missing-android-tools@2:
inputs:
- gradlew_path: $PROJECT_LOCATION/gradlew
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
jq 'del(.engines)' package.json > new.json && mv new.json package.json
node -v
METAMASK_ENVIRONMENT='production' yarn build:android:pre-release:bundle
title: Build Android Pre-Release Bundle
is_always_run: false
- deploy-to-bitrise-io@1:
inputs:
- deploy_path: $PROJECT_LOCATION/app/build/outputs/apk/release/app-release.apk
title: Bitrise Deploy APK
- deploy-to-bitrise-io@1:
inputs:
- deploy_path: $PROJECT_LOCATION/app/build/outputs/apk/release/sha512sums.txt
title: Bitrise Deploy Checksum
- deploy-to-bitrise-io@1:
inputs:
- deploy_path: $PROJECT_LOCATION/app/build/outputs/bundle/release/app-release.aab
title: Bitrise Deploy AAB
- deploy-to-bitrise-io@1:
inputs:
- deploy_path: sourcemaps/android/index.js.map
title: Bitrise Deploy Sourcemaps
- google-play-deploy@3:
inputs:
- app_path: $PROJECT_LOCATION/app/build/outputs/bundle/release/app-release.aab
- track: internal
- service_account_json_key_path: $BITRISEIO_BITRISEIO_SERVICE_ACCOUNT_JSON_KEY_URL_URL
- package_name: $MM_ANDROID_PACKAGE_NAME
envs:
- opts:
is_expand: false
MM_ANDROID_PACKAGE_NAME: io.metamask
ios_test_release_step:
before_run:
- code_setup_cache
steps:
- certificate-and-profile-installer@1: {}
- set-xcode-build-number@1:
inputs:
- build_short_version_string: $VERSION_NAME
- plist_path: $PROJECT_LOCATION_IOS/MetaMask/Info.plist
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
curl -sL https://sentry.io/get-cli/ | bash
title: Install Sentry CLI
is_always_run: false
- cocoapods-install@2: {}
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
jq 'del(.engines)' package.json > new.json && mv new.json package.json
node -v
METAMASK_ENVIRONMENT='production' yarn build:ios:pre-release
title: iOS Sourcemaps & Build
is_always_run: false
- deploy-to-bitrise-io@1:
inputs:
- deploy_path: ios/build/output/MetaMask.ipa
title: Deploy iOS IPA
- deploy-to-bitrise-io@1:
inputs:
- deploy_path: ios/build/MetaMask.xcarchive
title: Deploy Symbols File
- deploy-to-bitrise-io@1:
inputs:
- deploy_path: sourcemaps/ios/index.js.map
title: Deploy Source Map
- deploy-to-itunesconnect-application-loader@1:
inputs:
- ipa_path: ios/build/output/MetaMask.ipa
app:
envs:
- opts:
is_expand: false
PROJECT_LOCATION: android
- opts:
is_expand: false
MODULE: app
- opts:
is_expand: false
VARIANT: ''
- opts:
is_expand: false
BITRISE_PROJECT_PATH: ios/MetaMask.xcworkspace
- opts:
is_expand: false
BITRISE_SCHEME: MetaMask
- opts:
is_expand: false
BITRISE_EXPORT_METHOD: enterprise
- opts:
is_expand: false
PROJECT_LOCATION_ANDROID: android
- opts:
is_expand: false
PROJECT_LOCATION_IOS: ios
- opts:
is_expand: false
VERSION_NAME: 2.4.0
- opts:
is_expand: false
ANDROID_APK_LINK: ''
- opts:
is_expand: false
ANDROID_AAP_LINK: ''
- opts:
is_expand: false
IOS_APP_LINK: ''

0 comments on commit 6d84285

Please sign in to comment.