Compare commits

...
140 Commits
Author SHA1 Message Date
cruzach 0918d8299e Release 0.14.11 2020-05-04 15:28:22 -04:00
cruzach 3543acfb26 [ios] Update sdk-37 shell app for 2.15.5 release 2020-05-04 14:49:41 -04:00
Wojciech Kozyra 42b6ff634c Release 0.14.10 2020-05-01 17:54:45 +02:00
Wojciech Kozyra fcd42b272f Update CHANGELOG 2020-05-01 17:54:09 +02:00
Wojciech Kozyra ecaef3a91d enable lean builds (#217) 2020-05-01 17:51:19 +02:00
Stanisław Chmiela 413e6a564d Cut 0.14.9 in CHANGELOG 2020-04-21 11:13:40 +02:00
Stanisław Chmiela ac27332151 Release 0.14.9 2020-04-21 11:12:24 +02:00
Stanisław Chmiela 72744f58ec [android] Build only the app artifact and not all available libraries (#214)
### Motivation and Context

I have noticed that not only the `app` project is being built on Turtle, but all the projects. (cross-posting from https://github.com/expo/expo-cli/pull/1937)

### Description

I've scoped the Gradle command to only build/assemble the `:app` project. It should be safe to do for all SDKs, since on all SDKs the app project was called `app`.

Published an alpha version of XDL to NPM, upgraded Turtle to it, deployed to staging and ran the build. It was over a minute faster than without this change ([new](https://staging.expo.io/dashboard/sjchmiela/builds/5c386cef-e808-49d3-91d8-9ce42af77c36) vs [old](https://staging.expo.io/dashboard/sjchmiela/builds/3d36340e-6ae1-4476-91cb-07d81f1edd1e)). (cross-posting from https://github.com/expo/expo-cli/pull/1937)
2020-04-21 11:11:52 +02:00
Stanisław Chmiela 96af4f753d Cut 0.14.8 in CHANGELOG 2020-04-20 16:48:54 +02:00
Stanisław Chmiela 4059c6f354 Release 0.14.8 2020-04-20 16:47:22 +02:00
Stanisław Chmiela b48f89054b Update XDL to remove check-dynamic-macros call (#212)
### Motivation and Context

See https://github.com/expo/expo-cli/pull/1933 and https://github.com/expo/expo/pull/7919.

### Description

Updates XDL so it includes change introduced in https://github.com/expo/expo-cli/pull/1933.
2020-04-20 16:46:35 +02:00
Stanisław Chmiela 7361f4af52 [changelog] Update changelog with 0.14.7 2020-04-20 12:40:16 +02:00
Stanisław Chmiela 41b48f0c66 Release 0.14.7 2020-04-20 12:39:17 +02:00
Stanisław Chmiela 56b3011d25 Remove secrets from SDK37 shell app, fix google-services.json handling (#209)
<!-- Thanks for contributing to _turtle_! Before you submit your pull request, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x]) -->

### Checklist
- [x] I've read the [Contribution Guidelines] (https://github.com/expo/turtle/blob/master/CONTRIBUTING.md).
- [x] I've updated the [CHANGELOG](https://github.com/expo/turtle/blob/master/CHANGELOG.md) if necessary.
- [x] I've ensured the unit and smoke tests are still passing - either by running `yarn test:unit` and `yarn test:smoke:[ios|android]` or by checking the appropriate CircleCI builds' statuses.
- [x] **I've manually tested whether the changes I made work as expected.**

### Motivation and Context

- `google-services.json` was being handled unintuitively, fixed with https://github.com/expo/expo-cli/pull/1897
- Expo Client's secrets were leaking in shell apps, fixed with https://github.com/expo/expo/pull/7768
- When deployed, fixes https://github.com/expo/expo/issues/7727.

### Description

XDL was modifying `google-services.json`, removing valid keys if the user doesn't provide the same, removed key in _some other place_ (see https://github.com/expo/expo/issues/7727#issuecomment-611544439). Fixed the change in XDL, upgraded to the fixed version here. Also removed secrets from the shell app.
2020-04-20 12:38:27 +02:00
Stanisław Chmiela ef6f9e3c5d Install only production dependencies in shell apps (#211)
<!-- Thanks for contributing to _turtle_! Before you submit your pull request, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x]) -->

### Checklist
- [x] I've read the [Contribution Guidelines](https://github.com/expo/turtle/blob/master/CONTRIBUTING.md).
- [x] I've updated the [CHANGELOG](https://github.com/expo/turtle/blob/master/CHANGELOG.md) if necessary.
- [x] I've ensured the unit and smoke tests are still passing - either by running `yarn test:unit` and `yarn test:smoke:[ios|android]` or by checking the appropriate CircleCI builds' statuses.
- [x] **I've manually tested whether the changes I made work as expected.**

### Motivation and Context

The build process doesn't use any of the `devDependencies` of shell apps and installing them makes the process slower and using more memory.

### Description

Added the `--production` flag to dependencies installer happening inside shell apps so it installs only the real dependencies of the project. This omits dependencies like:
- `babel-core`, `prettier`, `eslint` — we won't transpile, analyze, prettify JS when building the project,
- `expo-cli` — we could use `expo-cli` when building the project, but we don't (`expotools` are used and they are installed in the shell app)
- `expo-yarn-workspaces` — the `--ignore-scripts` removes the need for `expo-yarn-workspaces`

### Test plan

I have tested these changes as part of https://github.com/expo/turtle/pull/209. I have built two apps on SDK37 and both were built successfully.
2020-04-20 10:33:49 +02:00
Stanisław Chmiela 0302a5f71b Revert "Install only production dependencies in shell apps when setting up CLI too"
This reverts commit abb604b3b5.
2020-04-20 10:26:16 +02:00
Stanisław Chmiela abb604b3b5 Install only production dependencies in shell apps when setting up CLI too 2020-04-20 09:41:27 +02:00
Wojciech Kozyra f87dcc6972 add --ignore-scripts to yarn install in shellapp 2020-04-09 16:37:56 +02:00
Dominik Sokal fb27531805 Release 0.14.6 2020-04-09 15:14:53 +02:00
Dominik Sokal b307e0ed7f update CHANGELOG 2020-04-09 15:13:56 +02:00
Wojciech Kozyra 9bfa7c5674 improve deployment speed for android workers (#205)
improve deployment speed for android workers
2020-04-09 13:43:45 +02:00
Dominik Sokal 0fcade4a1f include turtle mode in in-progress message (#206)
* send turtle mode in in-progress message

* update smoke test recordings
2020-04-09 10:20:56 +02:00
Dominik Sokal df4b38711a upgrade @expo/xdl to 57.8.17 to fix downloading assets smaller than 10 bytes (fixes expo/expo#7701) 2020-04-08 15:48:19 +02:00
dependabot[bot] a2b5aa2934 Bump acorn from 6.1.0 to 6.4.1 (#202)
Bumps [acorn](https://github.com/acornjs/acorn) from 6.1.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.1.0...6.4.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-04-08 10:13:07 +02:00
Dominik Sokal 556e0758e7 don't use nix for ios smoke tests 2020-04-07 10:22:28 +02:00
Dominik Sokal 762c6f0538 Release 0.14.5 2020-04-06 14:27:36 +02:00
Dominik Sokal f549695e07 [turtle-cli] make the @expo/config error more meaningful 2020-04-06 14:27:10 +02:00
Dominik Sokal 1e8868e190 Release 0.14.4 2020-04-06 13:25:00 +02:00
Dominik Sokal 93df019bbc update CHANGELOG 2020-04-06 13:24:20 +02:00
Dominik Sokal 5541daa6ec [turtle-cli] insatll @expo/config and use it for determining sdk version 2020-04-06 13:21:29 +02:00
Dominik Sokal 22d78bf6fc [circleci] update cache key for shell apps 2020-04-06 12:26:03 +02:00
Dominik Sokal 4c724289d7 install node deps in android shell app when running smoke tests 2020-04-06 12:25:46 +02:00
Dominik Sokal c5a44dfb67 [circleci] run ios smoke test for sdk37 2020-04-06 12:24:44 +02:00
Dominik Sokal 8bbdc55932 [android] update smoke tests recording file 2020-04-06 12:23:36 +02:00
Dominik Sokal 80233c5736 [ios] update smoke test recordings 2020-04-06 11:38:32 +02:00
Dominik Sokal 5a2b8c47f4 Release 0.14.3 2020-04-03 17:13:47 +02:00
Dominik Sokal ab9391d672 update CHANGELOG - change the version to 0.14.3 - I incidentally interrupted the release 2020-04-03 17:13:24 +02:00
Dominik Sokal e95a6f49ff Release 0.14.2 2020-04-03 17:11:15 +02:00
Dominik Sokal d662cd47b6 [android] update sdk37 tarball so it doesn't use jq internally (#201)
* [android] update sdk37 tarball so it doesn't use jq internally

* [android] update sdk37 tarball again

* update CHANGELOG
2020-04-03 17:10:19 +02:00
Eric Samelson ce5de0963b Release 0.14.1 2020-04-01 14:16:42 -07:00
Eric Samelson 8f717c6c2e update CHANGELOG 2020-04-01 14:16:29 -07:00
Eric Samelson 905b55b7a4 [ios] update SDK 37 shell tarball to properly exclude unnecessary unimodules 2020-04-01 12:21:38 -07:00
Eric Samelson 4588281ffa Update CHANGELOG 2020-03-31 14:42:25 -07:00
Eric Samelson bc13f12052 Release 0.14.0 2020-03-31 14:40:15 -07:00
Eric Samelson 63d3e82cd7 [ci] update android tests to use sdk 37 2020-03-31 12:30:21 -07:00
Eric Samelson b2f8fdd342 [ios][android] drop SDK 33 2020-03-30 21:53:42 -07:00
Eric Samelson 4d9b3bdee9 [android][sdk37] add SDK 37 shell tarball (#198) 2020-03-30 21:52:41 -07:00
Bartłomiej Bukowski 15c165be26 [ios][sdk37] Add SDK 37 shell app tarball (#194) 2020-03-30 21:51:32 -07:00
Dominik Sokal f63e34ace3 Upgrade node to v12 / Drop node v8 support / Drop SDK 31 and 32 (#186) 2020-03-23 16:17:18 -07:00
dependabot[bot] e4ec82d1db Bump acorn from 5.7.3 to 5.7.4 (#195)
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-03-18 15:35:29 +01:00
Dominik Sokal 941a605591 [turtle-cli] print currently using java version (if other than 8) 2020-03-10 12:26:28 +01:00
Dominik Sokal 8b9ad9846b [turtle-cli] replace / with __ to fix a bug with selecting APK file in Android Studio 2020-03-10 10:46:23 +01:00
Charlie Cruzan d488177daa Update CHANGELOG.md 2020-03-09 14:47:59 -04:00
cruzach 1ef3564adf Release 0.13.10 2020-03-09 14:44:58 -04:00
Dominik Sokal 1e29177bd0 preinstall gradle 4.10.2 and 5.6.3 (#189) 2020-03-09 13:56:02 +01:00
cruzach aa1605a5db [ios][expo-ads-admob][expo-ads-facebook] Remove UIWebView refs 2020-03-08 11:18:27 -04:00
Dominik Sokal 2f628efda3 Upgrade NDK to 17c (#188)
* upgrade ndk

* fix Dockerfile

* update CHANGELOG
2020-03-06 12:06:52 +01:00
Dominik Sokal 7f95b533ad [turtle-cli] verify if --public-url is a https url 2020-03-05 12:44:54 +01:00
Dominik Sokal 478d9ebe2b Update CHANGELOG.md 2020-03-05 09:51:04 +01:00
cruzach 0d1366b180 [ios] remove UIWebView 2020-03-03 08:25:21 -08:00
Dominik Sokal 8615f2eb9b [turtle-cli] fix platform for logs when using shortcut commands 2020-03-03 11:06:43 +01:00
Dominik Sokal a3b7867f10 volta: pin [email protected] 2020-03-03 10:53:12 +01:00
Dominik Sokal 656c53dde6 add .history to .gitignore 2020-03-02 10:32:57 +01:00
Eric Samelson e1fed149be update CHANGELOG 2020-02-13 12:27:46 -08:00
Eric Samelson 752b767800 Release 0.13.9 2020-02-13 12:26:14 -08:00
Eric Samelson 4b2ff4fced [ios] fix Notifications.getDevicePushTokenAsync occasional errors 2020-02-13 12:04:49 -08:00
Dominik Sokal a6501db230 install jq on android builder (#178) 2020-02-04 12:53:33 +01:00
cruzach 73e249854a Update Changelog 2020-01-27 18:42:10 -05:00
cruzach 1fb5d448fb Release 0.13.8 2020-01-27 18:22:09 -05:00
cruzach f1e1ef782b [android] prevent apps from crashing on startup 2020-01-27 15:09:30 -05:00
cruzach 81c905ed95 [android] add MapsPackage handling for mapview 2020-01-27 11:21:21 -05:00
Dominik Sokal ecdc8486fe Release 0.13.7 2020-01-17 12:22:50 +01:00
Quinlan Jung 6adaaf5dd1 bump traveling-fastlane to 1.11.4 (#172)
* bump traveling-fastlane to 1.11.4

* its not 2029 yet
2020-01-17 12:10:18 +01:00
Dominik Sokal 57c7dbfb43 fix ios smoke tests (#173)
* fix ios smoke tests

* download sdk35 instead of sdk32
2020-01-17 12:09:27 +01:00
dependabot[bot] cee42b1d6c Bump handlebars from 4.1.0 to 4.5.3 (#171)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.0 to 4.5.3.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.0...v4.5.3)

Signed-off-by: dependabot[bot] <[email protected]>
2020-01-02 10:20:48 +01:00
Tomasz Sapeta 69905bd886 Release 0.13.6 2019-12-17 20:30:04 +01:00
Tomasz Sapeta 37a8cff615 Update changelog 2019-12-17 20:29:36 +01:00
Wojciech Kozyra c8992aa2f4 Release 0.13.5 2019-12-17 16:28:00 +01:00
Tomasz Sapeta 38e05bc20a Add missing RCTAssetsLibraryRequestHandler to iOS tarball for SDK36 (#170)
### Motivation and Context

Fixes https://github.com/expo/expo/issues/6524

### Description

Updating iOS shell tarball for SDK36.
2019-12-17 16:25:22 +01:00
Dominik Sokal 4a8e14fa8b Release 0.13.4 2019-12-13 10:15:37 +01:00
Dominik Sokal 77c7fce666 upgrade @expo/xdl to 57.4.0 2019-12-13 10:10:29 +01:00
Eric Samelson 7f6faecbd1 Release 0.13.3 2019-12-12 13:47:48 -08:00
Eric Samelson 718e3e9ab6 update CHANGELOG 2019-12-12 13:45:57 -08:00
Eric Samelson 2a120fa22c [ios] remove private API usage from SDK 36 tarball 2019-12-12 13:45:14 -08:00
Eric Samelson 1b6e482be5 Release 0.13.2 2019-12-10 21:47:03 -08:00
Eric Samelson 5072a98b50 update CHANGELOG 2019-12-10 21:46:45 -08:00
Eric Samelson 0584fd20fb [android] fix deps in SDK 36 tarball 2019-12-10 19:05:15 -08:00
Eric Samelson 701d6afcf7 [android] update SDK 36 shell tarball with rootview background color fix 2019-12-10 17:36:30 -08:00
Eric Samelson 87515eae23 bump xdl to 57.3.1 2019-12-10 17:32:51 -08:00
Brent Vatne 27de1abc09 Bump xdl (#167) 2019-12-10 14:18:59 -08:00
Eric Samelson f5fb3ae4b6 Release 0.13.1 2019-12-09 14:51:01 -08:00
Eric Samelson 9a4f97c4ed update CHANGELOG 2019-12-09 14:50:51 -08:00
Eric Samelson 1bbcd8f0cc [android] fix SDK 36 tarball 2019-12-09 14:38:39 -08:00
Eric Samelson 415f0dd2aa Release 0.13.0 2019-12-09 12:37:46 -08:00
Eric Samelson 86766ddfef update CHANGELOG 2019-12-09 12:37:31 -08:00
Eric Samelson e976e86607 [ios][android] add SDK 36 tarballs (#165) 2019-12-09 12:35:16 -08:00
Dominik Sokal 6399d64033 Release 0.12.12 2019-11-22 12:16:00 +01:00
Dominik Sokal 3d8dc3cab8 Fix expo.owner not being used (#163)
* [turtle-cli] use expo.owner if defined

* update CHANGELOG
2019-11-22 12:14:30 +01:00
Quinlan Jung ae1a6e8820 Release 0.12.11 2019-11-20 15:24:08 -08:00
Quinlan Jung 52eb27c7b8 Update CHANGELOG 2019-11-20 15:22:17 -08:00
Quinlan Jung 4b9d90544a bump traveling-fastlane to 1.11.0 2019-11-20 15:21:33 -08:00
Quinlan Jung 7871bb039a Release 0.12.10 2019-11-15 14:59:27 -08:00
Quinlan Jung 507102dfac Update CHANGELOG 2019-11-15 14:56:54 -08:00
Quinlan Jung d6dd722d8b add shellAppSdkVersion param to iosShellAppBuilder (#162) 2019-11-15 14:52:11 -08:00
Dominik Sokal b2aed931b5 Release 0.12.9 2019-11-14 10:26:07 +01:00
Dominik Sokal 4e6ffc1235 update CHANGELOG 2019-11-14 10:24:15 +01:00
Dominik Sokal 811cc433ca add updating turtle and supported sdk versions in www (#161) 2019-11-13 12:43:13 +01:00
Dominik Sokal 52cbd973b3 remove extra empty line 2019-11-04 09:43:06 +01:00
Stanisław Chmiela 397bd15203 Upgrade XDL to support Facebook autoinit-disabling features (#155)
* Upgrade XDL to support Facebook autoinit-disabling features

* Add changelog entry

* To Be Reverted: update SDK35 tarball with temporary Expo-master with required changes

* To Be Reverted: update SDK35 tarball with temporary Expo-master with required changes

* Revert "To Be Reverted: update SDK35 tarball with temporary Expo-master with required changes"

This reverts commit e9ca00faf3.

* Revert "To Be Reverted: update SDK35 tarball with temporary Expo-master with required changes"

This reverts commit beafc10133.
2019-10-30 18:24:25 +01:00
cruzach 1f6f6f7caf update CHANGELOG 2019-10-29 15:35:47 -04:00
cruzach 0e7b0633d5 Release 0.12.8 2019-10-29 15:31:37 -04:00
cruzach 2b890be48e [android] update SDK 35 shell tarball to fix Linking.openUrl 2019-10-29 13:45:14 -04:00
Dominik Sokal fac39ba644 [turtle-cli] enforce java 8 (#156)
* [turtle-cli] enforce java 8

* update CHANGELOG
2019-10-28 11:38:28 +01:00
Eric Samelson a28f407f03 update CHANGELOG 2019-10-25 12:15:01 -07:00
Eric Samelson eee18d2f18 Release 0.12.7 2019-10-25 12:13:22 -07:00
Eric Samelson 6457adba57 [android] update SDK 35 shell tarball to fix GCM crash 2019-10-25 12:13:08 -07:00
Eric Samelson 6ad71bd512 Release 0.12.6 2019-10-25 12:11:48 -07:00
Dominik Sokal 0ee897531f handle invalid build jobs in better way (#152) 2019-10-24 12:43:57 +02:00
cruzach 8c46d1c8bf update CHANGELOG 2019-10-18 19:34:26 -04:00
cruzach d87873637b Release 0.12.5 2019-10-18 19:20:37 -04:00
cruzach d6496996b6 update SDK 35 shell tarball with WebBrowser fix 2019-10-18 15:37:08 -04:00
Eric Samelson 2df39da2e6 Release 0.12.4 2019-10-11 16:08:23 -07:00
Eric Samelson 6925e290cc Update CHANGELOG 2019-10-11 16:08:14 -07:00
Eric Samelson 9e2557b6f4 [android] update SDK 35 shell tarball with OTA update fix 2019-10-11 14:45:51 -07:00
Quinlan Jung d743f8313e Release 0.12.3 2019-10-09 15:02:48 -07:00
Quinlan Jung 7df3f70e9c Update CHANGELOG 2019-10-09 14:52:26 -07:00
Quinlan Jung 34cf811fd7 update client shell tarball (#145) 2019-10-08 09:58:23 -07:00
Eric Samelson 1d825e6310 Release 0.12.2 2019-09-27 10:14:48 -07:00
Eric Samelson dd6c806e0f Update CHANGELOG 2019-09-27 10:14:36 -07:00
Eric Samelson ccbdf7418e [android] update sdk35 shell tarball with battery fix 2019-09-26 22:20:58 -07:00
Eric Samelson 552c1074c0 Release 0.12.1 2019-09-20 16:35:45 -07:00
Eric Samelson 18d35d7730 Update CHANGELOG 2019-09-20 16:35:21 -07:00
Eric Samelson 7aaac7b648 [ios] update sdk 35 shell app with notification token cleanup 2019-09-20 16:34:58 -07:00
Eric Samelson c472a5a6ea [ios] backport ios 13 fixes to SDK 33 and 34 2019-09-20 15:43:41 -07:00
Eric Samelson 527821ee50 Release 0.12.0 2019-09-19 15:02:17 -07:00
Eric Samelson d2bff1639c Update CHANGELOG 2019-09-19 15:00:25 -07:00
Eric Samelson 84cf930537 [ios][android] add sdk35 and remove sdk27-30 shell tarballs (#140) 2019-09-19 14:40:17 -07:00
Stanisław Chmiela 4c3582b8df [changelog] Update changelog entry 2019-09-19 07:24:46 +02:00
Stanisław Chmiela 52b029a5a9 Release 0.11.3 2019-09-19 07:23:32 +02:00
Stanisław Chmiela 86047db677 [expo-branch] Change package of vendored expo-branch (#138)
* [expo-branch] Change package of vendored expo-branch

* shell tarball with rebuilt expokit

* Update SDK34 Android tarball
2019-09-19 07:21:55 +02:00
66 changed files with 5226 additions and 2875 deletions

No files matched your search

+67 -15
View File
@@ -9,7 +9,7 @@ executors:
working_directory: ~/turtle
mac:
macos: # https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
xcode: '10.1.0'
xcode: '11.1.0'
working_directory: /Users/distiller/project
shell: /bin/bash -leo pipefail
android:
@@ -77,6 +77,49 @@ commands:
EOF
chmod +x /bin/rm
install_nodejs_mac:
parameters:
nodejs_version:
type: string
default: 12.16.1
yarn_version:
type: string
default: 1.22.0
steps:
- restore_cache:
key: "node-js-v1-darwin-archive-<< parameters.nodejs_version >>"
- run:
name: Uninstall yarn with brew
command: brew uninstall --force yarn
- install_node_and_yarn:
platform: darwin
nodejs_version: "<< parameters.nodejs_version >>"
yarn_version: "<< parameters.yarn_version >>"
- save_cache:
key: "node-js-v1-darwin-archive-<< parameters.nodejs_version >>"
paths:
- /private/tmp/nodejs.tar.xz
install_node_and_yarn:
parameters:
platform:
type: string
nodejs_version:
type: string
yarn_version:
type: string
steps:
- run:
name: Install node & yarn
command: |
NODEJS_ARCHIVE="/tmp/nodejs.tar.xz"
if [ ! -f "$NODEJS_ARCHIVE" ]; then
curl -o $NODEJS_ARCHIVE -SL "https://nodejs.org/dist/v<< parameters.nodejs_version >>/node-v<< parameters.nodejs_version >>-<< parameters.platform >>-x64.tar.xz"
fi
tar -xJf $NODEJS_ARCHIVE -C /usr/local --strip-components=1 --exclude CHANGELOG.md --exclude README.md --exclude LICENSE
ln -s /usr/local/bin/node /usr/local/bin/nodejs
npm install --global yarn@<< parameters.yarn_version >>
decrypt_secrets_if_possible:
steps:
- run:
@@ -93,18 +136,24 @@ commands:
workingdir:
type: string
default: .
platform:
type: string
default: linux
steps:
- restore_cache:
key: yarn-v1-{{ checksum "<< parameters.workingdir >>/yarn.lock" }}
key: yarn-v2-<< parameters.platform >>-{{ checksum "<< parameters.workingdir >>/yarn.lock" }}
save_yarn_cache:
parameters:
workingdir:
type: string
default: .
platform:
type: string
default: linux
steps:
- save_cache:
key: yarn-v1-{{ checksum "<< parameters.workingdir >>/yarn.lock" }}
key: yarn-v2-<< parameters.platform >>-{{ checksum "<< parameters.workingdir >>/yarn.lock" }}
paths:
- ~/.cache/yarn # `yarn cache dir`
@@ -115,10 +164,10 @@ commands:
default: ios
sdk_version:
type: string
default: sdk32
default: sdk37
steps:
- restore_cache:
key: "workingdir-v1-<< parameters.platform >>-<< parameters.sdk_version >>"
key: "workingdir-v2-<< parameters.platform >>-<< parameters.sdk_version >>"
save_workingdir_cache:
parameters:
@@ -130,10 +179,10 @@ commands:
default: ios
sdk_version:
type: string
default: sdk32
default: sdk37
steps:
- save_cache:
key: "workingdir-v1-<< parameters.platform >>-<< parameters.sdk_version >>"
key: "workingdir-v2-<< parameters.platform >>-<< parameters.sdk_version >>"
paths:
- "<< parameters.workingdir >>/<< parameters.platform >>/<< parameters.sdk_version >>"
@@ -180,20 +229,23 @@ jobs:
executor: mac
steps:
- install_nix
- install_nodejs_mac
- setup
- decrypt_secrets_if_possible
- restore_yarn_cache
- restore_yarn_cache:
platform: darwin
- run: yarn
- save_yarn_cache
- save_yarn_cache:
platform: darwin
- restore_workingdir_cache:
sdk_version: sdk32
sdk_version: sdk37
platform: ios
- run:
name: Run iOS smoke tests
command: ./scripts/tests/runIOSSmokeTestsCI.sh
command: SDK_VERSION=sdk37 ./scripts/tests/runIOSSmokeTestsCI.sh
- save_workingdir_cache:
workingdir: /Users/distiller/project/workingdir
sdk_version: sdk32
sdk_version: sdk37
platform: ios
android_smoke_tests:
@@ -205,11 +257,11 @@ jobs:
- run: yarn
- save_yarn_cache
- restore_workingdir_cache:
sdk_version: sdk32
sdk_version: sdk37
platform: android
- run:
name: Fetch Android shell app
command: SDK_VERSION=sdk32 ./scripts/android/fetchRemoteAndroidTarball.sh
command: SDK_VERSION=sdk37 ./scripts/android/fetchRemoteAndroidTarball.sh
- run:
name: Run Android smoke tests
command: |
@@ -217,7 +269,7 @@ jobs:
--run "./scripts/tests/runAndroidSmokeTestsCI.sh"
- save_workingdir_cache:
workingdir: ~/turtle/workingdir
sdk_version: sdk32
sdk_version: sdk37
platform: android
android_staging_deploy:
+1 -1
View File
@@ -22,6 +22,6 @@ export NODE_ENV=development
export EXPO_TURTLE_TOOLS_DIR="$(pwd)/tools"
PATH_add $EXPO_TURTLE_TOOLS_DIR/bin
if [ "$CI" = "true" ]; then
if [ "$CI" = "true" ] && [[ ! $OSTYPE =~ darwin.* ]]; then
PATH_add $EXPO_TURTLE_TOOLS_DIR/ci/bin
fi
+2 -2
View File
@@ -1,5 +1,3 @@
!/src/node_modules
node_modules
yarn-error.log
google-cloud-credentials.json
@@ -7,6 +5,8 @@ google-cloud-credentials.json
/build/
/workingdir/*
/artifacts/*
.history
shell.apk
.secrets*
+1 -1
View File
@@ -1 +1 @@
v8.15.1
v12.16.1
+1
View File
@@ -6,3 +6,4 @@ SENTRY_DSN=""
ENVIRONMENT="development"
REDIS_URL="redis://localhost:6379/0"
REDIS_CONFIG_URL="redis://localhost:6379/0"
TURTLE_SDK_VERSIONS_SECRET_TOKEN="xeiw7yigha<a_r5aich!oW9Ik2eish8the9Na6Jae-ghoo5ua/t8nu5AeheiTew4"
+365 -4
View File
@@ -1,237 +1,598 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
## [0.11.2] - 2019-08-21
## [0.14.10] - 2020-05-01
### Added
- support for "android.enableDangerousExperimentalLeanBuilds" in app.json
## [0.14.9] - 2020-04-21
### Changed
- Updated `@expo/xdl` to 57.8.30 (scoped the build command so it only builds the `:app` Android sub-project and not all the sub-projects available, [PR](https://github.com/expo/expo-cli/pull/1937)).
## [0.14.8] - 2020-04-20
### Changed
- Updated `@expo/xdl` to 57.8.29 (removed call to `check-dynamic-macros-android.sh`, [PR](https://github.com/expo/expo-cli/pull/1933)).
## [0.14.7] - 2020-04-20
### Changed
- Turtle no longer installs all dependencies of shell apps projects — only the production dependencies are installed now.
- Updated `@expo/xdl` to 57.8.25 (fixed unintuitive `google-services.json` handling for SDK37+, [PR](https://github.com/expo/expo-cli/pull/1897)).
## [0.14.6] - 2020-04-09
### Changed
- Updated @expo/xdl to 57.8.17 (fixed downloading assets smaller than 10 bytes).
## [0.14.5] - 2020-04-06
### Changed
- Made @expo/config error more meaningful.
## [0.14.4] - 2020-04-06
### Fixed
- Determining SDK version for Expo apps using SDK >=37.
## [0.14.3] - 2020-04-03
### Fixed
- A fix for Android SDK 37 - `check-dynamic-macros-android.sh` doesn't use `jq` anymore.
## [0.14.1] - 2020-04-01
### Changed
- Updated iOS shell app for SDK 37 to remove unnecessary unimodules.
## [0.14.0] - 2020-03-31
### Added
- Added iOS shell app for SDK 37.
- Added Android shell app for SDK 37.
### Changed
- Updated iOS client shell app to support SDK 37.
- Replace `/` with `__` in the artifact filename to fix a strange bug with selecting APK file in Android Studio.
- Print currently using Java version if it's not 8.
### Removed
- Dropped support for SDK 33.
## [0.13.10] - 2020-03-09
### Added
- Added validation for `--public-url`.
### Changed
- Changed the way of installing NDK - it's installed with `sdkmanager` now.
- Upgraded NDK to 17.2.4988734.
- Upgraded Node.js version to 12.16.1.
### Fixed
- A bug where the `platform` field in logs wasn't set correctly when using a shortcut command.
- Removed all remaining instances of `UIWebView` in iOS app builds.
### Removed
- Dropped support for Node.js versions older than 10.
- Dropped support for building Expo SDK 31 and 32 apps.
## [0.13.9] - 2020-02-13
### Fixed
- Fixed Notifications.getDevicePushTokenAsync() erroring occasionally on iOS SDK 36.
## [0.13.8] - 2020-01-27
### Fixed
- Fixed `react-native-maps` native module not being properly initialized (https://github.com/expo/expo/pull/6844)
- Fixed Android standalone apps crashing on startup (https://github.com/expo/expo/pull/6825)
## [0.13.7] - 2020-01-15
### Added
- Bumped `traveling-fastlane` to 1.11.4 to update CA certs
## [0.13.6] - 2019-12-17
### Fixed
- Fixed issue with missing request handler for assets-library urls.
## [0.13.4] - 2019-12-13
### Added
- Support for building iOS apps with a wildcard provisioning profile.
## [0.13.3] - 2019-12-12
### Fixed
- Removed private API usage from iOS SDK 36 tarball
## [0.13.2] - 2019-12-10
### Fixed
- Fixed Android App Bundle builds
- Fixed issue with Root View Background Color and AppLoading on Android SDK 36 builds
## [0.13.1] - 2019-12-09
### Fixed
- Fixed Android shell app for SDK 36
## [0.13.0] - 2019-12-09
### Added
- Added iOS and Android shell apps for SDK 36
### Changed
- Updated iOS client shell app to support SDK 36
## [0.12.12] - 2019-11-22
### Fixed
- A bug that caused `expo.owner` value not to be used if defined.
## [0.12.11] - 2019-11-20
### Added
- Bumped `traveling-fastlane` to 1.11.0
## [0.12.10] - 2019-11-15
### Added
- Add `shellAppSdkVersion` param to `IOSShellAppBuilder` so entitlement keys get properly added in (https://github.com/expo/turtle/pull/162)
## [0.12.9] - 2019-11-14
### Added
- Support for customizing Facebook SDK behavior at buildtime (autoinitialization, logging app events, logging Advertiser ID) (https://github.com/expo/expo/pull/5924)
## [0.12.8] - 2019-10-29
### Changed
- Updated Android shell app for SDK 35 to fix `Linking.openUrl` not opening app if it's already foregrounded (https://github.com/expo/expo/issues/6058)
- Enforce Java 8 when using turtle-cli.
## [0.12.7] - 2019-10-25
### Changed
- Updated Android shell app for SDK 35 to fix occasional crash in background due to GCM registration service (https://github.com/expo/expo/issues/4207)
## [0.12.5] - 2019-10-18
### Changed
- Updated iOS shell app for SDK 35 to fix crash when calling `WebBrowser.dismissBrowser` on iOS 13 (https://github.com/expo/expo/issues/5742)
## [0.12.4] - 2019-10-11
### Changed
- Updated Android shell app for SDK 35 to fix occasional crash on launch (https://github.com/expo/expo/issues/5917)
## [0.12.3] - 2019-10-09
### Changed
- Updated iOS client shell app for SDK 35 to fix it from crashing on startup due to having an incomplete GoogleService-Info.plist file.
## [0.12.2] - 2019-09-27
### Changed
- Updated Android shell app for SDK 35 to fix crash on Android <=7 due to battery module
## [0.12.1] - 2019-09-20
### Changed
- Updated iOS shell apps for SDK 33 and 34 to fix iOS 13 issues with fishhook, notification tokens, and ShareSheet
- Updated iOS shell app for SDK 35 with a minor fix
## [0.12.0] - 2019-09-19
### Added
- Support for SDK 35 iOS and Android builds.
### Removed
- Support for SDK 27-30 iOS and Android builds.
## [0.11.3] - 2019-09-19
### Changed
- Updated SDK34 Android shell app with `expo-branch` fixes.
## [0.11.2] - 2019-08-21
### Added
- Support for GoogleService-Info.plist (>=34.0.0).
## [0.11.1] - 2019-08-08
### Changed
- Updated iOS client shell app with the latest fixes (up to 2.12.3).
## [0.11.0] - 2019-08-07
### Changed
- Enabled back optional modules support, but only for specific unimodules.
- Updated SDK34 Android shell app with the latest fixes (up to 2.12.2).
- Updated SDK34 iOS shell app with the latest fixes (up to 2.12.3).
## [0.10.0] - 2019-08-01
### Changed
- Fully disabled optional modules on Android for now.
- Updated iOS shell apps for SDK 33 and 34 to fix scoped permissions issue.
- Updated Android shell app for SDK 34 to work after disabling optional modules.
## [0.9.1] - 2019-07-29
### Changed
- `release-it` version to `12.3.4`.
## [0.9.0] - 2019-07-29
### Added
- Android, iOS standalone shell apps and iOS Expo client shell app for SDK34.
- Xcode license check for iOS builds.
### Fixed
- Setting `Constants.nativeAppVersion` for Android standalone builds (actually fixed in [expo/expo-cli#878](https://github.com/expo/expo-cli/pull/878)).
- Passing `expo.android.config` object from `app.json` to the Android builder.
- Fixed crash on launch for iOS standalone apps on iOS 13 (all SDK versions).
- Fixed occasional issue on iOS (SDK 33) where the JS bundle cannot be found ("No cache exists for this resource: shell-app.bundle") and a reload would be required.
## [0.8.11] - 2019-07-16
### Fixed
- Android debug builds.
## [0.8.10] - 2019-07-16
### Fixed
- iOS simulator builds.
## [0.8.9] - 2019-07-15
### Fixed
- User authentication.
## [0.8.8] - 2019-07-11
### Fixed
- LocalAuthentication module on iOS (fixes [expo/expo#663](https://github.com/expo/expo/issues/663)).
## [0.8.7] - 2019-07-05
### Added
- Adhoc Builds: use provisioningProfileId if specified.
- Registering supported SDK versions in Redis.
- Support for 64 bit builds in SDK33.
## [0.8.6] - 2019-06-25
### Added
- Added support for Android build modes: debug or release.
### Fixed
- Upgrading the shell app for a given SDK version when the previous version is already downloaded (bug in `turtle-cli`).
- Updated Android shell app for SDK33 to include `[email protected]` which fixes crashes on Android 9.0 when showing some Lottie animations.
- Schema for `buildModes`.
- Updated @expo/xdl to 55.0.7 (fixed reading from binary plist).
## [0.8.4] - 2019-06-13
### Changed
- Upgraded `sharp` from `0.21.3` to `0.22.1`.
- `gulp-cli` is no longer required to build an app with `turtle-cli`.
## [0.8.3] - 2019-06-13
### Added
- Running Android Turtle process with `supervisor` (pod is restarted if there were 5 failures in the last 10 minutes).
### Changed
- `turtle-cli` is now fetching the app manifest before running the build.
## [0.8.2] - 2019-06-11
### Changed
- Updated Android shell app for SDK33 to remove `expo-face-detector` and `expo-payments-stripe` from standalone builds.
- Updated Android shell app for SDK33 to get rid of `node_modules` for `tools-public`.
- From now on, `turtle-cli` installs dependencies for `tools-public` in shell apps for SDK versions < 33.
### Fixed
- Android builds with turtle-cli by installing all unmodules if `dependencies` is empty.
## [0.8.1] - 2019-06-10
### Changed
- Add expo dependencies when resolving unimodules.
### Fixed
- Support for Android tarballs without `universe-package.json`.
## [0.8.0] - 2019-06-07
### Added
- Turtle CLI logo to the project (created by [@zularizal](https://github.com/zularizal))!
- Shell apps for SDK 33.
- Support for Android App Bundles (App bundles are built by default, use `-t apk` to build apk).
### Changed
- Updated Android shell app for SDK 32 to fix AppAuth issue (https://github.com/expo/expo/pull/4115) and to fix a newer than expected JSC version.
- Default value for build timeout to 15 minutes.
- Added filtering of logs (strips out download progress) when downloading SDK tools.
- `xdl` -> `@expo/xdl`, updated `@expo/xdl`.
### Fixed
- Generating Android keystore in turtle when one is not passed to turtle-cli (https://github.com/expo/turtle/pull/65).
- Upload logs to s3 if build has been canceled or timed out.
- Unhandled exception on asset download (xdl).
## [0.7.2] - 2019-05-09
### Added
- Support for Android tarballs without `universe-package.json`.
### Changed
- Upgraded `@expo/traveling-fastlane-darwin` to 1.9.4 (fixes issues with generating provisioning profiles for ad-hoc builds).
### Removed
- Support for `CLIENT_LOGGER_LEVEL` env variable.
## [0.7.1] - 2019-05-06
### Fixed
- Resolving `fastlane` version when `LC_ALL` is not set.
## [0.7.0] - 2019-05-06
### Added
- Support for custom Android builds.
### Changed
- Refactored logger.
### Fixed
- `platform` log field wrongly set to `ios` for Android builds (when using `turtle-cli`).
- Brought back `jobID` and `experienceName` fields to Android logs.
## [0.6.1] - 2019-04-23
### Added
- Checking fastlane version before running build (turtle-cli).
### Changed
- Updated iOS shell app for SDK 32 to fix AppAuth issue.
- Babel replaced by ttypescript.
- Updated xdl to 53.5.3 and @expo/spawn-async to 1.4.2, so that error stack traces should be more informative now.
### Fixed
- Brought back `jobID` and `experienceName` fields to GCloud logs.
### Removed
- `buidAndroidTarballLocally.sh` script (it has been moved to expo repository - [expo/expo#4022](https://github.com/expo/expo/pull/4022)).
## [0.6.0] - 2019-04-09
### Changed
- Removed Branch module from Android shell apps for all SDK versions.
## [0.5.15] - 2019-04-03
### Added
- Turtle smoke tests are now being executed on CircleCI from the context of this repository.
### Changed
- Updated iOS shell app for SDK 32 (fixes [this loading issue for slow connections](https://github.com/expo/expo/issues/3574)).
- Minor infra changes (doesn't affect users).
- Error logs format - error objects are now passed in an object being passed as the first argument to logger function.
### Removed
- Sending logs to loggly.
## [0.5.14] - 2019-03-22
### Added
- `--config` parameter for turtle-cli commands, which allows to specify a custom path to app.json file
### Changed
- Updated iOS shell app for SDK 32 (fixes [this notifications issue](https://github.com/expo/expo/issues/3663)).
## [0.5.13] - 2019-03-12
### Added
- Android SDK version support validation.
### Changed
- iOS Enterprise builds don't compile bitcode now.
## [0.5.12] - 2019-02-26
### Added
- Google Cloud logger (as a bunyan stream).
### Changed
- Android builder passes the manifest from a build job message if it's available.
## [0.5.11] - 2019-02-22
### Added
- Builder for iOS client apps.
## [0.5.10] - 2019-02-19
### Added
- Registering Turtle version in Redis.
### Changed
- Update Android shell app for SDK 32 to fix [update](https://github.com/expo/expo/issues/3504) and [back button](https://github.com/expo/expo/issues/1786) issues.
## [0.5.9] - 2019-02-06
- Update iOS shell app for SDK 32 (fixes bare notifications [issue](https://github.com/expo/expo/issues/3223)).
## [0.5.7] - 2019-01-31
- Update Android shell app for SDK 32 to fix bundled assets issue.
## [0.5.6] - 2019-01-25
- Update iOS shell app for SDK 30, 31 and 32 (built with xcode 10.1).
## [0.5.5] - 2019-01-24
### Added
- Sending build duration in AWS SQS messages (of `FINISHED` and `ERRORED` types).
## [0.5.4] - 2019-01-22
### Changed
- Update iOS shell app for SDK32 to [`expo/expo#0847c10`](https://github.com/expo/expo/commit/0847c1073d38c366866f3d9279ddd662da47dc9b), i.e. v2.10.3 with fixed WebView navigation scheme and upgraded Facebook SDK.
## [0.5.3] - 2019-01-21
### Fixed
- Building Android standalone apps ([not accepted license issue](https://github.com/expo/expo/issues/3266)) - updated Android build tools (`build-tools;28.0.3`, `platforms;android-28`).
## [0.5.2] - 2019-01-18
### Added
- The link (in README) to the repository containing `turtle-cli` usage example.
- [Contributing guide](CONTRIBUTING.md).
- [Code of Conduct](CODE_OF_CONDUCT.md).
### Removed
- `eslint`
### Changed
- Fix all `tslint` errors.
## [0.5.1] - 2019-01-16
### Changed
- Update Android shell app for SDK32 that includes `[email protected]`.
## [0.5.0] - 2019-01-16
### Added
- Turtle version is added to the `onFinish` and `onError` build messages.
### Changed
- A version property value being sent to the queue. It's now the version number
from `package.json` instead of `new`/`old` indicator.
from `package.json` instead of `new`/`old` indicator.
### Removed
- `--push-p12-path` parameter for `turtle build:ios` command,
a Push Notifications Certificate is no longer required to perform a successful
iOS standalone app build.
a Push Notifications Certificate is no longer required to perform a successful
iOS standalone app build.
## [0.4.3] - 2019-01-09
### Changed
- Update iOS shell app for SDK32.
- Update Android shell app for SDK32.
+13 -15
View File
@@ -1,29 +1,27 @@
# see docker-base/Dockerfile to learn what's installed in the turtle-android-base image
FROM gcr.io/exponentjs/turtle-android-base:0.1.0
FROM gcr.io/exponentjs/turtle-android-base:0.4.0
ADD . /app/turtle
RUN mv /app/turtle/workingdir /app && \
WORKDIR /app/turtle
RUN ./scripts/fetchRemoteTarballs.sh android
RUN ln -s /app/turtle/workingdir /app/workingdir && \
for SDK_VERSION in `ls /app/workingdir/android/`; do \
echo "preparing $SDK_VERSION shell app" && \
cd /app/workingdir/android/$SDK_VERSION && \
if [ -f universe-package.json ]; then \
mv package.json exponent-package.json && \
mv universe-package.json package.json && \
yarn install && \
mv package.json universe-package.json && \
mv exponent-package.json package.json; \
else \
yarn install; \
fi \
; done && \
mv /app/workingdir /app/turtle
mv packages non-workspace-packages && \
# Keep in sync with src/bin/setup/android/index.ts#_installNodeModules
# --prod requires --ignore-scripts (otherwise
# expo-yarn-workspaces errors as missing)
yarn install --ignore-scripts --prod && \
mv non-workspace-packages packages ; \
done
ENV NODE_ENV "production"
ENV TURTLE_WORKING_DIR_PATH /app/turtle/workingdir/
WORKDIR /app/turtle
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord"]
+12 -1
View File
@@ -3,7 +3,18 @@
const subcommand = process.argv[2];
if (subcommand) {
const [, platform] = subcommand.split(':');
let platform;
if (subcommand.length === 2) {
const letter = subcommand[1];
if (letter === 'a') {
platform = 'android';
} else if (letter === 'i') {
platform = 'ios';
}
} else {
const [, maybePlatform] = subcommand.split(':');
platform = maybePlatform;
}
if (platform === 'ios' || platform === 'android') {
// so that logs have correct platform set
process.env.PLATFORM = platform;
+1
View File
@@ -0,0 +1 @@
configureAndroidSdk.sh
+26 -31
View File
@@ -17,6 +17,7 @@ RUN dpkg --add-architecture i386 && \
build-essential\
bzip2:i386\
file\
jq\
lib32ncurses5\
lib32z1\
libc6:i386\
@@ -31,7 +32,7 @@ RUN dpkg --add-architecture i386 && \
apt-get clean
ENV NPM_CONFIG_LOGLEVEL warn
ENV NODE_VERSION 8.12.0
ENV NODE_VERSION 12.16.1
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
@@ -54,39 +55,33 @@ ENV PATH ${ANDROID_HOME}/tools:${PATH}
ENV PATH ${ANDROID_HOME}/tools/bin:${PATH}
ENV PATH ${ANDROID_HOME}/build-tools/28.0.3/:${PATH}
ADD scripts/android/configureAndroidSdk.sh /tmp/configureAndroidSdk.sh
ADD configureAndroidSdk.sh /tmp/configureAndroidSdk.sh
RUN /tmp/configureAndroidSdk.sh --install-all-platforms
# Install Android NDK
ENV ANDROID_NDK_VERSION android-ndk-r10e
ENV ANDROID_NDK_FILE ${ANDROID_NDK_VERSION}-linux-x86_64.bin
ENV ANDROID_NDK_URL https://dl.google.com/android/ndk/${ANDROID_NDK_FILE}
ENV ANDROID_NDK /opt/${ANDROID_NDK_VERSION}
ENV PATH $ANDROID_NDK:$PATH
# i have no clue why some of this is here, but it's working elsewhere
# it appears to install the NDK version expo needs, so that's cool
RUN mkdir /ndk_setup && cd /ndk_setup && \
curl -L ${ANDROID_NDK_URL} > ${ANDROID_NDK_FILE} && \
chmod +x ${ANDROID_NDK_FILE} && \
sync && \
./${ANDROID_NDK_FILE} && \
mv ./${ANDROID_NDK_VERSION} ${ANDROID_NDK} && \
cp -R \
${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64 \
${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86 && \
cp -R \
${ANDROID_NDK}/toolchains/x86-4.8/prebuilt/linux-x86_64 \
${ANDROID_NDK}/toolchains/x86-4.8/prebuilt/linux-x86 && \
cd && rm -rf /ndk_setup
# Support Gradle
ENV TERM dumb
# Install gradle
RUN wget https://services.gradle.org/distributions/gradle-4.4-all.zip
RUN unzip -qq gradle-4.4-all.zip
RUN mv gradle-4.4 /usr/local
RUN rm gradle-4.4-all.zip
ENV GRADLE_HOME /usr/local/gradle-4.4
# Install gradle 5.6.3
RUN wget https://services.gradle.org/distributions/gradle-5.6.3-all.zip
RUN unzip -qq gradle-5.6.3-all.zip
RUN cp -r gradle-5.6.3 /usr/local
RUN mkdir -p /root/.gradle/wrapper/dists/gradle-5.6.3-all/7wpcz6s7ut7bllr9k6e1hazxc
RUN mv gradle-5.6.3-all.zip /root/.gradle/wrapper/dists/gradle-5.6.3-all/7wpcz6s7ut7bllr9k6e1hazxc
RUN mv gradle-5.6.3 /root/.gradle/wrapper/dists/gradle-5.6.3-all/7wpcz6s7ut7bllr9k6e1hazxc
RUN touch /root/.gradle/wrapper/dists/gradle-5.6.3-all/7wpcz6s7ut7bllr9k6e1hazxc/gradle-5.6.3-all.zip.ok
RUN touch /root/.gradle/wrapper/dists/gradle-5.6.3-all/7wpcz6s7ut7bllr9k6e1hazxc/gradle-5.6.3-all.zip.lck
RUN chmod 755 /root/.gradle/wrapper/dists/gradle-5.6.3-all/7wpcz6s7ut7bllr9k6e1hazxc/gradle-5.6.3/bin/gradle
ENV GRADLE_HOME /usr/local/gradle-5.6.3
ENV PATH ${GRADLE_HOME}/bin:$PATH
# Install gradle 4.10.2
RUN wget https://services.gradle.org/distributions/gradle-4.10.2-all.zip
RUN mkdir -p /root/.gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv
RUN unzip -qq gradle-4.10.2-all.zip
RUN mv gradle-4.10.2-all.zip /root/.gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv
RUN mv gradle-4.10.2 /root/.gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv
RUN touch /root/.gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv/gradle-4.10.2-all.zip.ok
RUN touch /root/.gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv/gradle-4.10.2-all.zip.lck
RUN chmod 755 /root/.gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv/gradle-4.10.2/bin/gradle
@@ -138,6 +138,11 @@ spec:
secretKeyRef:
name: turtle-js-config
key: datadog_app_key
- name: TURTLE_SDK_VERSIONS_SECRET_TOKEN
valueFrom:
secretKeyRef:
name: turtle-js-config
key: turtle_sdk_versions_secret_token
# other vars
- name: GRADLE_DAEMON_DISABLED
value: "1"
+1 -1
View File
@@ -1,5 +1,5 @@
self: super:
{
nodejs = super.nodejs-8_x;
nodejs = super.nodejs-12_x;
}
+87 -21
View File
@@ -2,11 +2,78 @@ with (import ./default.nix {});
let
ndk = androidenv.androidndk_17c.override { fullNDK = true; };
ndk_root = "${ndk}/libexec/${ndk.name}";
sdk_path = if stdenv.isDarwin
then "/Library/Android/sdk"
else "/Android/Sdk"; # intentional Capital S
# These expressions can be deleted when react native depends on version of
# ndk present in nixpkgs.
os = if stdenv.system == "x86_64-linux" then "linux"
else if stdenv.system == "x86_64-darwin" then "macosx" else throw "unsupported system architecture: ${stdenv.system}";
ndk_17c_src = if stdenv.isDarwin then fetchurl {
url = http://dl.google.com/android/repository/android-ndk-r17c-darwin-x86_64.zip;
sha256 = "11iyxgqp017fchn54kkns9mrax73m73xm5wgis266dsq2g36dn73";
} else fetchurl {
url = https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip;
sha256 = "12b5h5p8b2ia38825dnnacn7b47c0inpys8jp82r42iks3dilm1z";
};
ndk_runtime_paths = lib.makeBinPath [ coreutils file findutils gawk gnugrep gnused jdk python3 which ]; #+ ":${platform-tools}/platform-tools";
ndk = stdenv.mkDerivation {
name = "ndk-17c";
src = ndk_17c_src;
buildInputs = [ unzip autoPatchelfHook makeWrapper python2 ] ++ lib.optional (os == "linux") [ glibc stdenv.cc.cc ncurses5 zlib libcxx.out ];
unpackPhase = ''
mkdir extractedzip
cd extractedzip
unpackFile "$src"
if [ "$(find . -mindepth 1 -maxdepth 1 -type d | wc -l)" -eq 1 ]
then
cd "$(find . -mindepth 1 -maxdepth 1 -type d)"
fi
sourceRoot="$PWD"
'';
installPhase = ''
packageBaseDir=$out/libexec/android-sdk/ndk-bundle
mkdir -p $packageBaseDir
cd $packageBaseDir
cp -av $sourceRoot/* .
'' + lib.optionalString (os == "linux") ''
patchShebangs .
wrapProgram $(pwd)/build/tools/make_standalone_toolchain.py --prefix PATH : "${ndk_runtime_paths}"
rm -rf docs tests
# Patch the executables of the toolchains, but not the libraries -- they are needed for crosscompiling
addAutoPatchelfSearchPath $out/libexec/android-sdk/ndk-bundle/toolchains/renderscript/prebuilt/linux-x86_64/lib64
find toolchains -type d -name bin | while read dir
do
autoPatchelf "$dir"
done
# fix ineffective PROGDIR / MYNDKDIR determination
for i in ndk-build
do
sed -i -e 's|^PROGDIR=`dirname $0`|PROGDIR=`dirname $(readlink -f $(which $0))`|' $i
done
# Patch executables
autoPatchelf prebuilt/linux-x86_64
# wrap
for i in ndk-build
do
wrapProgram "$(pwd)/$i" --prefix PATH : "${ndk_runtime_paths}"
done
# make some executables available in PATH
mkdir -p $out/bin
for i in ndk-build
do
ln -sf ../../libexec/android-sdk/ndk-bundle/$i $out/bin/$i
done
'';
dontStrip = true;
dontPatchELF = true;
dontAutoPatchelf = true;
noAuditTmpdir = true;
};
ndkRoot = "${ndk}/libexec/android-sdk/ndk-bundle";
sdk = androidenv.androidPkgs_9_0.androidsdk;
sdk_path = if stdenv.isDarwin
then "/Library/Android/sdk"
else "/Android/Sdk"; # intentional Capital S
in
@@ -23,28 +90,27 @@ mkShell rec {
nativeBuildInputs = [
awscli
curl
fastlane
git
nodejs-8_x
nodejs
openjdk8
yarn
];
passthru = { inherit ndk; };
passthru = { inherit ndk ndkRoot; };
shellHook = ''
${./install-ndk-17c.sh} ${ndk} ${ndk_root}
yes | ${androidenv.androidsdk_9_0}/bin/sdkmanager --licenses --sdk_root="$ANDROID_SDK_ROOT"
yes | ${androidenv.androidsdk_9_0}/bin/sdkmanager --sdk_root="$ANDROID_SDK_ROOT" "platforms;android-28" | grep -v =
yes | ${androidenv.androidsdk_9_0}/bin/sdkmanager --sdk_root="$ANDROID_SDK_ROOT" "build-tools;28.0.3" | grep -v =
${lib.optionalString stdenv.isLinux ''
for dep in lib lib64; do
if [ -L /$dep ] || [ ! -e /$dep ]; then
echo "Creating /$dep"
ln -s ${stdenv.cc.libc}/$dep /$dep
else
echo "Using existing /$dep"
fi
done
''}
${./install-ndk-17c.sh} ${ndk} ${ndkRoot}
# grep -v = should clean up build logs, see https://stackoverflow.com/a/52464819/1123156
yes | ${sdk}/bin/sdkmanager --sdk_root="$ANDROID_SDK_ROOT" "build-tools;28.0.3" | grep -v =
'' + lib.optionalString stdenv.isLinux ''
for dep in lib lib64; do
if [ -L /$dep ] || [ ! -e /$dep ]; then
echo "Creating /$dep"
ln -s ${stdenv.cc.libc}/$dep /$dep
else
echo "Using existing /$dep"
fi
done
'';
}
+3 -3
View File
@@ -1,7 +1,7 @@
{
"url": "https://github.com/NixOS/nixpkgs-channels.git",
"rev": "80738ed9dc0ce48d7796baed5364eef8072c794d",
"date": "2018-11-17T11:18:10+01:00",
"sha256": "0anmvr6b47gbbyl9v2fn86mfkcwgpbd5lf0yf3drgm8pbv57c1dc",
"rev": "42f0be81ae05a8fe6d6e8e7f1c28652e7746e046",
"date": "2020-03-01T07:21:40-03:00",
"sha256": "1rxb5kmghkzazqcv4d8yczdiv2srs4r7apx4idc276lcikm0hdmf",
"fetchSubmodules": false
}
+18 -9
View File
@@ -1,6 +1,6 @@
{
"name": "turtle-cli",
"version": "0.11.2",
"version": "0.14.11",
"description": "The command-line tool for building standalone Expo apps",
"preferGlobal": true,
"scripts": {
@@ -22,7 +22,9 @@
"test:unit": "yarn test --config jest/unit-config.json",
"test:smoke": "yarn test --config jest/smoke-config.json --forceExit",
"test:smoke:android": "PLATFORM=android yarn test:smoke --testNamePattern=android",
"test:smoke:android:record": "PLATFORM=android EXPENV_OVERRIDES=local-common,local,local-queue expenv yarn test:smoke --testNamePattern=android",
"test:smoke:ios": "PLATFORM=ios yarn test:smoke --testNamePattern=iOS",
"test:smoke:ios:record": "PLATFORM=ios EXPENV_OVERRIDES=local-common,local,local-queue expenv yarn test:smoke --testNamePattern=iOS",
"release": "./scripts/release.sh",
"release:beta": "./scripts/releaseBeta.sh",
"release:update:turtle-cli-example": "./scripts/updateTurtleCliExampleRepo.sh",
@@ -53,7 +55,7 @@
"react-native"
],
"engines": {
"node": ">=8"
"node": ">=10"
},
"author": "Expo <[email protected]>",
"license": "MIT",
@@ -75,6 +77,7 @@
"@types/progress": "^2.0.1",
"@types/raven": "^2.5.1",
"@types/request": "^2.47.1",
"@types/request-promise": "^4.1.44",
"@types/semver": "^6.0.0",
"@types/sharp": "^0.17.8",
"@types/tar": "^4.0.0",
@@ -83,13 +86,13 @@
"@types/webpack-dev-server": "^3.1.7",
"@types/which": "^1.3.1",
"husky": "^1.3.1",
"jest": "^23.6.0",
"jest": "^25.1.0",
"lint-staged": "^8.1.5",
"nock": "^10.0.1",
"nodemon": "^1.18.11",
"nodemon": "^2.0.2",
"release-it": "^12.3.4",
"rimraf": "^2.6.2",
"ts-jest": "^23.10.4",
"ts-jest": "^25.2.1",
"ts-node": "^8.0.3",
"ts-transformer-imports": "^0.4.1",
"tsconfig-paths": "^3.8.0",
@@ -99,9 +102,10 @@
"typescript": "^3.4.2"
},
"dependencies": {
"@expo/config": "^3.0.5",
"@expo/spawn-async": "^1.4.2",
"@expo/xdl": "56.2.1",
"@google-cloud/logging-bunyan": "^0.9.5",
"@expo/xdl": "57.8.30",
"@google-cloud/logging-bunyan": "^2.0.3",
"async-retry": "^1.2.1",
"aws-sdk": "^2.226.1",
"bunyan": "^1.8.12",
@@ -120,14 +124,19 @@
"raven": "^2.6.2",
"request": "^2.88.0",
"request-progress": "^3.0.0",
"request-promise": "^4.2.5",
"semver": "^6.0.0",
"sharp": "0.22.1",
"sharp": "0.24.1",
"source-map-support": "^0.5.6",
"tar": "^4.4.6",
"uuid": "^3.2.1",
"which": "^1.3.1"
},
"optionalDependencies": {
"@expo/traveling-fastlane-darwin": "1.9.9"
"@expo/traveling-fastlane-darwin": "1.11.4"
},
"volta": {
"node": "12.16.1",
"yarn": "1.22.0"
}
}
@@ -3,6 +3,8 @@
set -eo pipefail
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. && pwd )"
CONFIGURE_ANDROID_SDK_PATH="$ROOT_DIR/scripts/android/configureAndroidSdk.sh"
DOCKER_BASE_DIR="$ROOT_DIR/docker-base"
IMAGE_TAG="$1"
if [[ -z "$IMAGE_TAG" ]]; then
@@ -13,10 +15,12 @@ fi
IMAGE_VERSION_FULL_NAME="gcr.io/exponentjs/turtle-android-base:$IMAGE_TAG"
IMAGE_LATEST_FULL_NAME="gcr.io/exponentjs/turtle-android-base:latest"
pushd $ROOT_DIR > /dev/null
echo docker build -f docker-base/Dockerfile -t "$IMAGE_VERSION_FULL_NAME" -t "$IMAGE_LATEST_FULL_NAME" .
pushd $DOCKER_BASE_DIR > /dev/null
cp $CONFIGURE_ANDROID_SDK_PATH .
docker build -t "$IMAGE_VERSION_FULL_NAME" -t "$IMAGE_LATEST_FULL_NAME" .
echo "Successfully built $IMAGE_VERSION_FULL_NAME Docker image"
echo gcloud docker -- push "$IMAGE_VERSION_FULL_NAME"
echo gcloud docker -- push "$IMAGE_LATEST_FULL_NAME"
gcloud docker -- push "$IMAGE_VERSION_FULL_NAME"
gcloud docker -- push "$IMAGE_LATEST_FULL_NAME"
echo "Successfully pushed $IMAGE_VERSION_FULL_NAME Docker image to GCloud"
rm -rf `basename $CONFIGURE_ANDROID_SDK_PATH`
popd > /dev/null
+2
View File
@@ -18,3 +18,5 @@ yes | $SDKMANAGER \
"extras;android;m2repository" \
"extras;google;m2repository" \
"extras;google;google_play_services" | grep -v '='; [[ ${PIPESTATUS[1]} = 0 ]]
yes | $SDKMANAGER "ndk;17.2.4988734" | grep -v '='; [[ ${PIPESTATUS[1]} = 0 ]]
+1 -1
View File
@@ -14,7 +14,7 @@ PLATFORM=$1
yarn
yarn run build
if [ "$PLATFORM" = "android" ]; then
$ROOT_DIR/scripts/android/fetchRemoteAndroidTarball.sh
echo "shell apps will be fetched when building a Docker image"
elif [ "$PLATFORM" = "ios" ]; then
$ROOT_DIR/scripts/ios/fetchRemoteIosTarball.sh
fi
+7
View File
@@ -2,6 +2,8 @@
set -ueo pipefail
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. && pwd )"
export NODE_ENV=test
export ENVIRONMENT="development"
@@ -22,5 +24,10 @@ export API_PORT="443"
export REDIS_URL="noop"
export REDIS_CONFIG_URL="noop"
export DATADOG_DISABLED="true"
export TURTLE_SDK_VERSIONS_SECRET_TOKEN="noop"
pushd $ROOT_DIR/workingdir/android/${SDK_VERSION:-sdk37} >/dev/null 2>&1
yarn
popd >/dev/null 2>&1
yarn test:smoke:android
+2 -1
View File
@@ -20,8 +20,9 @@ export API_PORT="443"
export REDIS_URL="noop"
export REDIS_CONFIG_URL="noop"
export DATADOG_DISABLED="true"
export TURTLE_SDK_VERSIONS_SECRET_TOKEN="noop"
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. && pwd )"
SDK_VERSION=sdk32 $ROOT_DIR/scripts/ios/fetchRemoteIosTarball.sh
$ROOT_DIR/scripts/ios/fetchRemoteIosTarball.sh
yarn test:smoke:ios
+1
View File
@@ -22,5 +22,6 @@ export API_PORT="443"
export REDIS_URL="noop"
export REDIS_CONFIG_URL="noop"
export DATADOG_DISABLED="true"
export TURTLE_SDK_VERSIONS_SECRET_TOKEN="noop"
yarn test:unit
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/android-shell-builder-c19ce0d88a153f481fd790e23bdcd6f2d5ea7fd6.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/android-shell-builder-c19ce0d88a153f481fd790e23bdcd6f2d5ea7fd6.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/android-shell-builder-c19ce0d88a153f481fd790e23bdcd6f2d5ea7fd6.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/android-shell-builder-c19ce0d88a153f481fd790e23bdcd6f2d5ea7fd6.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/android-shell-builder-89b2d24c86737d5a489c6a18467e31b2f9ce9005.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/android-shell-builder-f796aaffa0b5715079b2950faf26c2ff4e53e4c0.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/android-shell-builder-aebd669d6573b0b3c802871d94cdb8b4116678d2.tar.gz
+1 -1
View File
@@ -1 +1 @@
s3://exp-artifacts/android-shell-builder-d1aabbbe9d124201bf453fa985c36324ae4b76fb.tar.gz
s3://exp-artifacts/android-shell-builder-a8e204610e5712391336b378f47962bbb0c04164.tar.gz
+1
View File
@@ -0,0 +1 @@
s3://exp-artifacts/android-shell-builder-7ce098f40cc82a2f61fed9f1f515d695a83c55b2.tar.gz
+1
View File
@@ -0,0 +1 @@
s3://exp-artifacts/android-shell-builder-bb08bdc180fccd8f90e99dafb4e0ac456232531b.tar.gz
+1
View File
@@ -0,0 +1 @@
s3://exp-artifacts/android-shell-builder-3cf3cf0707925322bcd667d5ba79120136f9afd8.tar.gz
+1 -1
View File
@@ -1 +1 @@
s3://exp-artifacts/ios-expo-client-e0616482703671fd084615e20cf3d612a87b9fc1.tar.gz
s3://exp-artifacts/ios-expo-client-aadfc350d8e4ebf8dce9ce08723bb7e07d563846.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/ios-shell-builder-sdk-27-db356a09877642d64023af98e4e2e1e632fbe4df.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/ios-shell-builder-sdk-28-db356a09877642d64023af98e4e2e1e632fbe4df.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/ios-shell-builder-sdk-29-db356a09877642d64023af98e4e2e1e632fbe4df.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/ios-shell-builder-sdk-30-6863276e6b9605e31228c845a047387571959e9b.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/ios-shell-builder-sdk-latest-55848298c7332f7586c4281fa691a4ca31548532.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/ios-shell-builder-sdk-latest-edd02214dd84368c197df32a2d30a901d6c766ff.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/ios-shell-builder-sdk-latest-7a0e6bb94bd3edb2bc2dc501d6c09ad6edccd1bb.tar.gz
+1 -1
View File
@@ -1 +1 @@
s3://exp-artifacts/ios-shell-builder-sdk-latest-e0616482703671fd084615e20cf3d612a87b9fc1.tar.gz
s3://exp-artifacts/ios-shell-builder-sdk-latest-651588ff3445a5d87b3a5b81ec2977c02b22f3a2.tar.gz
+1
View File
@@ -0,0 +1 @@
s3://exp-artifacts/ios-shell-builder-sdk-latest-0115c48ddac4f63e5215541dff804871ef8c1e03.tar.gz
+1
View File
@@ -0,0 +1 @@
s3://exp-artifacts/ios-shell-builder-sdk-latest-661a51216c2241dcfdd930517968cd1d0e0ee237.tar.gz
+1
View File
@@ -0,0 +1 @@
s3://exp-artifacts/ios-shell-builder-sdk-latest-30eb0558ff6a77acf56bb045e98b84f6a5e1478a.tar.gz
@@ -1 +1 @@
[{"scope":"https://sqs.us-west-2.amazonaws.com:443","method":"POST","path":"/","body":"Action=ReceiveMessage&MaxNumberOfMessages=1&QueueUrl=https%3A%2F%2Fsqs.us-west-2.amazonaws.com%2F274251141632%2Fturtle_jobs_local_dominik_android_in_priority.fifo&Version=2012-11-05&VisibilityTimeout=30","status":200,"response":"<?xml version=\"1.0\"?><ReceiveMessageResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\"><ReceiveMessageResult><Message><MessageId>fc2fe53d-1447-4304-90e0-60b025ac9687</MessageId><ReceiptHandle>AQEBcOA9S4yhL3ZCaho9Cv+XVqJEbhOaaWJTsOvBD9SOa/NK/248s0+yI9bHro5Ti9WJrnD3H65SdK9eOETFeS/QDaaCMTYkxjvH/1DrSJt2rAptgItmxl8F6N3iDYLqplOQjmautdjCWYXrCLxMDihMHEjcvWNAq0XLAAjlQJvtm5Z8Vji5xXKJP3IpQOV2DvhS/Cqriteaqe6NW5xKwgKHOC52IVTPMSHiJ0ERUf55agntOOJJ7Za7vHdTr+Zjrxl6yVFWKC/cpwYI00OKGj4bArud0buiaD0rtjszLmcPgcwADRsmhfG65p3gLwIwjfclHqSLlmcuY3c+xsu/5VM1YA==</ReceiptHandle><MD5OfBody>c9e8a99bf73407dfa26a2cb81103c26a</MD5OfBody><Body>{&quot;id&quot;:&quot;b9f9f814-5603-4dd5-929d-c9eed756c591&quot;,&quot;experienceId&quot;:&quot;531b2db0-4b14-11e9-92d6-95aebd1034a3&quot;,&quot;experienceName&quot;:&quot;@dsokal-local/turtle-cli-example&quot;,&quot;platform&quot;:&quot;android&quot;,&quot;config&quot;:{&quot;releaseChannel&quot;:&quot;default&quot;},&quot;status&quot;:&quot;sent-to-queue&quot;,&quot;sdkVersion&quot;:&quot;32.0.0&quot;,&quot;accountId&quot;:&quot;4c44c9d8-3cb6-4980-8505-ca0637cf3165&quot;,&quot;priority&quot;:&quot;high&quot;,&quot;credentials&quot;:{&quot;keystore&quot;:&quot;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&quot;,&quot;keyPassword&quot;:&quot;fb7409988d78459c826cf2a438cb3a33&quot;,&quot;keystoreAlias&quot;:&quot;QGRzb2thbC1sb2NhbC90dXJ0bGUtY2xpLWV4YW1wbGU=&quot;,&quot;keystorePassword&quot;:&quot;80c3583b33b84a1d91e5cf33b2421d7c&quot;},&quot;manifest&quot;:{&quot;android&quot;:{&quot;package&quot;:&quot;com.expo.turtle.cli.example&quot;},&quot;bundledAssets&quot;:[&quot;asset_3a2ba31570920eeb9b1d217cabe58315.ttf&quot;,&quot;asset_744ce60078c17d86006dd0edabcd59a7.ttf&quot;,&qLine truncated
[{"scope":"https://sqs.us-west-2.amazonaws.com:443","method":"POST","path":"/","body":"Action=ReceiveMessage&MaxNumberOfMessages=1&QueueUrl=https%3A%2F%2Fsqs.us-west-2.amazonaws.com%2F274251141632%2Fturtle_jobs_local_dominik_android_in.fifo&Version=2012-11-05&VisibilityTimeout=30","status":200,"response":"<?xml version=\"1.0\"?><ReceiveMessageResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\"><ReceiveMessageResult/><ResponseMetadata><RequestId>2f9926f3-9db4-588e-a00a-71f445522996</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","2f9926f3-9db4-588e-a00a-71f445522996","Date","Wed, 08 Apr 2020 13:50:35 GMT","Content-Type","text/xml","Content-Length","240"]},{"scope":"https://sqs.us-west-2.amazonaws.com:443","method":"POST","path":"/","body":"Action=ReceiveMessage&MaxNumberOfMessages=1&QueueUrl=https%3A%2F%2Fsqs.us-west-2.amazonaws.com%2F274251141632%2Fturtle_jobs_local_dominik_android_in_priority.fifo&Version=2012-11-05&VisibilityTimeout=30","status":200,"response":"<?xml version=\"1.0\"?><ReceiveMessageResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\"><ReceiveMessageResult/><ResponseMetadata><RequestId>e42b6179-9846-5d83-9209-367e40aa9c02</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","e42b6179-9846-5d83-9209-367e40aa9c02","Date","Wed, 08 Apr 2020 13:50:41 GMT","Content-Type","text/xml","Content-Length","240"]},{"scope":"https://sqs.us-west-2.amazonaws.com:443","method":"POST","path":"/","body":"Action=ReceiveMessage&MaxNumberOfMessages=1&QueueUrl=https%3A%2F%2Fsqs.us-west-2.amazonaws.com%2F274251141632%2Fturtle_jobs_local_dominik_android_in.fifo&Version=2012-11-05&VisibilityTimeout=30","status":200,"response":"<?xml version=\"1.0\"?><ReceiveMessageResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\"><ReceiveMessageResult><Message><MessageId>093d5a52-932c-4141-958a-4ee8146dadab</MessageId><ReceiptHandle>AQEBq2BDKWkc+YFuyL+qBVQ6RCqne9ndyzDri6BeHTv+HhCU3kOlINEzzqbgrGJXh49AB6lVInGNsI+uc5uMhC61UscDKfFeqgfhDDUftovz6RXwiIj+xRalgP5fPZn94LbY4KmUoCuGCpXu9UlGxOoorYTkLft9AVY6kabCRlXA8SJzzYjUb1s+rtBoWS3Trj/AOIxOy0EqxeEWpBsNKc1yWc9RNbZ8/qABFLMjOzdmr5gaLEDoRJTUZZUEu9TVOxrC54ES+UaCmgVY17Ubmwo884GbHLoyUA+xqSD0Cvify5GCv3xzB+wjB4gGdGUFdOjj</ReceiptHandle><MD5OfBody>f0cb57fa399d2c8e81f8423e93127bdc</MD5OfBody><Body>{&quot;id&quot;:&quot;1b148a0a-4a5e-4572-b28a-c31aa018351a&quot;,&quot;experienceId&quot;:&quot;0128bca1-78cf-4cb8-ac00-c07600500254&quot;,&quot;experienceName&quot;:&quot;@dsokal-local/turtle-cli-example&quot;,&quot;platform&quot;:&quot;android&quot;,&quot;config&quot;:{&quot;releaseChannel&quot;:&quot;default&quot;,&quot;buildType&quot;:&quot;apk&quot;},&quot;status&quot;:&quot;sent-to-queue&quot;,&quot;sdkVersion&quot;:&quot;37.0.0&quot;,&quot;accountId&quot;:&quot;9b473c78-6d0e-4b69-88a8-1c0960287b2f&quot;,&quot;priority&quot;:&quot;normal&quot;,&quot;credentials&quot;:{&quot;keystore&quot;:&quot;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 truncated
Binary file not shown.
+1 -1
View File
@@ -15,7 +15,7 @@ function setCommonCommandOptions(cmd: any) {
.option('-o --output <output-file-path>', 'output file path')
.option(
'--public-url <url>',
'the URL of an externally hosted manifest (for self-hosted apps).',
'the URL of an externally hosted manifest (for self-hosted apps), only HTTPS URLs are supported!',
)
.option(
'--release-channel <channel-name>',
+23 -8
View File
@@ -5,7 +5,6 @@ import { ExponentTools } from '@expo/xdl';
import fs from 'fs-extra';
import _which from 'which';
import ensureAndroidNDKIsPresent from 'turtle/bin/setup/android/ndk';
import ensureAndroidSDKIsPresent from 'turtle/bin/setup/android/sdk';
import { checkSystem, ensureShellAppIsPresent } from 'turtle/bin/setup/utils/common';
import { IToolDefinition } from 'turtle/bin/setup/utils/toolsDetector';
@@ -15,6 +14,7 @@ import { PLATFORMS } from 'turtle/constants';
import logger from 'turtle/logger';
const which = util.promisify(_which);
const JAVA_REQUIRED_VERSION = 8;
const REQUIRED_TOOLS: IToolDefinition[] = [
{
command: 'bash',
@@ -22,16 +22,30 @@ const REQUIRED_TOOLS: IToolDefinition[] = [
},
{
command: 'javac',
missingDescription: 'Please install JDK (version 8 or newer) - check https://jdk.java.net/',
missingDescription:
`Please install JDK 8 - keep in mind that other versions are not supported by Android`,
testFn: async () => {
const { status, stdout } = await ExponentTools.spawnAsyncThrowError(
'javac',
const { status, stdout, stderr } = await ExponentTools.spawnAsyncThrowError(
'java',
['-version'],
{ stdio: 'pipe' },
);
if (stdout.match(/no java runtime present/i)) {
return false;
}
const matchResult = stderr.match(/.*version "(.*)"/);
if (matchResult) {
const [, currentFullJavaVersion] = matchResult;
const javaMajorVersionPosition = currentFullJavaVersion.startsWith('1.') ? 1 : 0;
const javaMajorVersion = Number(currentFullJavaVersion.split('.')[javaMajorVersionPosition]);
if (javaMajorVersion !== JAVA_REQUIRED_VERSION) {
throw new Error(`You're on Java ${currentFullJavaVersion}, please install version ${JAVA_REQUIRED_VERSION}`);
}
} else {
logger.warn(`Couldn't find Java version number, assuming you're on Java ${JAVA_REQUIRED_VERSION}...`);
}
return status === 0;
},
},
@@ -54,9 +68,8 @@ export default async function setup(sdkVersion?: string) {
async function prepareAndroidEnv() {
await fs.ensureDir(config.directories.androidDependenciesDir);
const sdkConfig = await ensureAndroidSDKIsPresent();
const ndkConfig = await ensureAndroidNDKIsPresent();
_setEnvVars({ ...sdkConfig.envVars, ...ndkConfig.envVars });
_alterPath([...sdkConfig.path, ...sdkConfig.path]);
_setEnvVars(sdkConfig.envVars);
_alterPath(sdkConfig.path);
}
function formatShellAppTarballUriPath(sdkMajorVersion: string) {
@@ -88,7 +101,9 @@ async function _shellAppPostDownloadAction(sdkVersion: string, workingdir: strin
async function _installNodeModules(cwd: string) {
l.info(`installing dependencies in ${cwd} directory...`);
const command = await _shouldUseYarnOrNpm();
await ExponentTools.spawnAsyncThrowError(command, ['install'], {
// Keep in sync with /Dockerfile
// --prod requires --ignore-scripts (otherwise expo-yarn-workspaces errors as missing)
await ExponentTools.spawnAsyncThrowError(command, ['install', '--ignore-scripts', '--production'], {
pipeToLogger: true,
loggerFields: LOGGER_FIELDS,
cwd,
-53
View File
@@ -1,53 +0,0 @@
import os from 'os';
import path from 'path';
import decompress from 'decompress';
import fs from 'fs-extra';
import * as utils from 'turtle/bin/setup/utils/common';
import download from 'turtle/bin/setup/utils/downloader';
import config from 'turtle/config';
import logger from 'turtle/logger';
const ANDROID_NDK_URL = `https://dl.google.com/android/repository/android-ndk-r10e-${os.platform()}-x86_64.zip`;
const LOGGER_FIELDS = { buildPhase: 'setting up environment' };
const l = logger.child(LOGGER_FIELDS);
export default async function ensureAndroidNDKIsPresent() {
const androidNdkDir = path.join(config.directories.androidDependenciesDir, 'ndk');
await utils.removeDirectoryUnlessReady(androidNdkDir);
if (!(await fs.pathExists(androidNdkDir))) {
await fs.ensureDir(androidNdkDir);
const androidNdkDownloadPath = utils.formatArtifactDownloadPath(ANDROID_NDK_URL);
try {
l.info('Downloading Android NDK');
await fs.ensureDir(config.directories.artifactsDir);
await download(ANDROID_NDK_URL, androidNdkDownloadPath);
l.info('Decompressing Android NDK');
await decompress(androidNdkDownloadPath, androidNdkDir, { strip: 1 });
await utils.markDirectoryAsReady(androidNdkDir);
l.info('Android NDK installed successfully');
} catch (err) {
await fs.remove(androidNdkDir);
throw err;
} finally {
await fs.remove(androidNdkDownloadPath);
}
}
return {
envVars: _createEnvVars(androidNdkDir),
path: _createPaths(androidNdkDir),
};
}
function _createEnvVars(androidNdkDir: string) {
return {
ANDROID_NDK: androidNdkDir,
};
}
function _createPaths(androidNdkDir: string) {
return [androidNdkDir];
}
+34 -6
View File
@@ -1,3 +1,6 @@
import _url from 'url';
import { ConfigError, getExpoSDKVersion } from '@expo/config';
import { ExponentTools } from '@expo/xdl';
import _ from 'lodash';
import uuid from 'uuid';
@@ -54,21 +57,29 @@ export function createBuilderAction({
);
}
if (cmd.publicUrl) {
const parsedPublicUrl = _url.parse(cmd.publicUrl);
if (parsedPublicUrl.protocol !== 'https:') {
throw new ErrorWithCommandHelp('--public-url is invalid - only HTTPS urls are supported');
}
}
const projectAbsoluteDir = ProjectUtils.resolveAbsoluteDir(projectDirArg);
const args = {
releaseChannel: cmd.releaseChannel || 'default',
buildType: cmd.type,
buildMode: cmd.mode,
username: userData.username || 'anonymous',
projectDir: ProjectUtils.resolveAbsoluteDir(projectDirArg),
projectDir: projectAbsoluteDir,
publicUrl: cmd.publicUrl,
};
const appJSON = await ProjectUtils.loadAppJSON(projectDirArg, cmd.config);
const sdkVersion = _.get(appJSON, 'expo.sdkVersion');
const sdkVersion = getExpoSDKVersionSafely(projectAbsoluteDir, appJSON);
await setup(platform, sdkVersion);
const credentials = await prepareCredentials(cmd);
const rawJob = {
...await buildJobObject(platform, appJSON, args, credentials),
...await buildJobObject(platform, appJSON, args, credentials, sdkVersion),
...cmd.buildDir && { fakeUploadDir: ProjectUtils.resolveAbsoluteDir(cmd.buildDir) },
...cmd.output && { fakeUploadBuildPath: ProjectUtils.resolveAbsoluteDir(cmd.output) },
};
@@ -86,12 +97,29 @@ export function createBuilderAction({
};
}
function getExpoSDKVersionSafely(projectDir: string, appJSON?: any) {
try {
return getExpoSDKVersion(projectDir, appJSON && appJSON.expo);
} catch (err) {
if (err instanceof ConfigError) {
throw new Error(
'Couldn\'t find the `expo` library in your project\'s dependencies.'
+ ' Have you run \'yarn install\' or \'npm install\' for your project?',
);
} else {
throw err;
}
}
}
const buildJobObject = async (
platform: 'android' | 'ios',
appJSON: any,
{ releaseChannel, buildType, buildMode, username, publicUrl, projectDir }: any,
credentials: any,
sdkVersion: string,
) => {
const experienceName = `@${_.get(appJSON, 'expo.owner', username)}/${_.get(appJSON, 'expo.slug')}`;
const job = {
config: {
..._.get(appJSON, `expo.${platform}.config`, {}),
@@ -105,14 +133,14 @@ const buildJobObject = async (
id: uuid.v4(),
platform,
projectDir,
sdkVersion: _.get(appJSON, 'expo.sdkVersion'),
experienceName: `@${username}/${_.get(appJSON, 'expo.slug')}`,
sdkVersion,
experienceName,
...(credentials && { credentials }),
};
const url = getExperienceUrl(job.experienceName, job.config.publicUrl);
const manifest = await ExponentTools.getManifestAsync(url, {
'Exponent-SDK-Version': _.get(appJSON, 'expo.sdkVersion'),
'Exponent-SDK-Version': sdkVersion,
'Exponent-Platform': platform,
'Expo-Release-Channel': releaseChannel,
'Accept': 'application/expo+json,application/json',
+14 -10
View File
@@ -3,7 +3,6 @@ import path from 'path';
import { AndroidShellApp, ImageUtils } from '@expo/xdl';
import fs from 'fs-extra';
import _ from 'lodash';
import semver from 'semver';
import { ANDROID_BUILD_TYPES } from 'turtle/constants';
import uuidv4 from 'uuid/v4';
@@ -11,7 +10,7 @@ import getOrCreateCredentials from 'turtle/builders/utils/android/credentials';
import { formatShellAppDirectory } from 'turtle/builders/utils/android/workingdir';
import * as commonUtils from 'turtle/builders/utils/common';
import * as imageHelpers from 'turtle/builders/utils/image';
import { resolveExplicitOptIn } from 'turtle/builders/utils/unimodules';
import { resolveExplicitOptIn, resolveNativeModules } from 'turtle/builders/utils/unimodules';
import { uploadBuildToS3 } from 'turtle/builders/utils/uploader';
import { ensureCanBuildSdkVersion } from 'turtle/builders/utils/version';
import config from 'turtle/config';
@@ -27,7 +26,7 @@ export default async function buildAndroid(jobData: IJob): Promise<IJobResult> {
const s3FileExtension = jobData.config.buildType === ANDROID_BUILD_TYPES.APP_BUNDLE ? 'aab' : 'apk';
const s3Filename = `${jobData.experienceName}-${randomHex}-signed.${s3FileExtension}`;
const s3FileKey = `android/${s3Filename}`;
const fakeUploadFilename = s3Filename.replace('/', '\\');
const fakeUploadFilename = s3Filename.replace('/', '__');
const artifactUrl = await uploadBuildToS3({
uploadPath: outputFilePath,
@@ -73,15 +72,20 @@ async function runShellAppBuilder(
const sdkVersion = _.get(manifest, 'sdkVersion', sdkVersionFromJob);
const workingDir = formatShellAppDirectory({ sdkVersion });
// (2019-07-31) We are explicitly choosing to disable this option until we have more
// infrastructure/tooling built around optional modules and OTA updates, as right now it's
// very easy for developers to break apps in production with optional modules.
// Default behaviour:
// - load all modules except [expo-branch]
// - load expo-branch only if present in package.json dependencies
//
// to enable full resolver switch resolveExplicitOptIn to resolveNativeModules
// Behaviour with "enableDangerousExperimentalLeanBuilds" flag enabled
// - add unimodules from `manifest.dependencies` (project package.json dependecies)
// - add unimodules from react-native-unimodules package.json
// - add unimodules from expo package package.json
// - add recusively all dependecies of already added unimodules
logger.info({ buildPhase: 'resolve native modules' }, 'Resolving universal modules dependencies');
const enabledModules = semver.satisfies(sdkVersion, '>= 33.0.0')
? await resolveExplicitOptIn(workingDir, _.get(manifest, 'dependencies'))
: null;
const packageJsonDependecies = _.get(manifest, 'dependencies');
const enabledModules = _.get(manifest, 'android.enableDangerousExperimentalLeanBuilds')
? await resolveNativeModules(workingDir, packageJsonDependecies)
: await resolveExplicitOptIn(workingDir, packageJsonDependecies);
try {
await AndroidShellApp.createAndroidShellAppAsync({
+1 -1
View File
@@ -131,7 +131,7 @@ export function createBuilderContext(job: IJob): IContext {
const s3FileExtension = buildType === IOS_BUILD_TYPES.SIMULATOR ? 'tar.gz' : 'ipa';
const s3Filename = `${job.experienceName}-${appUUID}-${buildType}.${s3FileExtension}`;
if (config.builder.fakeUpload) {
const fakeUploadFilename = s3Filename.replace('/', '\\');
const fakeUploadFilename = s3Filename.replace('/', '__');
context.fakeUploadBuildPath = job.fakeUploadBuildPath
? job.fakeUploadBuildPath
: join(job.fakeUploadDir || config.directories.fakeUploadDir, fakeUploadFilename);
+1 -1
View File
@@ -61,4 +61,4 @@ async function cleanup(ctx: IContext) {
}
const getTemporaryDirs = (ctx: IContext) =>
Object.values(pick(ctx, ['appDir', 'provisioningProfileDir']));
Object.values(pick(ctx, ['appDir', 'provisioningProfileDir'])) as string[];
@@ -36,6 +36,7 @@ export default async function runShellAppBuilder(ctx: IContext, job: IJob): Prom
manifest,
output: ctx.outputPath,
verbose: true,
shellAppSdkVersion: sdkVersion,
};
if (buildType === IOS_BUILD_TYPES.CLIENT) {
Object.assign(shellAppParams, {
+3
View File
@@ -89,4 +89,7 @@ export default {
path.join(os.platform() === 'darwin' ? '/private' : '/', 'tmp', 'turtle'),
),
},
www: {
sdkVersionsSecretToken: env('TURTLE_SDK_VERSIONS_SECRET_TOKEN'),
},
};
+32 -16
View File
@@ -10,7 +10,7 @@ import logger from 'turtle/logger';
import * as buildDurationMetric from 'turtle/metrics/buildDuration';
import * as buildStatusMetric from 'turtle/metrics/buildStatus';
import { checkShouldExit, setCurrentJobId, turtleVersion } from 'turtle/turtleContext';
import { getPriorities } from 'turtle/utils/priorities';
import { getPriorities, labelConfiguration, TurtleMode } from 'turtle/utils/priorities';
import * as redis from 'turtle/utils/redis';
import { sanitizeJob } from 'turtle/validator';
@@ -22,8 +22,8 @@ function _maybeExit() {
}
export async function doJob() {
const jobData = await getJob();
await processJob(jobData);
const { job, turtleMode } = await getJob();
await processJob(job, turtleMode);
_maybeExit();
}
@@ -34,6 +34,7 @@ export async function getJob() {
try {
let job = null;
const priorities = await getPriorities();
const turtleMode = labelConfiguration(priorities);
for (const priority of priorities) {
job = await sqs.receiveMessage(priority);
_maybeExit();
@@ -44,7 +45,7 @@ export async function getJob() {
}
_maybeExit();
if (job !== null) {
return job;
return { job, turtleMode };
}
} catch (err) {
logger.error({ err }, 'Error at receiving messages');
@@ -52,23 +53,37 @@ export async function getJob() {
}
}
async function processJob(jobData: any) {
async function processJob(jobData: any, turtleMode: TurtleMode) {
const receiptHandle = jobData.ReceiptHandle;
const { priority } = jobData;
let timeoutId;
try {
const rawJob = JSON.parse(jobData.Body);
timeoutId = failAfterMaxJobTime(priority, receiptHandle, rawJob);
const job = await sanitizeJob(rawJob);
let rawJob;
let job;
try {
rawJob = JSON.parse(jobData.Body);
timeoutId = failAfterMaxJobTime(priority, receiptHandle, rawJob);
logger.info(
{ buildJobId: rawJob.id, messageId: jobData.MessageId },
`Processing job with priority=${priority.slice(0, priority.length - 8)} timestamp=${Date.now()}`,
);
job = await sanitizeJob(rawJob);
} catch (err) {
logger.error({ err, ...rawJob && { buildJobId: rawJob.id } }, 'The build job is invalid');
// send message only if we've managed to parse the job json
if (rawJob) {
await sqs.sendMessage(rawJob.id, BUILD.JOB_STATES.ERRORED, {
turtleVersion,
buildDuration: 0,
reason: 'The build job is invalid',
});
}
throw err;
}
setCurrentJobId(job.id);
const pingerHandle = sqs.changeMessageVisibilityRecurring(priority, jobData.ReceiptHandle, job.id);
logger.info(
`Doing job MessageId=${jobData.MessageId} BuildId=${job.id} `
+ `Priority=${priority.slice(0, priority.length - 8)} ${Date.now()}`,
);
const cancelled = await redis.checkIfCancelled(job.id);
if (cancelled) {
logger.info('The job has been cancelled');
@@ -78,7 +93,7 @@ async function processJob(jobData: any) {
let buildFailed = false;
const buildType = _.get(job, 'config.buildType', 'default');
try {
const status = await build(job);
const status = await build(job, turtleMode);
buildStatusMetric.add(buildType, priority, status);
buildFailed = !status;
} catch (err) {
@@ -123,7 +138,7 @@ function failAfterMaxJobTime(priority: string, receiptHandle: string, job: any)
}, config.builder.maxJobTimeMs);
}
async function build(job: any) {
async function build(job: any, turtleMode: TurtleMode) {
const startTimestamp = Date.now();
const s3Url = await logger.initForJob(job);
const calculateBuildDuration = () => Math.ceil((Date.now() - startTimestamp) / 1000);
@@ -132,6 +147,7 @@ async function build(job: any) {
await sqs.sendMessage(job.id, BUILD.JOB_STATES.IN_PROGRESS, {
logUrl: s3Url,
logFormat: 'json',
turtleMode,
});
const result = await (builders as any)[job.platform](job);
const buildDuration = calculateBuildDuration();
-1
View File
@@ -1,4 +1,3 @@
import EventEmitter from 'events';
import path from 'path';
+12 -12
View File
@@ -5,11 +5,11 @@ import take from 'lodash/take';
import logger from 'turtle/logger';
import { sendMetric } from 'turtle/metrics/datadog';
import { getReplicaCount } from 'turtle/utils/metadata';
import { getLabeledConfiguration, TurtleModeLabels } from 'turtle/utils/priorities';
import { getLabeledConfiguration, TurtleMode } from 'turtle/utils/priorities';
const createMetricName = () => `turtle.replicaCount`;
const createModeMetricName = (mode: TurtleModeLabels) => `${createMetricName()}.${mode}`;
const createModeTag = (mode: TurtleModeLabels) => `mode:${mode}`;
const createModeMetricName = (mode: TurtleMode) => `${createMetricName()}.${mode}`;
const createModeTag = (mode: TurtleMode) => `mode:${mode}`;
export default async function sendConfigToDatadog() {
let configuration;
@@ -30,28 +30,28 @@ export default async function sendConfigToDatadog() {
const metricName = createMetricName();
const normalReplicaCount = replicaCounts[TurtleModeLabels.Normal] || 0;
const highReplicaCount = replicaCounts[TurtleModeLabels.High] || 0;
const highOnlyReplicaCount = replicaCounts[TurtleModeLabels.HighOnly] || 0;
const normalReplicaCount = replicaCounts[TurtleMode.Normal] || 0;
const highReplicaCount = replicaCounts[TurtleMode.High] || 0;
const highOnlyReplicaCount = replicaCounts[TurtleMode.HighOnly] || 0;
const normalTag = createModeTag(TurtleModeLabels.Normal);
const normalMetricName = createModeMetricName(TurtleModeLabels.Normal);
const normalTag = createModeTag(TurtleMode.Normal);
const normalMetricName = createModeMetricName(TurtleMode.Normal);
logger.debug(
`Sending ${metricName}=${normalReplicaCount} (${normalTag}), ${normalMetricName}=${normalReplicaCount} to Datadog`,
);
await sendMetric(metricName, normalReplicaCount, [normalTag]);
await sendMetric(normalMetricName, normalReplicaCount);
const highTag = createModeTag(TurtleModeLabels.High);
const highMetricName = createModeMetricName(TurtleModeLabels.High);
const highTag = createModeTag(TurtleMode.High);
const highMetricName = createModeMetricName(TurtleMode.High);
logger.debug(
`Sending ${metricName}=${highReplicaCount} (${highTag}), ${highMetricName}=${highReplicaCount} to Datadog`,
);
await sendMetric(metricName, highReplicaCount, [highTag]);
await sendMetric(highMetricName, highReplicaCount);
const highOnlyTag = createModeTag(TurtleModeLabels.HighOnly);
const highOnlyMetricName = createModeMetricName(TurtleModeLabels.HighOnly);
const highOnlyTag = createModeTag(TurtleMode.HighOnly);
const highOnlyMetricName = createModeMetricName(TurtleMode.HighOnly);
logger.debug(
`Sending ${metricName}=${highOnlyReplicaCount} (${highOnlyTag}),`
+ ` ${highOnlyMetricName}=${highOnlyReplicaCount} to Datadog`,
+8 -16
View File
@@ -6,10 +6,7 @@ import { doJob } from 'turtle/jobManager';
import logger from 'turtle/logger';
import setup from 'turtle/setup';
import { checkShouldExit, setShouldExit, turtleVersion } from 'turtle/turtleContext';
import { getRedisClient } from 'turtle/utils/redis';
const REDIS_TURTLE_VERSION_KEY = 'turtle:version';
const REDIS_TURTLE_SUPPORTED_SDK_VERSIONS_KEY = `turtle:${config.platform}:sdkVersions`;
import { setSupportedSdkVersions, setTurtleVersion } from 'turtle/utils/versions';
process.on('unhandledRejection', (err) => logger.error({ err }, 'Unhandled promise rejection'));
@@ -37,25 +34,20 @@ async function main() {
}
try {
const redis = await getRedisClient();
if (redis) {
await redis.set(REDIS_TURTLE_VERSION_KEY, turtleVersion);
logger.info(`Registered Turtle version (${turtleVersion}) in Redis`);
const sdkVersions = (await findSupportedSdkVersions(config.platform)).join(',');
await redis.set(REDIS_TURTLE_SUPPORTED_SDK_VERSIONS_KEY, sdkVersions);
logger.info(`Registered supported SDK versions (${sdkVersions}) in Redis`);
} else {
logger.warn('Couldn\'t set supported SDK versions in Redis (failed to connect to Redis)');
}
await setTurtleVersion(turtleVersion);
logger.info(`Registered Turtle version (${turtleVersion}) in www`);
const sdkVersions = (await findSupportedSdkVersions(config.platform)).map((version) => `${version}.0.0`);
await setSupportedSdkVersions(config.platform, sdkVersions);
logger.info(`Registered supported SDK versions (${sdkVersions}) in www`);
} catch (err) {
logger.error({ err }, 'Failed to set versions in Redis');
logger.error({ err }, 'Failed to register versions in www');
}
while (true) {
try {
await doJob();
} catch (err) {
logger.error({ err }, 'Failed to do a job');
logger.error({ err }, 'Failed to process a job');
}
}
}
+12 -10
View File
@@ -9,7 +9,7 @@ import { getRedisClient, RedisClient } from 'turtle/utils/redis';
export const NORMAL = 'normalPriority';
export const HIGH = 'highPriority';
export enum TurtleModeLabels {
export enum TurtleMode {
Normal = 'normal',
High = 'high',
HighOnly = 'highOnly',
@@ -100,13 +100,15 @@ async function getConfiguration(currentRedisClient: any) {
export async function getLabeledConfiguration(currentRedisClient?: any) {
const configuration = await getConfiguration(currentRedisClient);
return configuration.map((i: string[]) => {
if (isEqual(i, NORMAL_CONFIGURATION)) {
return TurtleModeLabels.Normal;
} else if (isEqual(i, HIGH_CONFIGURATION)) {
return TurtleModeLabels.High;
} else {
return TurtleModeLabels.HighOnly;
}
});
return configuration.map((i: string[]) => labelConfiguration(i));
}
export function labelConfiguration(configuration: string[]): TurtleMode {
if (isEqual(configuration, NORMAL_CONFIGURATION)) {
return TurtleMode.Normal;
} else if (isEqual(configuration, HIGH_CONFIGURATION)) {
return TurtleMode.High;
} else {
return TurtleMode.HighOnly;
}
}
+49
View File
@@ -0,0 +1,49 @@
import { URL } from 'url';
import request from 'request-promise';
import config from 'turtle/config';
async function setSupportedSdkVersions(platform: string, sdkVersions: string[]) {
const { href } = new URL('/--/api/v2/standalone-build/setSupportedSDKVersions', resolveWWWEndpoint());
await request({
method: 'POST',
uri: href,
headers: {
'secret-token': config.www.sdkVersionsSecretToken,
},
body: {
platform,
sdkVersions,
},
json: true,
});
}
async function setTurtleVersion(version: string) {
const { href } = new URL('/--/api/v2/standalone-build/setTurtleVersion', resolveWWWEndpoint());
await request({
method: 'POST',
uri: href,
headers: {
'secret-token': config.www.sdkVersionsSecretToken,
},
body: {
version,
},
json: true,
});
}
function resolveWWWEndpoint() {
const currentEnv = config.deploymentEnv;
if (currentEnv === 'production') {
return 'https://expo.io';
} else if (currentEnv === 'staging') {
return 'https://staging.expo.io';
} else {
return 'http://127.0.0.1:3000';
}
}
export { setSupportedSdkVersions, setTurtleVersion };
+3
View File
@@ -2,6 +2,9 @@ import * as schemas from 'turtle/jobsSchemas';
export async function sanitizeJob(job: any) {
const schema = (schemas as any)[job.platform];
if (!schema) {
throw new Error(`Unsupported platform: ${job.platform}`);
}
const { error, value } = schema.validate(job, { stripUnknown: true });
if (error) {
throw error;
+1 -1
View File
@@ -1,3 +1,3 @@
#! /usr/bin/env bash
# This file was generated by nix-binstubs
exec nix run -f "$(dirname "$0")/../../../nix" nodejs-8_x --command node "$@"
exec nix run -f "$(dirname "$0")/../../../nix" nodejs-12_x --command node "$@"
+1 -1
View File
@@ -1,3 +1,3 @@
#! /usr/bin/env bash
# This file was generated by nix-binstubs
exec nix run -f "$(dirname "$0")/../../../nix" nodejs-8_x --command npm "$@"
exec nix run -f "$(dirname "$0")/../../../nix" nodejs-12_x --command npm "$@"
+1 -1
View File
@@ -1,3 +1,3 @@
#! /usr/bin/env bash
# This file was generated by nix-binstubs
exec nix run -f "$(dirname "$0")/../../../nix" nodejs-8_x --command npx "$@"
exec nix run -f "$(dirname "$0")/../../../nix" nodejs-12_x --command npx "$@"
+4395 -2609
View File
File diff suppressed because it is too large. Load diff