Skip to content

Commit

Permalink
Revert "build(ci): workflow review (#9400)"
Browse files Browse the repository at this point in the history
This reverts commit c6ecf17.
  • Loading branch information
gkartalis authored Oct 12, 2023
1 parent 85732e1 commit 3deaa6f
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 29 deletions.
111 changes: 86 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ commands:
steps:
- restore_cache:
keys:
- v8-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
- v7-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
- run:
name: Bundle install
command: bundle check || bundle install
Expand Down Expand Up @@ -112,6 +112,16 @@ commands:
steps:
- attach_workspace:
at: ../workspace
- run:
name: Clear project dir
command: |
rm -rf /Users/distiller/project
- checkout
- attach_workspace:
at: .
- install-node
- setup-awscli
- setup-env-file
- restore_cache:
keys:
- v9-test-success-{{ checksum "../workspace/.manifests/android_native" }}
Expand All @@ -122,14 +132,6 @@ commands:
then
circleci step halt
fi
- run:
name: Clear project dir
command: |
rm -rf /Users/distiller/project
- checkout
- install-node
- setup-awscli
- setup-env-file
- install-node-modules
- run-relay-compiler
- update-echo
Expand Down Expand Up @@ -219,7 +221,9 @@ jobs:
resource_class: large
steps:
- checkout
- install-node-modules
- node/install-packages:
cache-version: "v2"
pkg-manager: yarn
- run-relay-compiler
- run:
command: yarn jest --ci --forceExit --logHeapUsage --runInBand --reporters=default --reporters=jest-junit --shard=$(expr $CIRCLE_NODE_INDEX + 1)/$CIRCLE_NODE_TOTAL
Expand All @@ -232,6 +236,20 @@ jobs:
- store_test_results:
path: ./reports/junit/

type-check:
executor:
name: node/default
tag: "16.18.0"
resource_class: small
steps:
- checkout
- node/install-packages:
cache-version: "v2"
pkg-manager: yarn
- run-relay-compiler
- run:
command: yarn type-check

update-metaphysics:
executor:
name: node/default
Expand All @@ -254,17 +272,8 @@ jobs:
resource_class: small
steps:
- checkout
- install-node-modules
- run-relay-compiler
- run:
command: yarn type-check
- run:
name: Check Branch and Exit Early if Ignored
command: |
if [[ "$CIRCLE_BRANCH" == "main" || "$CIRCLE_BRANCH" == "beta-ios" || "$CIRCLE_BRANCH" == "beta-android" ]]; then
echo "On ignored branch ($CIRCLE_BRANCH). Exiting early."
circleci-agent step halt
fi
- node/install-packages:
pkg-manager: yarn
- run:
name: Danger
command: yarn danger ci --verbose
Expand Down Expand Up @@ -417,6 +426,19 @@ jobs:
name: Deploy if beta - play store and firebase
command: ./scripts/deploy-if-beta-branch-android BOTH

release-ios-app:
environment:
BUNDLE_PATH: .vendor # path to install gems and use for caching
macos:
xcode: 14.3.1
resource_class: macos.m1.medium.gen1
steps:
- checkout
- install-gems
- run:
name: Release app version
command: ./scripts/release-ios-app-branch

workflows:
version: 2
nightly:
Expand All @@ -441,26 +463,61 @@ workflows:
jobs:
- check-flags

release-ios-app-workflow:
jobs:
- release-ios-app:
filters:
branches:
only:
- release-ios-app

test-build-deploy:
jobs:
- detect-secrets:
filters:
branches:
ignore:
- main
- release
- staging

- type-check:
filters:
branches:
ignore:
- app_store_submission
- play_store_submission

- check-code:
context: danger-github-oss
filters:
branches:
ignore:
- main
- beta-ios
- beta-android
- app_store_submission
- play_store_submission

- check-and-deploy:
filters:
branches:
only:
- main

- test-js
- test-js:
filters:
branches:
ignore:
- app_store_submission
- play_store_submission

- build-test-js
- build-test-js:
filters:
branches:
ignore:
- app_store_submission
- play_store_submission

