Skip to content

Commit

Permalink
build(ci): workflow review take 2 (#9429)
Browse files Browse the repository at this point in the history
* Revert "Revert: "build(ci): workflow review" (#9414)"

This reverts commit b2d1c70.

* remove require check for faster testing

* generate checksums in android prep

* try generating first

* remove workspace attach for now, move checkout up

* restore workspace commands

* require build-test-js to check cache

* don't quit early for now

* try clearing out the project

* restore other required jobs

* quit early again
  • Loading branch information
brainbicycle authored Oct 17, 2023
1 parent adfa7c3 commit 03a7daa
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 146 deletions.
115 changes: 25 additions & 90 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:
- v7-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
- v8-gems-{{ checksum "Gemfile.lock" }}-{{ arch }}
- run:
name: Bundle install
command: bundle check || bundle install
Expand Down Expand Up @@ -112,16 +112,6 @@ 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 @@ -132,6 +122,14 @@ commands:
then
circleci step halt
fi
- run:
name: Clear project dir
command: |
rm -rf /home/circleci/project/*
- checkout
- install-node
- setup-awscli
- setup-env-file
- install-node-modules
- run-relay-compiler
- update-echo
Expand Down Expand Up @@ -221,9 +219,7 @@ jobs:
resource_class: large
steps:
- checkout
- node/install-packages:
cache-version: "v2"
pkg-manager: yarn
- install-node-modules
- 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 @@ -236,20 +232,6 @@ 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 @@ -272,8 +254,17 @@ jobs:
resource_class: small
steps:
- checkout
- node/install-packages:
pkg-manager: yarn
- 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
- run:
name: Danger
command: yarn danger ci --verbose
Expand Down Expand Up @@ -358,10 +349,6 @@ jobs:
then
circleci step halt
fi
- run:
name: Clear project dir
command: |
rm -rf /Users/distiller/project
- checkout
- attach_workspace:
at: .
Expand Down Expand Up @@ -426,19 +413,6 @@ 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 @@ -463,61 +437,26 @@ 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:
filters:
branches:
ignore:
- app_store_submission
- play_store_submission
- test-js

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

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

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

Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/release-ios-app.yml

This file was deleted.

18 changes: 4 additions & 14 deletions docs/deploy_to_app_store.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,15 @@ 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.
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.
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.
- 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.
1. Run `./scripts/promote-beta-to-submission-ios`. This will submit the **most recent beta** for App Store review
3. Run `./scripts/promote-beta-to-submission-ios`. This will submit the **most recent beta** for App Store review

### What about IDFA?
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.

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 💜
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 💜

## Prepare for the Next Release

Expand Down
7 changes: 0 additions & 7 deletions scripts/release-ios-app

This file was deleted.

11 changes: 0 additions & 11 deletions scripts/release-ios-app-branch

This file was deleted.

0 comments on commit 03a7daa

Please sign in to comment.