- horizon/block:
context: horizon
Expand All @@ -475,21 +532,25 @@ workflows:
filters:
branches:
ignore:
- app_store_submission
- play_store_submission
- beta-android
requires:
- test-js
- check-code
- type-check
- build-test-js
- horizon/block

- build-test-app-android:
filters:
branches:
ignore:
- app_store_submission
- play_store_submission
- beta-ios
requires:
- test-js
- check-code
- type-check
- build-test-js
- horizon/block

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/release-ios-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# We use a github action in order for us to bypass our CircleCI
# configruation of only triggerening builds on main and PRs
name: ZZ-Cross-CI Trigger release iOS app to users 🚨

on:
push:
branches: [release-ios-app]

permissions:
contents: read

jobs:
build:
permissions:
contents: none
runs-on: ubuntu-latest
steps:
- name: 🚨 Trigger release ios app to users
run: |
curl \
-X POST \
--header "Content-Type: application/json" \
-d '{"branch": "release-ios-app"}' \
https://circleci.com/api/v1.1/project/github/artsy/eigen/build?circle-token=${{ secrets.CircleToken }}
18 changes: 14 additions & 4 deletions docs/deploy_to_app_store.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,25 @@ Eigen's beta pre-submission checklist has [moved into Notion 🔐](https://www.n
## Preparing to Ship a Final Version

1. Start a branch from main.
2. Update [`release_notes.txt`](https://github.com/artsy/eigen/blob/main/fastlane/metadata/en-US/release_notes.txt) with the **user-facing** release notes for this version.
1. Update [`release_notes.txt`](https://github.com/artsy/eigen/blob/main/fastlane/metadata/en-US/release_notes.txt) with the **user-facing** release notes for this version.
- See [previous examples](https://github.com/artsy/eigen/commits/main/fastlane/metadata/en-US/release_notes.txt) of release notes.
- Share the notes with the #practice-mobile channel in Slack for feedback.
- Commit, push the changes, make a PR from your branch to main.
3. Run `./scripts/promote-beta-to-submission-ios`. This will submit the **most recent beta** for App Store review
1. Run `./scripts/promote-beta-to-submission-ios`. This will submit the **most recent beta** for App Store review

Our App Store releases are set to release automatically once Apple approves the app. You can check the status of the build in app store connect, a message will also be sent to mobile [at] artsymail [dot] com once the app is approved.
### What about IDFA?

4. Make sure to let the team know over at [#dev 🔐](https://artsy.slack.com/archives/C02BC3HEJ)!. Don't forget to thank everyone who contributed 💜
We _do_ use the IDFA to attribute app installations to previously service advertisements. This should be handled for you.

## Release to App Store

Our App Store releases are done manually, instead of automatically once Apple approves the app. Don't release unless you are available over the next few hours to monitor Sentry for errors.

> _When the app is approved for release, a slack message is sent to notify the #practice-mobile channel and an email from Apple Store Connect is sent to mobile [at] artsymail [dot] com_
1. Run `./scripts/release-ios-app`
2. Monitor [Sentry 🔐](https://sentry.io/artsynet/eigen/) in the #practice-mobile channel on Slack for any errors (all production errors are sent to Slack when they first occur).
3. Make sure to let the team know over at [#dev 🔐](https://artsy.slack.com/archives/C02BC3HEJ)!. Don't forget to thank everyone who contributed 💜

## Prepare for the Next Release

Expand Down
7 changes: 7 additions & 0 deletions scripts/release-ios-app
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euxo pipefail


source ./scripts/source-for-bash-env

git push origin "${LOCAL_BRANCH}:release-ios-app" -f --no-verify
11 changes: 11 additions & 0 deletions scripts/release-ios-app-branch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euxo pipefail


source ./scripts/source-for-bash-env

if [ "${LOCAL_BRANCH}" == "release-ios-app" ]; then
./scripts/setup-fastlane-env
bundle exec fastlane update_plugins
bundle exec fastlane release_ios_app
fi

0 comments on commit 3deaa6f

Please sign in to comment.