mirror of
https://github.com/expo/turtle.git
synced 2026-11-14 19:12:55 -10:00
Compare commits
51
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3b0d9894a | ||
|
|
edc712d820 | ||
|
|
23c3e3509c | ||
|
|
406a3be4f1 | ||
|
|
dd60721270 | ||
|
|
469ead8df8 | ||
|
|
aa0ce81e98 | ||
|
|
dccccb7716 | ||
|
|
57f8404b6d | ||
|
|
ba7309bc4b | ||
|
|
4aec3d5ba7 | ||
|
|
d2eb447ebc | ||
|
|
f177cf4d7f | ||
|
|
59a181dee0 | ||
|
|
f4bf860a9a | ||
|
|
932958ad46 | ||
|
|
2a54b4578a | ||
|
|
7e234d09a3 | ||
|
|
5b22c351bf | ||
|
|
e2020f1ab4 | ||
|
|
c935e53e50 | ||
|
|
14e681f35f | ||
|
|
d3a7ccb582 | ||
|
|
62478de14a | ||
|
|
6594089779 | ||
|
|
11c5d3ee02 | ||
|
|
99b7ac6660 | ||
|
|
46fe34ed9c | ||
|
|
423fc8bbf5 | ||
|
|
4c8408a46b | ||
|
|
032d7c8b1f | ||
|
|
b2a0b3ce14 | ||
|
|
1ee922763e | ||
|
|
c31cd379c1 | ||
|
|
67754eba2a | ||
|
|
351fed00df | ||
|
|
487032b11d | ||
|
|
042dd2ccab | ||
|
|
99ae0d1cea | ||
|
|
ad2c87163b | ||
|
|
b4b9cf362e | ||
|
|
7ea4dac986 | ||
|
|
cd8da71711 | ||
|
|
2a2a0f39e0 | ||
|
|
fbabcdf521 | ||
|
|
0803811226 | ||
|
|
0976a642e1 | ||
|
|
16bd4fe7b6 | ||
|
|
3ccd705943 | ||
|
|
11cc4421dd | ||
|
|
32f5a0bb37 |
No files matched your search
@@ -164,7 +164,7 @@ commands:
|
||||
default: ios
|
||||
sdk_version:
|
||||
type: string
|
||||
default: sdk37
|
||||
default: sdk39
|
||||
steps:
|
||||
- restore_cache:
|
||||
key: "workingdir-v2-<< parameters.platform >>-<< parameters.sdk_version >>"
|
||||
@@ -179,7 +179,7 @@ commands:
|
||||
default: ios
|
||||
sdk_version:
|
||||
type: string
|
||||
default: sdk37
|
||||
default: sdk39
|
||||
steps:
|
||||
- save_cache:
|
||||
key: "workingdir-v2-<< parameters.platform >>-<< parameters.sdk_version >>"
|
||||
@@ -238,14 +238,14 @@ jobs:
|
||||
- save_yarn_cache:
|
||||
platform: darwin
|
||||
- restore_workingdir_cache:
|
||||
sdk_version: sdk37
|
||||
sdk_version: sdk39
|
||||
platform: ios
|
||||
- run:
|
||||
name: Run iOS smoke tests
|
||||
command: SDK_VERSION=sdk37 ./scripts/tests/runIOSSmokeTestsCI.sh
|
||||
command: SDK_VERSION=sdk39 ./scripts/tests/runIOSSmokeTestsCI.sh
|
||||
- save_workingdir_cache:
|
||||
workingdir: /Users/distiller/project/workingdir
|
||||
sdk_version: sdk37
|
||||
sdk_version: sdk39
|
||||
platform: ios
|
||||
|
||||
android_smoke_tests:
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
"release": true
|
||||
},
|
||||
"hooks": {
|
||||
"before:init": [
|
||||
"yarn"
|
||||
],
|
||||
"after:release": "yarn release:update:turtle-cli-example"
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,76 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## Unreleased
|
||||
|
||||
# [0.18.3] - 2020-10-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- Update @expo/xdl to fix regression in SDK <= 39 splash
|
||||
|
||||
# [0.18.2] - 2020-10-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- Updated SDK 39 Android tarball.
|
||||
- Updated SDK 39 iOS tarball.
|
||||
- Updated iOS client tarball.
|
||||
- Update @expo/config and @expo/xdl. Temporarily bring in type definitions for color-string and xcode.
|
||||
|
||||
## [0.18.1] - 2020-09-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix building apps using SDK 39 for Android.
|
||||
|
||||
## [0.18.0] - 2020-09-21
|
||||
|
||||
### Added
|
||||
|
||||
- Added iOS and Android shell apps for SDK 39.
|
||||
|
||||
### Removed
|
||||
|
||||
- Dropped support for SDK 35.
|
||||
|
||||
## [0.17.3] - 2020-09-14
|
||||
|
||||
### Added
|
||||
|
||||
- Added gradle 6.2 to `turtle-android-base`
|
||||
- Added `ANDROID_NDK_HOME` in `turtle-android-base`
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgraded XDL so it processes root `build.gradle` of Android shell apps too
|
||||
|
||||
## [0.17.2] - 2020-08-06
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated iOS shell app for SDK 38 with fixed integer tagging in expo-gl for iOS 14. ([#245](https://github.com/expo/turtle/pull/245))
|
||||
|
||||
## [0.17.1] - 2020-08-05
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated Android shell app for SDK 38 with `targetSdkVersion` bumped to 29. ([#244](https://github.com/expo/turtle/pull/244))
|
||||
|
||||
## [0.17.0] - 2020-07-16
|
||||
|
||||
### Added
|
||||
|
||||
- `--gradle-args` option for `turtle build:android` which makes it possible to specify custom Gradle arguments.
|
||||
|
||||
### Changed
|
||||
|
||||
- Gradle Wrapper doesn't print when dots when the appropriate version of Gradle is being downloaded.
|
||||
|
||||
## [0.16.2] - 2020-07-01
|
||||
|
||||
### Added
|
||||
|
||||
- Added `--allow-non-https-public-url` to allow bypass of protocol validation on `--public-url`.
|
||||
- Added support for dynamic configs (`app.config.ts`, `app.config.js`).
|
||||
|
||||
## [0.16.0] - 2020-06-25
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
## Setup
|
||||
|
||||
- Run `update-local-secrets` to populate the `.secrets*` files. You'll need to run this any time any secret changes (it shouldn't be very often).
|
||||
- Run `EXPO_UNIVERSE_DIR=/path/to/universe/dir yarn secrets:init-private YOUR_SQS_NICKNAME`. Alternatively, you can create `.secrets.local-queue` file with the SQS queues' urls yourself (`AWS_SQS_OUT_QUEUE_URL`, `AWS_SQS_ANDROID_QUEUE_URL`, `AWS_SQS_ANDROID_PRIORITY_QUEUE_URL`, `AWS_SQS_IOS_QUEUE_URL`, `AWS_SQS_IOS_PRIORITY_QUEUE_URL`)
|
||||
- Run `EXPO_UNIVERSE_DIR=/path/to/universe/dir yarn secrets:init-private YOUR_SQS_NICKNAME`. Alternatively, you can create `.secrets.local-queue` file with the SQS queues' urls yourself (`AWS_SQS_ANDROID_QUEUE_URL`, `AWS_SQS_ANDROID_PRIORITY_QUEUE_URL`, `AWS_SQS_IOS_QUEUE_URL`, `AWS_SQS_IOS_PRIORITY_QUEUE_URL`)
|
||||
- Run `yarn set-workingdir:local` or `yarn set-workingdir:remote`:
|
||||
- `:local` creates symlinks to the shell apps in `expo` repository (_unfortunately this is currently broken_)
|
||||
- `:remote` downloads precompiled shell apps
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# see docker-base/Dockerfile to learn what's installed in the turtle-android-base image
|
||||
FROM gcr.io/exponentjs/turtle-android-base:0.4.0
|
||||
FROM gcr.io/exponentjs/turtle-android-base:0.5.0
|
||||
|
||||
ADD . /app/turtle
|
||||
|
||||
|
||||
@@ -57,10 +57,23 @@ ENV PATH ${ANDROID_HOME}/build-tools/28.0.3/:${PATH}
|
||||
|
||||
ADD configureAndroidSdk.sh /tmp/configureAndroidSdk.sh
|
||||
RUN /tmp/configureAndroidSdk.sh --install-all-platforms
|
||||
ENV ANDROID_NDK_HOME /usr/local/android-sdk-linux/ndk/17.2.4988734
|
||||
|
||||
# Support Gradle
|
||||
ENV TERM dumb
|
||||
|
||||
# Install gradle 6.2
|
||||
RUN wget https://services.gradle.org/distributions/gradle-6.2-all.zip
|
||||
RUN unzip -qq gradle-6.2-all.zip
|
||||
RUN cp -r gradle-6.2 /usr/local
|
||||
|
||||
RUN mkdir -p /root/.gradle/wrapper/dists/gradle-6.2-all/dvufqs6kielxeao781pmk5huj
|
||||
RUN mv gradle-6.2-all.zip /root/.gradle/wrapper/dists/gradle-6.2-all/dvufqs6kielxeao781pmk5huj
|
||||
RUN mv gradle-6.2 /root/.gradle/wrapper/dists/gradle-6.2-all/dvufqs6kielxeao781pmk5huj
|
||||
RUN touch /root/.gradle/wrapper/dists/gradle-6.2-all/dvufqs6kielxeao781pmk5huj/gradle-6.2-all.zip.ok
|
||||
RUN touch /root/.gradle/wrapper/dists/gradle-6.2-all/dvufqs6kielxeao781pmk5huj/gradle-6.2-all.zip.lck
|
||||
RUN chmod 755 /root/.gradle/wrapper/dists/gradle-6.2-all/dvufqs6kielxeao781pmk5huj/gradle-6.2/bin/gradle
|
||||
|
||||
# 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
|
||||
|
||||
@@ -88,11 +88,6 @@ spec:
|
||||
secretKeyRef:
|
||||
name: turtle-js-config
|
||||
key: aws_sqs_android_priority_queue_url
|
||||
- name: AWS_SQS_OUT_QUEUE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: turtle-js-config
|
||||
key: aws_sqs_out_queue_url
|
||||
- name: AWS_CLOUDWATCH_REGION
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
@@ -149,9 +144,9 @@ spec:
|
||||
- name: DISABLE_DEX_MAX_HEAP
|
||||
value: "true"
|
||||
- name: JAVA_OPTS
|
||||
value: '-Xms2048m -XX:+HeapDumpOnOutOfMemoryError -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseG1GC'
|
||||
value: '-Xms2048m -Xmx8192m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC'
|
||||
- name: GRADLE_OPTS
|
||||
value: '-Dorg.gradle.parallel=true -Dorg.gradle.configureondemand=true -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xms2048m -XX:+HeapDumpOnOutOfMemoryError -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseG1GC"'
|
||||
value: '-Dorg.gradle.parallel=true -Dorg.gradle.configureondemand=true -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xms2048m -Xmx8192m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC"'
|
||||
- name: REDIS_CA_CERTIFICATE
|
||||
value: '/var/run/config/redislabs-tls/redislabs_ca.pem'
|
||||
resources:
|
||||
|
||||
+7
-6
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "turtle-cli",
|
||||
"version": "0.16.0",
|
||||
"version": "0.18.3",
|
||||
"description": "The command-line tool for building standalone Expo apps",
|
||||
"preferGlobal": true,
|
||||
"scripts": {
|
||||
@@ -68,6 +68,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@expo/babel-preset-cli": "^0.1.3",
|
||||
"@types/color-string": "^1.5.0",
|
||||
"@types/decompress": "^4.2.3",
|
||||
"@types/fs-extra": "^5.0.4",
|
||||
"@types/ioredis": "^4.16.6",
|
||||
@@ -88,25 +89,25 @@
|
||||
"@types/webpack-dev-server": "^3.1.7",
|
||||
"@types/which": "^1.3.1",
|
||||
"husky": "^1.3.1",
|
||||
"jest": "^25.1.0",
|
||||
"jest": "^26.1.0",
|
||||
"lint-staged": "^8.1.5",
|
||||
"nock": "^10.0.1",
|
||||
"nodemon": "^2.0.2",
|
||||
"release-it": "^12.3.4",
|
||||
"rimraf": "^2.6.2",
|
||||
"ts-jest": "^25.2.1",
|
||||
"ts-jest": "^26.1.2",
|
||||
"ts-node": "^8.0.3",
|
||||
"ts-transformer-imports": "^0.4.1",
|
||||
"tsconfig-paths": "^3.8.0",
|
||||
"tslint": "^5.10.0",
|
||||
"tslint-eslint-rules": "^5.4.0",
|
||||
"ttypescript": "^1.5.6",
|
||||
"typescript": "^3.4.2"
|
||||
"typescript": "^3.9.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/config": "^3.0.5",
|
||||
"@expo/config": "~3.3.9",
|
||||
"@expo/spawn-async": "^1.4.2",
|
||||
"@expo/xdl": "^57.9.13",
|
||||
"@expo/xdl": "58.0.13",
|
||||
"@google-cloud/logging-bunyan": "^2.0.3",
|
||||
"async-retry": "^1.2.1",
|
||||
"aws-sdk": "^2.226.1",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$EXPO_UNIVERSE_DIR" ]; then
|
||||
echo "You need to specify EXPO_UNIVERSE_DIR to use this script. Alternatively you can create .secrets.local-queue file yourself with AWS_SQS_ANDROID_QUEUE_URL, AWS_SQS_IOS_QUEUE_URL and AWS_SQS_OUT_QUEUE_URL variables."
|
||||
echo "You need to specify EXPO_UNIVERSE_DIR to use this script. Alternatively you can create .secrets.local-queue file yourself with AWS_SQS_ANDROID_QUEUE_URL and AWS_SQS_IOS_QUEUE_URL variables."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -17,13 +17,11 @@ ANDROID_NORMAL=`cd $TERRAFORM_DIR; terraform state show module.turtle_queues_loc
|
||||
ANDROID_PRIORITY=`cd $TERRAFORM_DIR; terraform state show module.turtle_queues_local_$1.aws_sqs_queue.jobs_android_in_priority | head -1 | cut -d"=" -f2 | xargs`
|
||||
IOS_NORMAL=`cd $TERRAFORM_DIR; terraform state show module.turtle_queues_local_$1.aws_sqs_queue.jobs_ios_in | head -1 | cut -d"=" -f2 | xargs`
|
||||
IOS_PRIORITY=`cd $TERRAFORM_DIR; terraform state show module.turtle_queues_local_$1.aws_sqs_queue.jobs_ios_in_priority | head -1 | cut -d"=" -f2 | xargs`
|
||||
OUT=`cd $TERRAFORM_DIR; terraform state show module.turtle_queues_local_$1.aws_sqs_queue.jobs_out | head -1 | cut -d"=" -f2 | xargs`
|
||||
|
||||
cat << EOF > $TURTLE_DIR/.secrets.local-queue
|
||||
AWS_SQS_ANDROID_QUEUE_URL="$ANDROID_NORMAL"
|
||||
AWS_SQS_ANDROID_PRIORITY_QUEUE_URL="$ANDROID_PRIORITY"
|
||||
AWS_SQS_IOS_QUEUE_URL="$IOS_NORMAL"
|
||||
AWS_SQS_IOS_PRIORITY_QUEUE_URL="$IOS_PRIORITY"
|
||||
AWS_SQS_OUT_QUEUE_URL="$OUT"
|
||||
EOF
|
||||
|
||||
@@ -7,7 +7,7 @@ DOWNLOAD_DIR="${EXPO_DOWNLOAD_DIR:-$HOME/Downloads}"
|
||||
mkdir -p $DOWNLOAD_DIR
|
||||
|
||||
if [ ! -f "$ROOT_DIR/.secrets.local-queue" ]; then
|
||||
echo "You need to run \"yarn secrets:init-private [SQS_NAME]\" or create the .secrets.local-queue file yourself with AWS_SQS_ANDROID_QUEUE_URL, AWS_SQS_ANDROID_PRIORITY_QUEUE_URL, AWS_SQS_IOS_QUEUE_URL, AWS_SQS_IOS_PRIORITY_QUEUE_URL and AWS_SQS_OUT_QUEUE_URL variables."
|
||||
echo "You need to run \"yarn secrets:init-private [SQS_NAME]\" or create the .secrets.local-queue file yourself with AWS_SQS_ANDROID_QUEUE_URL, AWS_SQS_ANDROID_PRIORITY_QUEUE_URL, AWS_SQS_IOS_QUEUE_URL, and AWS_SQS_IOS_PRIORITY_QUEUE_URL variables."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ export AWS_SQS_ANDROID_QUEUE_URL="https://sqs.us-west-2.amazonaws.com/2742511416
|
||||
export AWS_SQS_ANDROID_PRIORITY_QUEUE_URL="https://sqs.us-west-2.amazonaws.com/274251141632/turtle_jobs_local_dominik_android_in_priority.fifo"
|
||||
export AWS_SQS_IOS_QUEUE_URL="https://sqs.us-west-2.amazonaws.com/274251141632/turtle_jobs_local_dominik_ios_in.fifo"
|
||||
export AWS_SQS_IOS_PRIORITY_QUEUE_URL="https://sqs.us-west-2.amazonaws.com/274251141632/turtle_jobs_local_dominik_ios_in_priority.fifo"
|
||||
export AWS_SQS_OUT_QUEUE_URL="https://sqs.us-west-2.amazonaws.com/274251141632/turtle_jobs_local_dominik_out.fifo"
|
||||
export AWS_SQS_REGION="aws.west2"
|
||||
export AWS_S3_BUCKET="exp-shell-app-assets"
|
||||
export AWS_S3_REGION="us-west-1"
|
||||
|
||||
@@ -9,7 +9,6 @@ export AWS_SQS_ANDROID_QUEUE_URL="https://sqs.us-west-2.amazonaws.com/2742511416
|
||||
export AWS_SQS_ANDROID_PRIORITY_QUEUE_URL="https://sqs.us-west-2.amazonaws.com/274251141632/turtle_jobs_local_dominik_android_in_priority.fifo"
|
||||
export AWS_SQS_IOS_QUEUE_URL="https://sqs.us-west-2.amazonaws.com/274251141632/turtle_jobs_local_dominik_ios_in.fifo"
|
||||
export AWS_SQS_IOS_PRIORITY_QUEUE_URL="https://sqs.us-west-2.amazonaws.com/274251141632/turtle_jobs_local_dominik_ios_in_priority.fifo"
|
||||
export AWS_SQS_OUT_QUEUE_URL="https://sqs.us-west-2.amazonaws.com/274251141632/turtle_jobs_local_dominik_out.fifo"
|
||||
export AWS_SQS_REGION="aws.west2"
|
||||
export AWS_S3_BUCKET="exp-shell-app-assets"
|
||||
export AWS_S3_REGION="us-west-1"
|
||||
|
||||
@@ -9,7 +9,6 @@ export AWS_SQS_IOS_QUEUE_URL="noop"
|
||||
export AWS_SQS_ANDROID_QUEUE_URL="noop"
|
||||
export AWS_SQS_IOS_PRIORITY_QUEUE_URL="noop"
|
||||
export AWS_SQS_ANDROID_PRIORITY_QUEUE_URL="noop"
|
||||
export AWS_SQS_OUT_QUEUE_URL="noop"
|
||||
export AWS_ACCESS_KEY_ID="noop"
|
||||
export AWS_SECRET_ACCESS_KEY="noop"
|
||||
export AWS_SQS_REGION="noop"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
s3://exp-artifacts/android-shell-builder-7ce098f40cc82a2f61fed9f1f515d695a83c55b2.tar.gz
|
||||
@@ -1 +1 @@
|
||||
s3://exp-artifacts/android-shell-builder-076a13fd8b4ee84a59eb6d2777f6db0a2c71fb6d.tar.gz
|
||||
s3://exp-artifacts/android-shell-builder-6cde8e00cd7bdf7a933cd8aad7f8e86981ea68a2.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
s3://exp-artifacts/android-shell-builder-b8193b76084128d714a240bbaa5c2450cc4a2c41.tar.gz
|
||||
@@ -1 +1 @@
|
||||
s3://exp-artifacts/ios-expo-client-18a58afe742e63f1d2ac71ba21404d8b84e6563e.tar.gz
|
||||
s3://exp-artifacts/ios-expo-client-401ff3fb71a1350c00bd0886f7eb4fd462bdf0c0.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-0115c48ddac4f63e5215541dff804871ef8c1e03.tar.gz
|
||||
@@ -1 +1 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-b0acfb129b4526f771bd0b363f2896b35f007e83.tar.gz
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-6cde8e00cd7bdf7a933cd8aad7f8e86981ea68a2.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-798b04f87b8f1518a0eb4009578cb216963922f0.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.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>{"id":"1b148a0a-4a5e-4572-b28a-c31aa018351a","experienceId":"0128bca1-78cf-4cb8-ac00-c07600500254","experienceName":"@dsokal-local/turtle-cli-example","platform":"android","config":{"releaseChannel":"default","buildType":"apk"},"status":"sent-to-queue","sdkVersion":"37.0.0","accountId":"9b473c78-6d0e-4b69-88a8-1c0960287b2f","priority":"normal","credentials":{"keystore":"/u3+7QAAAAIAAAABAAAAAQAscWdyemIydGhiYzFzYjJuaGJjOTBkeGowYmd1dHkyeHBsd3Y0eXcxd2JndT0AAAFxTutg3AAABQEwggT9MA4GCisGAQQBKgIRAQEFAASCBOl0ClAt46XtKkD3OZ4KtYCfGvjcqn+NUvylgValp+eckKR3vpTdmzIJxCCPCPpVWUT9kssEpIWea1oyDbBoh01lSazoofkTt+QIkcnr2sOcWgoyywIH+jNH4CPDfycdjPBsy8IoFqSz5DSS9vWwdO8xw0uw/iBd0MmQUcdJANZb0HbvrOU9R1n8IeNeFZUS0nk8czYplz8e7+lWphAY1vA7oLKwYMvkPrHQSoHaXh7WqOyn3A31eQgTHZGW2vwSa7gUS+X1izYozAY5AaKrxwUYQ56dWMNnuufSGldj8KWIpdps1Bo1bN6bb/eDWiXbEGWXgwJOZxYs9OFiPPw296aBdtWpG3qu11Z+NQmr28ov0uqj9yWBX/+iO8TgyCEBPZHRnlVRvoRIvhXoZ2GYsLMvJsn7GrdPWHzzs1cKkg85Ffh7Tr1+32LkVHqHtuId/2hhC2HeP5Yzgkw45ty29H3SXWpydrDjLwQAtGYDnYxYplRxhSt+FXMsepuytDCHAjJ27Ers9mMOs8LriYznJcup32FSrdvAk8SXdrxIXmZ7q8dgmI0OD6tlS+cNGm9Y0e7kWbFbSXK72YViVWzAL/Rm0ecQPSnOaowpVsvU6vWHCdUxgwWGpJAXPPrVmvoTwzQQ4gjm6d4IvRzfW2pXMGvw+gr/19LicvUkhRLS7qKHaYS1QXss9rxWgE8SdFMJghFnwc2s+V4wDsf44aeX3/0mYegfijXI/2d6htQ4ouojQBmQlK7pKiUGjDepgT3S+G8XBSslBcTv0Vf5sudUcisXH8BQd015Sf5ruE7k0BLObfUWsJSd3b8uRjwAXkjCKILiUOckIuLwIiRNBj39u5HlrXZe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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>f5017f35-ce75-4a6c-acaf-4ccc3d73899f</MessageId><ReceiptHandle>AQEBQjEPeX13Rkr+iSNEuh9J+WKCinb45vRFxWMojfZlD8f5gXi1fncRIotDjji9Q5lkhEK6hjXnALwGXZTstFj3/EPMVV2MKPNN/6NA3cQ7wSd5/+EqP8ZFOC+wBBK46KdS82t46NJ3c0DqkXPImlUE7O2n1WnFiRrjJ+I/G7yYhf+rnxLoNWD8ZPFzzInr6K0Q4Fae8Wqowyc9N8dw2kksnzW3qto+W/Ped1MyF4/Ia6KBqPLQswHRI5WRrqxxaVKdi37XxHW1J71xxEskicTlSBqQmre+3gaCja6cDpXkBtQSNp1LC7nvt/OXZTmXvwtM</ReceiptHandle><MD5OfBody>792da27a1e1bc549ed89f35a5f66e38c</MD5OfBody><Body>{"id":"cd9ff227-575b-4eec-874f-d2b9f6187f05","experienceId":"da491dac-c6bf-4d54-b67a-ba7890e22fb2","experienceName":"@dsokal-local/turtle-cli-example","platform":"android","config":{"releaseChannel":"default","buildType":"apk"},"status":"sent-to-queue","sdkVersion":"37.0.0","accountId":"fbd6360b-e85d-485e-bf20-ab66adfeea16","priority":"normal","credentials":{"keystore":"/u3+7QAAAAIAAAABAAAAAQAscWd2NGNnOHRkaHZ5ZGd4bGwzcjFjbnJzenMxamJna3R6eGhoYnhic3pxPT0AAAFoV0/uKQAABQEwggT9MA4GCisGAQQBKgIRAQEFAASCBOkSPJLZo26jmvgZA63wglEdkZ2jnWIAicad3OsLcfS3h94el0TIaQ7K8BwyX02AKYIGR82+sqxYCKvgY+YIf4xOyrVL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rPsNp+hQgjit2zt4oyLDT+LoQrR7Mw6cxhxdCCVYNqrXVusOH0D2xubh39lfA6YCOAjXSzJ+C79nuAXwNmOmSqyYaHvMf4LCQ10qmAtXy+chucW4G5xzNkbkkIzye9hfev/YF4Xyt5HMH+WfgJLY9rfiEVa2A/t2/XhNBZYzb48GUPn4FORKzT37nrhs8xdIkCAwEAAaMhMB8wHQYDVR0OBBYEFKJv1T1PHa7r0KhPYvrXL7iCEjf9MA0GCSqGSIb3DQEBCwUAA4IBAQAUlJYtz2+GwpXDeyHTewwFs7hPgQO1oMJxtHitkc+rWPR8PwGall9WH+Wz5VXq5R1ZwsodgNRw5gLbZQpLb+/qYYyk8TSiTG1W4hKjHv6mWnSRQKSve/Zr5Z9tZt12Sc1xGYQ2QlMtvDNoxvcSguOoE0CfYzeK6hQteE873HSUIdqIRilK7EkfJexkFI/+4UWTZ4OP3MkKl0GKHTrHzcovzsmY/f1dkB0aByOyFpR17P6tIzd0Xsub3kgZr71PMb/5tvo2GePTmNVb46CUAhhBvt4BZBmr5ehh7oV+pHJrrVkPltMV8ddggNxpdWwE7F4Q5wKaGu0YPpaDZYv7jIeXdT074zft6plJHUWNi9CQgArR9Cs=","keystorePassword":"28eeeda02db44ed9afc1c1d4a0f2caa6","keystoreAlias":"QGV4cG8tdHVydGxlL3R1cnRsZS1jbGktZXhhbXBsZQ==","keyPassword":"a6a53453c5534673900dac983e40a693"},"manifest":{"ios":{"buildNumber":"13","supportsTablet":true,"bundleIdentifier":"com.expo.turtle.cli.example"},"icon":"./assets/icon.png","namLine truncated
|
||||
@@ -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_ios_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>8bea4e96-2dc5-572c-9898-1991f406b911</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","8bea4e96-2dc5-572c-9898-1991f406b911","Date","Wed, 08 Apr 2020 13:54:16 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_ios_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>a995b5e8-7f64-5567-baf9-e2efa6add8fe</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","a995b5e8-7f64-5567-baf9-e2efa6add8fe","Date","Wed, 08 Apr 2020 13:54:22 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_ios_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>8871c5eb-cb40-5a57-a611-92ec128fccd4</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","8871c5eb-cb40-5a57-a611-92ec128fccd4","Date","Wed, 08 Apr 2020 13:54:28 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_ios_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>5c49f623-617a-531c-bbf8-a124b8af2bfd</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","5c49f623-617a-531c-bbf8-a124b8af2bfd","Date","Wed, 08 Apr 2020 13:54:34 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_ios_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>68b706ef-2dce-505b-a0d6-51e8f412e6f9</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","68b706ef-2dce-505b-a0d6-51e8f412e6f9","Date","Wed, 08 Apr 2020 13:54: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_ios_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>c1e6a3e3-8d97-57cd-884c-f4e454757fcd</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","c1e6a3e3-8d97-57cd-884c-f4e454757fcd","Date","Wed, 08 Apr 2020 13:54:47 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_ios_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>a68dea4b-2de4-5000-b718-bd4cf40ca8fa</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","a68dea4b-2de4-5000-b718-bd4cf40ca8fa","Date","Wed, 08 Apr 2020 13:54:53 GMT","Content-Type","text/xml","Content-Length","240"]},{Line 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_ios_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>99e0e5ee-90ef-494e-a275-3c1d55b58d9c</MessageId><ReceiptHandle>AQEB73473140rmgRe58W4T81ev8RJFQ0PvS6vOcHcSVdAV9D+bmP66k8qIqGuc0LJqR4bE9GLWG+QnM7N8rRW1tjIB74Gt9Co3PD7KFwrdgjZ3eys3fjK9nMfOj7BI0DMIP2xWi3YC90300dr/tTgJhVxfDh+Y0nYWleN9qEmttJoRqlJdSMgokqBR5VBFbhAmoNfsbSQnLzwU7fe/g2gjarImBRaCYpNWHYmS9CLozP5RBGKCddzQLvaNxDwORZXzHbYPZha5eFIDfXa3ncBtK2XdbOiquCmEB1tMt9ziIEOObSt/Vu7CD+ANhRqdqEFL/x</ReceiptHandle><MD5OfBody>ebe1f299d094649b2f3857bbd6f380ec</MD5OfBody><Body>{"id":"883f68d1-398a-4327-83da-6de1f288456d","experienceId":"2945b084-8989-4a02-b781-2a620034a172","experienceName":"@dsokal/turtle-cli-example","platform":"ios","config":{"releaseChannel":"default","usesNonExemptEncryption":false,"buildType":"archive","bundleIdentifier":"com.expo.turtle.cli.example"},"status":"sent-to-queue","sdkVersion":"39.0.0","accountId":"07eb1118-80a9-4769-a9b5-9f429cab29e2","priority":"normal","credentials":{"apnsKeyId":"54G5NV49UY","apnsKeyP8":"-----BEGIN PRIVATE KEY-----\\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgBtkLIodAlsdUmV1L\\nxirn9Erof29278yzTaR/NNlvF0igCgYIKoZIzj0DAQehRANCAAS5jlfFX2KmTFi/\\ng+aohp77kCfYRZNYYmn4cgn4dKkXu5YOGbTJlzW6384xDpX6uWcXXytKD9cO00uN\\n8v9j4MT6\\n-----END PRIVATE KEY-----","teamId":"QL76XYH73P","teamName":"Alicja Warchał (Individual)","certP12":"MIIMDAIBAzCCC9YGCSqGSIb3DQEHAaCCC8cEggvDMIILvzCCBl8GCSqGSIb3DQEHBqCCBlAwggZMAgEAMIIGRQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIyCGcdprP/WkCAggAgIIGGFqAu4HyWNRsBd7y5oylLA5K4/qtIggDVitAITLQ8lpp8XdzuFkYUpzvIY65WPuS3s/JNX1HcFPbldFqH2p10j5E32WuH1sKxht8OVVmjdMRWqxvU/EUZDQHwX+Os4Mx1h8zQub7JYjQkBpb+TbrZwG/qONyIROJXOPTmF6MyZaQeQ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6sG4+phhK/YKmPJtwRwXsrWDLdt4ScG/uQi+tBG+Be02kVHjg9rUrBokmuPGF9/q/2k/f4f3VkDlFGNugubc6moPS73X1wnWdOD3ob32Hx4lhcAUngmtqDF8Uczsk5YZz0vjFd1Go9uWNbI+hjj8Pjv/iU1Tcov6VcCPxXfYYRKYJlRrurdA+ZLwGXBXpU0thEv1RMj9RTljPecU783qvDs6kj3AEh5K6RBoPauOGDkZZzxvz8jbcZb9aY/GZddHESnAA22yEcYbMeyQb0d1HYiOC6Wy6RGsy7PqDRg/8gNHna4BYUMgJD6EfCp5gt6hyjA7fVi/HI9S4GmfUlxR4IBe1t8BvmKKL8WgzydRupn3/hXpEcg3P2rbLH8L4OqnEV4Dpgp5ic+a6HjqVgK/EihO6gPA7HftGPJ6Egs62Line truncated
|
||||
@@ -17,8 +17,7 @@ jest.mock('../builders/utils/uploader.ts', () => ({
|
||||
async function performSmokeTest(recording: string) {
|
||||
jest.setTimeout(60 * 60 * 1000);
|
||||
|
||||
// @ts-ignore
|
||||
const fixtureExists = await fs.exists(recording);
|
||||
const fixtureExists = await fs.pathExists(recording);
|
||||
if (fixtureExists) {
|
||||
logger.info('Fixture exists, test will use existing one.');
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ function _addEmptyMetrics(metrics: IMetric[]) {
|
||||
acc.add(i.MetricName);
|
||||
}
|
||||
return acc;
|
||||
}, new Set());
|
||||
}, new Set<string>());
|
||||
|
||||
const nonEmptyMetrics = _.omitBy(state.registeredMetrics, ({ addEmpty }) => !addEmpty);
|
||||
const toAdd = _.difference(Object.keys(nonEmptyMetrics), Array.from(seenMetrics));
|
||||
|
||||
@@ -19,10 +19,10 @@ export default function calculateStatistics(metrics: IMetric[]) {
|
||||
});
|
||||
}
|
||||
|
||||
result.StatisticValues.Maximum = Math.max(result.StatisticValues.Maximum, i.Value);
|
||||
result.StatisticValues.Minimum = Math.min(result.StatisticValues.Minimum, i.Value);
|
||||
result.StatisticValues.SampleCount += 1;
|
||||
result.StatisticValues.Sum += i.Value;
|
||||
result!.StatisticValues.Maximum = Math.max(result!.StatisticValues.Maximum, i.Value);
|
||||
result!.StatisticValues.Minimum = Math.min(result!.StatisticValues.Minimum, i.Value);
|
||||
result!.StatisticValues.SampleCount += 1;
|
||||
result!.StatisticValues.Sum += i.Value;
|
||||
return result;
|
||||
}, null);
|
||||
return [reduced];
|
||||
|
||||
+1
-18
@@ -2,9 +2,8 @@ import retry from 'async-retry';
|
||||
import AWS from 'aws-sdk';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { OUTPUT_QUEUE_URL, QUEUE_URL } from 'turtle/aws/utils';
|
||||
import { QUEUE_URL } from 'turtle/aws/utils';
|
||||
import config from 'turtle/config';
|
||||
import { JOB_UPDATE_TYPE } from 'turtle/constants/build';
|
||||
import logger from 'turtle/logger';
|
||||
import { getCurrentJobId } from 'turtle/turtleContext';
|
||||
|
||||
@@ -73,19 +72,3 @@ export function changeMessageVisibilityRecurring(priority: string, receiptHandle
|
||||
}
|
||||
}, (VISIBILITY_TIMEOUT_SEC * 1000) / 3);
|
||||
}
|
||||
|
||||
export async function sendMessage(jobId: string, status: JOB_UPDATE_TYPE, data = {}) {
|
||||
const params = {
|
||||
MessageBody: JSON.stringify({ jobId, status, ...data }),
|
||||
QueueUrl: OUTPUT_QUEUE_URL(),
|
||||
DelaySeconds: 0,
|
||||
MessageGroupId: jobId,
|
||||
};
|
||||
try {
|
||||
return await retry(async () => {
|
||||
return await sqs.sendMessage(params).promise();
|
||||
});
|
||||
} catch (err) {
|
||||
logger.error({ err }, `Error sending SQS message: ${JSON.stringify(params)}}`);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import config from 'turtle/config';
|
||||
|
||||
export const QUEUE_URL = (priority: string) => (config.sqs.queues as any)[priority][config.platform];
|
||||
export const OUTPUT_QUEUE_URL = () => config.sqs.queues.out;
|
||||
@@ -29,6 +29,11 @@ export default (program: any, setCommonCommandOptions: any) => {
|
||||
/^(debug|release)$/i,
|
||||
'release',
|
||||
)
|
||||
.option(
|
||||
'--gradle-args <gradle-args>',
|
||||
'optional arguments passed to gradle, make sure to surround them with double quotes'
|
||||
+ ' (e.g.: --gradle-args "--stacktrace --debug")',
|
||||
)
|
||||
.description(
|
||||
'Build a standalone APK or App Bundle for your project, either signed and ready for submission to'
|
||||
+ ' the Google Play Store or in debug mode.',
|
||||
|
||||
@@ -67,6 +67,7 @@ function _createEnvVars(androidSdkDir: string) {
|
||||
return {
|
||||
ANDROID_HOME: androidSdkDir,
|
||||
ANDROID_SDK: androidSdkDir,
|
||||
ANDROID_NDK_HOME: path.join(androidSdkDir, 'ndk/17.2.4988734'),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+15
-12
@@ -1,6 +1,6 @@
|
||||
import _url from 'url';
|
||||
|
||||
import { ConfigError, getExpoSDKVersion } from '@expo/config';
|
||||
import { ConfigError, getExpoSDKVersion, ProjectConfig } from '@expo/config';
|
||||
import { ExponentTools } from '@expo/xdl';
|
||||
import _ from 'lodash';
|
||||
import uuid from 'uuid';
|
||||
@@ -74,12 +74,12 @@ export function createBuilderAction({
|
||||
publicUrl: cmd.publicUrl,
|
||||
};
|
||||
|
||||
const appJSON = await ProjectUtils.loadAppJSON(projectDirArg, cmd.config);
|
||||
const sdkVersion = getExpoSDKVersionSafely(projectAbsoluteDir, appJSON);
|
||||
const projectConfig = await ProjectUtils.getConfig(projectDirArg, cmd.config);
|
||||
const sdkVersion = getExpoSDKVersionSafely(projectAbsoluteDir, projectConfig);
|
||||
await setup(platform, sdkVersion);
|
||||
const credentials = await prepareCredentials(cmd);
|
||||
const rawJob = {
|
||||
...await buildJobObject(platform, appJSON, args, credentials, sdkVersion),
|
||||
...await buildJobObject(cmd, platform, projectConfig, args, credentials, sdkVersion),
|
||||
...cmd.buildDir && { fakeUploadDir: ProjectUtils.resolveAbsoluteDir(cmd.buildDir) },
|
||||
...cmd.output && { fakeUploadBuildPath: ProjectUtils.resolveAbsoluteDir(cmd.output) },
|
||||
};
|
||||
@@ -97,9 +97,9 @@ export function createBuilderAction({
|
||||
};
|
||||
}
|
||||
|
||||
function getExpoSDKVersionSafely(projectDir: string, appJSON?: any) {
|
||||
function getExpoSDKVersionSafely(projectDir: string, projectConfig: ProjectConfig) {
|
||||
try {
|
||||
return getExpoSDKVersion(projectDir, appJSON && appJSON.expo);
|
||||
return getExpoSDKVersion(projectDir, projectConfig.exp);
|
||||
} catch (err) {
|
||||
if (err instanceof ConfigError) {
|
||||
throw new Error(
|
||||
@@ -113,22 +113,25 @@ function getExpoSDKVersionSafely(projectDir: string, appJSON?: any) {
|
||||
}
|
||||
|
||||
const buildJobObject = async (
|
||||
cmd: any,
|
||||
platform: 'android' | 'ios',
|
||||
appJSON: any,
|
||||
projectConfig: ProjectConfig,
|
||||
{ releaseChannel, buildType, buildMode, username, publicUrl, projectDir }: any,
|
||||
credentials: any,
|
||||
sdkVersion: string,
|
||||
) => {
|
||||
const experienceName = `@${_.get(appJSON, 'expo.owner', username)}/${_.get(appJSON, 'expo.slug')}`;
|
||||
const owner = projectConfig.exp.owner || username;
|
||||
const experienceName = `@${owner}/${projectConfig.exp.slug}`;
|
||||
const job = {
|
||||
config: {
|
||||
..._.get(appJSON, `expo.${platform}.config`, {}),
|
||||
...(projectConfig.exp?.[platform]?.config || {}),
|
||||
buildType,
|
||||
...(platform === 'android' ? { buildMode } : {}),
|
||||
releaseChannel,
|
||||
...(platform === 'ios' ? { bundleIdentifier: _.get(appJSON, 'expo.ios.bundleIdentifier') } : {}),
|
||||
...(platform === 'android' ? { androidPackage: _.get(appJSON, 'expo.android.package') } : {}),
|
||||
publicUrl,
|
||||
...(platform === 'android' && cmd.gradleArgs ? { gradleArgs: cmd.gradleArgs.split(' ') } : {}),
|
||||
...(platform === 'android' ? { buildMode } : {}),
|
||||
...(platform === 'android' ? { androidPackage: projectConfig.exp?.android?.package } : {}),
|
||||
...(platform === 'ios' ? { bundleIdentifier: projectConfig.exp?.ios?.bundleIdentifier } : {}),
|
||||
},
|
||||
id: uuid.v4(),
|
||||
platform,
|
||||
|
||||
+11
-13
@@ -1,20 +1,18 @@
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
|
||||
export async function loadAppJSON(projectDirArg: string, config: string | null) {
|
||||
let appJSONPath;
|
||||
import { getConfig as getProjectConfig, setCustomConfigPath } from '@expo/config';
|
||||
import fs from 'fs-extra';
|
||||
|
||||
export async function getConfig(projectDir: string, config: string | null) {
|
||||
projectDir = resolveAbsoluteDir(projectDir);
|
||||
if (config) {
|
||||
appJSONPath = resolveAbsoluteDir(config);
|
||||
} else {
|
||||
const projectDir = resolveAbsoluteDir(projectDirArg);
|
||||
appJSONPath = path.join(projectDir, 'app.json');
|
||||
}
|
||||
const appJSONExists = await fs.pathExists(appJSONPath);
|
||||
if (!appJSONExists) {
|
||||
throw new Error(`Couldn't find app.json.`);
|
||||
} else {
|
||||
return require(appJSONPath);
|
||||
const pathToConfig = path.resolve(process.cwd(), config);
|
||||
if (!await fs.pathExists(pathToConfig)) {
|
||||
throw new Error(`File at provided config path does not exist: ${pathToConfig}`);
|
||||
}
|
||||
setCustomConfigPath(projectDir, pathToConfig);
|
||||
}
|
||||
return await getProjectConfig(projectDir, {});
|
||||
}
|
||||
|
||||
export const resolveAbsoluteDir = (dir: string) => {
|
||||
|
||||
@@ -34,8 +34,8 @@ export default async function buildAndroid(jobData: IJob): Promise<IJobResult> {
|
||||
...config.builder.fakeUpload && {
|
||||
fakeUploadBuildPath:
|
||||
jobData.fakeUploadBuildPath
|
||||
? jobData.fakeUploadBuildPath
|
||||
: path.join(jobData.fakeUploadDir || config.directories.fakeUploadDir, fakeUploadFilename),
|
||||
? jobData.fakeUploadBuildPath
|
||||
: path.join(jobData.fakeUploadDir || config.directories.fakeUploadDir, fakeUploadFilename),
|
||||
},
|
||||
});
|
||||
|
||||
@@ -103,6 +103,7 @@ async function runShellAppBuilder(
|
||||
modules: enabledModules,
|
||||
buildType: jobData.config.buildType,
|
||||
buildMode: jobData.config.buildMode,
|
||||
gradleArgs: jobData.config.gradleArgs,
|
||||
});
|
||||
} catch (err) {
|
||||
commonUtils.logErrorOnce(err);
|
||||
|
||||
@@ -5,11 +5,10 @@ import fs from 'fs-extra';
|
||||
import get from 'lodash/get';
|
||||
import uuidv4 from 'uuid/v4';
|
||||
|
||||
import * as sqs from 'turtle/aws/sqs';
|
||||
import { UPDATE_CREDENTIALS } from 'turtle/constants/build';
|
||||
import { IAndroidCredentials, IJob } from 'turtle/job';
|
||||
import logger from 'turtle/logger';
|
||||
import { isOffline } from 'turtle/turtleContext';
|
||||
import { sendCredentialsUpdate } from 'turtle/utils/www';
|
||||
|
||||
async function getOrCreateCredentials(jobData: IJob): Promise<IAndroidCredentials> {
|
||||
if (!jobData.credentials) {
|
||||
@@ -50,9 +49,7 @@ async function getOrCreateCredentials(jobData: IJob): Promise<IAndroidCredential
|
||||
l.info(`Key password: ${credentials.keyPassword}`);
|
||||
l.info(`Please keep these credentials safe`);
|
||||
} else {
|
||||
await sqs.sendMessage(jobData.id, UPDATE_CREDENTIALS, {
|
||||
...credentials,
|
||||
});
|
||||
await sendCredentialsUpdate(jobData.id, 'android', credentials);
|
||||
l.info('Keystore sent to storage successfully');
|
||||
}
|
||||
await fs.unlink(keystoreFilename);
|
||||
|
||||
@@ -4,12 +4,11 @@ import spawnAsync from '@expo/spawn-async';
|
||||
import { IosCodeSigning } from '@expo/xdl';
|
||||
import fs from 'fs-extra';
|
||||
|
||||
import * as sqs from 'turtle/aws/sqs';
|
||||
import BuildError, { BuildErrorReason } from 'turtle/builders/BuildError';
|
||||
import { UPDATE_CREDENTIALS } from 'turtle/constants/build';
|
||||
import { IJob } from 'turtle/job';
|
||||
import logger from 'turtle/logger';
|
||||
import { isOffline } from 'turtle/turtleContext';
|
||||
import { sendCredentialsUpdate } from 'turtle/utils/www';
|
||||
|
||||
// tslint:disable-next-line:no-var-requires
|
||||
const travelingFastlane = process.platform === 'darwin' ? require('@expo/traveling-fastlane-darwin')() : null;
|
||||
@@ -64,7 +63,7 @@ async function prepareAdHocBuildCredentials(job: IJob) {
|
||||
await fs.writeFile(provisioningProfilePath, Buffer.from(credentials.provisioningProfile, 'base64'));
|
||||
logger.info(`Saved provisioning profile to ${provisioningProfilePath}`);
|
||||
} else {
|
||||
await sqs.sendMessage(job.id, UPDATE_CREDENTIALS, {
|
||||
await sendCredentialsUpdate(job.id, 'ios', {
|
||||
provisioningProfileId: credentials.provisioningProfileId,
|
||||
provisioningProfile: credentials.provisioningProfile,
|
||||
});
|
||||
|
||||
+5
-2
@@ -29,7 +29,6 @@ export default {
|
||||
ios: env('AWS_SQS_IOS_PRIORITY_QUEUE_URL'),
|
||||
android: env('AWS_SQS_ANDROID_PRIORITY_QUEUE_URL'),
|
||||
},
|
||||
out: env('AWS_SQS_OUT_QUEUE_URL'),
|
||||
},
|
||||
},
|
||||
cloudwatch: {
|
||||
@@ -100,6 +99,10 @@ export default {
|
||||
),
|
||||
},
|
||||
www: {
|
||||
sdkVersionsSecretToken: env('TURTLE_SDK_VERSIONS_SECRET_TOKEN'),
|
||||
secretToken: env('TURTLE_SDK_VERSIONS_SECRET_TOKEN'),
|
||||
},
|
||||
leader: {
|
||||
redisKey: env('LEADER_REDIS_KEY', 'turtle-v1:leader'),
|
||||
redisKeyTTLSec: envNum('LEADER_REDIS_KEY_TTL', 30),
|
||||
},
|
||||
};
|
||||
@@ -15,6 +15,7 @@ export interface IJob {
|
||||
// android
|
||||
androidPackage?: string;
|
||||
buildMode?: ANDROID_BUILD_MODES;
|
||||
gradleArgs?: string[];
|
||||
};
|
||||
credentials: {
|
||||
// android
|
||||
|
||||
+26
-10
@@ -12,6 +12,7 @@ import * as buildStatusMetric from 'turtle/metrics/buildStatus';
|
||||
import { checkShouldExit, setCurrentJobId, turtleVersion } from 'turtle/turtleContext';
|
||||
import { getPriorities, labelConfiguration, TurtleMode } from 'turtle/utils/priorities';
|
||||
import * as redis from 'turtle/utils/redis';
|
||||
import { sendBuildStatusUpdate } from 'turtle/utils/www';
|
||||
import { sanitizeJob } from 'turtle/validator';
|
||||
|
||||
function _maybeExit() {
|
||||
@@ -73,7 +74,8 @@ async function processJob(jobData: any, turtleMode: TurtleMode) {
|
||||
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, {
|
||||
await sendBuildStatusUpdate(rawJob.id, {
|
||||
status: BUILD.JOB_STATES.ERRORED,
|
||||
turtleVersion,
|
||||
buildDuration: 0,
|
||||
reason: 'The build job is invalid',
|
||||
@@ -128,7 +130,7 @@ async function processJob(jobData: any, turtleMode: TurtleMode) {
|
||||
function failAfterMaxJobTime(priority: string, receiptHandle: string, job: any) {
|
||||
return setTimeout(async () => {
|
||||
try {
|
||||
sqs.sendMessage(job.id, BUILD.JOB_STATES.ERRORED, { turtleVersion });
|
||||
sendBuildStatusUpdate(job.id, { status: BUILD.JOB_STATES.ERRORED, turtleVersion });
|
||||
await deleteMessage(priority, receiptHandle);
|
||||
} finally {
|
||||
logger.error('Build timed out. Going to terminate turtle agent.');
|
||||
@@ -143,16 +145,28 @@ async function build(job: any, turtleMode: TurtleMode) {
|
||||
const s3Url = await logger.initForJob(job);
|
||||
const calculateBuildDuration = () => Math.ceil((Date.now() - startTimestamp) / 1000);
|
||||
|
||||
try {
|
||||
await sqs.sendMessage(job.id, BUILD.JOB_STATES.IN_PROGRESS, {
|
||||
logUrl: s3Url,
|
||||
logFormat: 'json',
|
||||
const commonPayload = {
|
||||
logs: {
|
||||
url: s3Url,
|
||||
format: 'json',
|
||||
},
|
||||
extraData: {
|
||||
turtleMode,
|
||||
},
|
||||
};
|
||||
try {
|
||||
await sendBuildStatusUpdate(job.id, {
|
||||
...commonPayload,
|
||||
status: BUILD.JOB_STATES.IN_PROGRESS,
|
||||
});
|
||||
const result = await (builders as any)[job.platform](job);
|
||||
const { artifactUrl } = await (builders as any)[job.platform](job);
|
||||
const buildDuration = calculateBuildDuration();
|
||||
sqs.sendMessage(job.id, BUILD.JOB_STATES.FINISHED, {
|
||||
...result,
|
||||
sendBuildStatusUpdate(job.id, {
|
||||
...commonPayload,
|
||||
artifacts: {
|
||||
url: artifactUrl,
|
||||
},
|
||||
status: BUILD.JOB_STATES.FINISHED,
|
||||
turtleVersion,
|
||||
buildDuration,
|
||||
});
|
||||
@@ -164,7 +178,9 @@ async function build(job: any, turtleMode: TurtleMode) {
|
||||
if (err instanceof BuildError) {
|
||||
reason = err.reason;
|
||||
}
|
||||
sqs.sendMessage(job.id, BUILD.JOB_STATES.ERRORED, {
|
||||
sendBuildStatusUpdate(job.id, {
|
||||
...commonPayload,
|
||||
status: BUILD.JOB_STATES.ERRORED,
|
||||
turtleVersion,
|
||||
buildDuration,
|
||||
...reason && { reason },
|
||||
|
||||
@@ -15,6 +15,7 @@ export default baseJobSchema.concat(
|
||||
config: Joi.object().keys({
|
||||
buildMode: Joi.string().valid(Object.values(ANDROID_BUILD_MODES)).default(ANDROID_BUILD_MODES.RELEASE),
|
||||
buildType: Joi.string().valid(Object.values(ANDROID_BUILD_TYPES)).default(ANDROID_BUILD_TYPES.APK),
|
||||
gradleArgs: Joi.array().items(Joi.string()),
|
||||
}),
|
||||
}),
|
||||
);
|
||||
@@ -6,6 +6,8 @@ import { doJob } from 'turtle/jobManager';
|
||||
import logger from 'turtle/logger';
|
||||
import setup from 'turtle/setup';
|
||||
import { checkShouldExit, setShouldExit, turtleVersion } from 'turtle/turtleContext';
|
||||
import { synchronizeFailedUpdates } from 'turtle/updatesManager';
|
||||
import Leader, { LeaderEvent } from 'turtle/utils/leader';
|
||||
import { setSupportedSdkVersions, setTurtleVersion } from 'turtle/utils/versions';
|
||||
|
||||
process.on('unhandledRejection', (err) => logger.error({ err }, 'Unhandled promise rejection'));
|
||||
@@ -33,6 +35,8 @@ async function main() {
|
||||
await setup[config.platform]();
|
||||
}
|
||||
|
||||
await electLeaderAndSynchronize();
|
||||
|
||||
try {
|
||||
await setTurtleVersion(turtleVersion);
|
||||
logger.info(`Registered Turtle version (${turtleVersion}) in www`);
|
||||
@@ -52,6 +56,28 @@ async function main() {
|
||||
}
|
||||
}
|
||||
|
||||
async function electLeaderAndSynchronize() {
|
||||
if (config.env === 'test') {
|
||||
return;
|
||||
|
||||
}
|
||||
const l = new Leader({
|
||||
key: config.leader.redisKey,
|
||||
id: config.hostname,
|
||||
ttl: config.leader.redisKeyTTLSec,
|
||||
});
|
||||
let intervalId: NodeJS.Timeout;
|
||||
l.on(LeaderEvent.elected, async () => {
|
||||
intervalId = await synchronizeFailedUpdates();
|
||||
});
|
||||
l.on(LeaderEvent.revoked, () => {
|
||||
if (intervalId) {
|
||||
clearInterval(intervalId);
|
||||
}
|
||||
});
|
||||
await l.elect();
|
||||
}
|
||||
|
||||
main()
|
||||
.then(() => logger.error('This should never happen...'))
|
||||
.catch((err) => logger.error({ err }, 'Something went terribly wrong'))
|
||||
|
||||
Vendored
+472
@@ -0,0 +1,472 @@
|
||||
interface pbxFile {
|
||||
basename: string;
|
||||
lastKnownFileType?: string;
|
||||
group?: string;
|
||||
path?: string;
|
||||
fileEncoding?: number;
|
||||
defaultEncoding?: number;
|
||||
sourceTree: string;
|
||||
includeInIndex?: number;
|
||||
explicitFileType?: unknown;
|
||||
settings?: object;
|
||||
uuid?: string;
|
||||
fileRef: string;
|
||||
target?: string;
|
||||
}
|
||||
|
||||
declare module 'xcode' {
|
||||
/**
|
||||
* UUID that is a key to each fragment of PBXProject.
|
||||
*/
|
||||
type UUID = string;
|
||||
|
||||
/**
|
||||
* if has following format `${UUID}_comment`
|
||||
*/
|
||||
type UUIDComment = string;
|
||||
|
||||
type XCObjectType =
|
||||
| 'PBXBuildFile'
|
||||
| 'PBXFileReference'
|
||||
| 'PBXFrameworksBuildPhase'
|
||||
| 'PBXGroup'
|
||||
| 'PBXNativeTarget'
|
||||
| 'PBXProject'
|
||||
| 'PBXResourcesBuildPhase'
|
||||
| 'PBXShellScriptBuildPhase'
|
||||
| 'PBXSourcesBuildPhase'
|
||||
| 'PBXVariantGroup'
|
||||
| 'XCBuildConfiguration'
|
||||
| 'XCConfigurationList';
|
||||
|
||||
type PBXFile = pbxFile;
|
||||
|
||||
interface PBXProject {
|
||||
isa: 'PBXProject';
|
||||
attributes: {
|
||||
LastUpgradeCheck: number;
|
||||
TargetAttributes: Record<
|
||||
UUID,
|
||||
{
|
||||
CreatedOnToolsVersion?: string;
|
||||
TestTargetID?: UUID;
|
||||
LastSwiftMigration?: number;
|
||||
ProvisioningStyle?: string;
|
||||
} & Record<string, undefined | number | string>
|
||||
>;
|
||||
};
|
||||
buildConfigurationList: UUID;
|
||||
buildConfigurationList_comment: string;
|
||||
compatibilityVersion: string;
|
||||
developmentRegion: string;
|
||||
hasScannedForEncodings: number;
|
||||
knownRegions: string[];
|
||||
mainGroup: UUID;
|
||||
productRefGroup: UUID;
|
||||
productRefGroup_comment: string;
|
||||
projectDirPath: string;
|
||||
projectRoot: string;
|
||||
targets: Array<{
|
||||
value: UUID;
|
||||
comment: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
interface PBXNativeTarget {
|
||||
isa: 'PBXNativeTarget';
|
||||
buildConfigurationList: UUID;
|
||||
buildConfigurationList_comment: string;
|
||||
buildPhases: Array<{
|
||||
value: UUID;
|
||||
comment: string;
|
||||
}>;
|
||||
buildRules: [];
|
||||
dependencies: [];
|
||||
name: string;
|
||||
productName: string;
|
||||
productReference: UUID;
|
||||
productReference_comment: string;
|
||||
productType: string;
|
||||
}
|
||||
|
||||
interface PBXBuildFile {
|
||||
isa: 'PBXBuildFile';
|
||||
fileRef: UUID;
|
||||
// "AppDelegate.m"
|
||||
fileRef_comment: string;
|
||||
}
|
||||
|
||||
interface XCConfigurationList {
|
||||
isa: 'XCConfigurationList';
|
||||
buildConfigurations: Array<{
|
||||
value: UUID;
|
||||
comment: string | 'Release' | 'Debug';
|
||||
}>;
|
||||
defaultConfigurationIsVisible: number;
|
||||
defaultConfigurationName: string;
|
||||
}
|
||||
|
||||
interface XCBuildConfiguration {
|
||||
isa: 'XCBuildConfiguration';
|
||||
baseConfigurationReference: UUID;
|
||||
baseConfigurationReference_comment: string;
|
||||
buildSettings: Record<string, string | undefined | number | Array<unknown>> & {
|
||||
// '"$(TARGET_NAME)"',
|
||||
PRODUCT_NAME?: string;
|
||||
// '"io.expo.demo.$(PRODUCT_NAME:rfc1034identifier)"',
|
||||
PRODUCT_BUNDLE_IDENTIFIER?: string;
|
||||
PROVISIONING_PROFILE_SPECIFIER?: string;
|
||||
// '"$(BUILT_PRODUCTS_DIR)/rni.app/rni"'
|
||||
TEST_HOST?: any;
|
||||
DEVELOPMENT_TEAM?: string;
|
||||
CODE_SIGN_IDENTITY?: string;
|
||||
CODE_SIGN_STYLE?: string;
|
||||
// '"$(TEST_HOST)"'
|
||||
BUNDLE_LOADER?: string;
|
||||
GCC_PREPROCESSOR_DEFINITIONS?: Array<unknown>;
|
||||
INFOPLIST_FILE?: string;
|
||||
IPHONEOS_DEPLOYMENT_TARGET?: string;
|
||||
LD_RUNPATH_SEARCH_PATHS?: string;
|
||||
OTHER_LDFLAGS?: Array<unknown>;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME?: string;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME?: string;
|
||||
CLANG_ANALYZER_NONNULL?: string;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS?: string;
|
||||
CLANG_WARN_INFINITE_RECURSION?: string;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE?: string;
|
||||
DEBUG_INFORMATION_FORMAT?: string;
|
||||
ENABLE_TESTABILITY?: string;
|
||||
GCC_NO_COMMON_BLOCKS?: string;
|
||||
// 'appletvos'
|
||||
SDKROOT?: string;
|
||||
TARGETED_DEVICE_FAMILY?: number | string;
|
||||
// '10.0'
|
||||
TVOS_DEPLOYMENT_TARGET?: string;
|
||||
};
|
||||
name: string;
|
||||
}
|
||||
|
||||
type ProductType =
|
||||
| 'com.apple.product-type.application'
|
||||
| 'com.apple.product-type.app-extension'
|
||||
| 'com.apple.product-type.bundle'
|
||||
| 'com.apple.product-type.tool'
|
||||
| 'com.apple.product-type.library.dynamic'
|
||||
| 'com.apple.product-type.framework'
|
||||
| 'com.apple.product-type.library.static'
|
||||
| 'com.apple.product-type.bundle.unit-test'
|
||||
| 'com.apple.product-type.application.watchapp'
|
||||
| 'com.apple.product-type.application.watchapp2'
|
||||
| 'com.apple.product-type.watchkit-extension'
|
||||
| 'com.apple.product-type.watchkit2-extension';
|
||||
|
||||
interface PBXGroup {
|
||||
isa: 'PBXGroup';
|
||||
children: Array<{
|
||||
value: UUID;
|
||||
comment?: string;
|
||||
}>;
|
||||
name: string;
|
||||
path?: string;
|
||||
sourceTree: '"<group>"' | unknown;
|
||||
}
|
||||
|
||||
export class XcodeProject {
|
||||
|
||||
/**
|
||||
* `.pbxproj` file path.
|
||||
*/
|
||||
public filepath: string;
|
||||
|
||||
// Ex: '$(TARGET_NAME)'
|
||||
public productName: string;
|
||||
|
||||
public hash: {
|
||||
headComment: string;
|
||||
project: {
|
||||
archiveVersion: number;
|
||||
objectVersion: number;
|
||||
objects: {
|
||||
[T in XCObjectType]: Record<
|
||||
string,
|
||||
{
|
||||
isa: T;
|
||||
name: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
>;
|
||||
};
|
||||
rootObject: string;
|
||||
rootObject_comment: string;
|
||||
};
|
||||
};
|
||||
constructor(pbxprojPath: string);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
//
|
||||
// `.pbxproj` related operation - starting & ending point.
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* First step to be executed while working with `.pbxproj` file.
|
||||
*/
|
||||
public parse(callback?: (err: Error | null, results?: string) => void): this;
|
||||
|
||||
public parseSync(): void;
|
||||
|
||||
/**
|
||||
* @returns Content of .pbxproj file.
|
||||
*/
|
||||
public writeSync(options?: { omitEmptyValues?: boolean }): string;
|
||||
|
||||
public allUuids(): UUID[];
|
||||
public generateUuid(): UUID;
|
||||
|
||||
public addPluginFile(path: unknown, opt: unknown): unknown;
|
||||
public removePluginFile(path: unknown, opt: unknown): unknown;
|
||||
public addProductFile(targetPath: unknown, opt: unknown): unknown;
|
||||
public removeProductFile(path: unknown, opt: unknown): unknown;
|
||||
public addSourceFile(path: string, opt: unknown, group: string): unknown;
|
||||
public removeSourceFile(path: string, opt: unknown, group: string): unknown;
|
||||
public addHeaderFile(path: string, opt: unknown, group: string): unknown;
|
||||
public removeHeaderFile(path: string, opt: unknown, group: string): unknown;
|
||||
public addResourceFile(path: string, opt: unknown, group: string): unknown;
|
||||
public removeResourceFile(path: string, opt: unknown, group: string): unknown;
|
||||
public addFramework(fpath: unknown, opt: unknown): unknown;
|
||||
public removeFramework(fpath: unknown, opt: unknown): unknown;
|
||||
public addCopyfile(fpath: unknown, opt: unknown): unknown;
|
||||
public pbxCopyfilesBuildPhaseObj(target: unknown): unknown;
|
||||
public addToPbxCopyfilesBuildPhase(file: unknown): void;
|
||||
public removeCopyfile(fpath: unknown, opt: unknown): unknown;
|
||||
public removeFromPbxCopyfilesBuildPhase(file: unknown): void;
|
||||
public addStaticLibrary(path: unknown, opt: unknown): unknown;
|
||||
/**
|
||||
* Adds to `PBXBuildFile` section
|
||||
*/
|
||||
public addToPbxBuildFileSection(file: PBXFile): void;
|
||||
public removeFromPbxBuildFileSection(file: unknown): void;
|
||||
public addPbxGroup(
|
||||
filePathsArray: string[],
|
||||
name: string,
|
||||
path: string,
|
||||
sourceTree?: string,
|
||||
): { uuid: UUID; pbxGroup: PBXGroup };
|
||||
public removePbxGroup(groupName: unknown): void;
|
||||
public addToPbxProjectSection(target: unknown): void;
|
||||
public addToPbxNativeTargetSection(target: unknown): void;
|
||||
public addToPbxFileReferenceSection(file: any): void;
|
||||
public removeFromPbxFileReferenceSection(file: unknown): unknown;
|
||||
public addToXcVersionGroupSection(file: unknown): void;
|
||||
public addToPluginsPbxGroup(file: unknown): void;
|
||||
public removeFromPluginsPbxGroup(file: unknown): unknown;
|
||||
public addToResourcesPbxGroup(file: unknown): void;
|
||||
public removeFromResourcesPbxGroup(file: unknown): unknown;
|
||||
public addToFrameworksPbxGroup(file: unknown): void;
|
||||
public removeFromFrameworksPbxGroup(file: unknown): unknown;
|
||||
public addToPbxEmbedFrameworksBuildPhase(file: unknown): void;
|
||||
public removeFromPbxEmbedFrameworksBuildPhase(file: unknown): void;
|
||||
public addToProductsPbxGroup(file: unknown): void;
|
||||
public removeFromProductsPbxGroup(file: unknown): unknown;
|
||||
public addToPbxSourcesBuildPhase(file: unknown): void;
|
||||
public removeFromPbxSourcesBuildPhase(file: unknown): void;
|
||||
/**
|
||||
* Adds to PBXResourcesBuildPhase` section
|
||||
* @param resourcesBuildPhaseSectionKey Because there's might more than one `Resources` build phase we need to ensure file is placed under correct one.
|
||||
*/
|
||||
public addToPbxResourcesBuildPhase(file: PBXFile): void;
|
||||
public removeFromPbxResourcesBuildPhase(file: unknown): void;
|
||||
public addToPbxFrameworksBuildPhase(file: unknown): void;
|
||||
public removeFromPbxFrameworksBuildPhase(file: unknown): void;
|
||||
public addXCConfigurationList(
|
||||
configurationObjectsArray: unknown,
|
||||
defaultConfigurationName: unknown,
|
||||
comment: unknown,
|
||||
): {
|
||||
uuid: unknown;
|
||||
xcConfigurationList: {
|
||||
isa: string;
|
||||
buildConfigurations: Array<unknown>;
|
||||
defaultConfigurationIsVisible: number;
|
||||
defaultConfigurationName: unknown;
|
||||
};
|
||||
};
|
||||
public addTargetDependency(
|
||||
target: unknown,
|
||||
dependencyTargets: unknown,
|
||||
): {
|
||||
uuid: unknown;
|
||||
target: unknown;
|
||||
};
|
||||
public addBuildPhase(
|
||||
filePathsArray: unknown,
|
||||
buildPhaseType: unknown,
|
||||
comment: unknown,
|
||||
target: unknown,
|
||||
optionsOrFolderType: unknown,
|
||||
subfolderPath: unknown,
|
||||
): {
|
||||
uuid: unknown;
|
||||
buildPhase: {
|
||||
isa: unknown;
|
||||
buildActionMask: number;
|
||||
files: Array<unknown>;
|
||||
runOnlyForDeploymentPostprocessing: number;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Retrieves main part describing PBXProjects that are available in `.pbxproj` file.
|
||||
*/
|
||||
public pbxProjectSection(): Record<UUID, PBXProject> & Record<UUIDComment, string>;
|
||||
public pbxBuildFileSection(): Record<UUID, PBXBuildFile> & Record<UUIDComment, string>;
|
||||
public pbxXCBuildConfigurationSection(): Record<UUID, XCBuildConfiguration> &
|
||||
Record<UUIDComment, string>;
|
||||
public pbxFileReferenceSection(): Record<UUID, PBXFile> & Record<UUIDComment, string>;
|
||||
public pbxNativeTargetSection(): Record<UUID, PBXNativeTarget> & Record<UUIDComment, string>;
|
||||
public xcVersionGroupSection(): unknown;
|
||||
public pbxXCConfigurationList(): Record<UUID, XCConfigurationList> & Record<UUIDComment, string>;
|
||||
public pbxGroupByName(name: string): PBXGroup | undefined;
|
||||
/**
|
||||
* @param targetName in most cases it's the name of the application
|
||||
*/
|
||||
public pbxTargetByName(targetName: string): PBXNativeTarget | undefined;
|
||||
public findTargetKey(name: string): string;
|
||||
public pbxItemByComment(name: string, pbxSectionName: unknown): unknown;
|
||||
public pbxSourcesBuildPhaseObj(target: unknown): unknown;
|
||||
public pbxResourcesBuildPhaseObj(target: unknown): unknown;
|
||||
public pbxFrameworksBuildPhaseObj(target: unknown): unknown;
|
||||
public pbxEmbedFrameworksBuildPhaseObj(target: unknown): unknown;
|
||||
public buildPhase(group: unknown, target: unknown): string;
|
||||
public buildPhaseObject(name: string, group: unknown, target: unknown): unknown;
|
||||
public addBuildProperty(prop: unknown, value: unknown, build_name: unknown): void;
|
||||
public removeBuildProperty(prop: unknown, build_name: unknown): void;
|
||||
public updateBuildProperty(prop: string, value: unknown, build: string): void;
|
||||
public updateProductName(name: string): void;
|
||||
public removeFromFrameworkSearchPaths(file: unknown): void;
|
||||
public addToFrameworkSearchPaths(file: unknown): void;
|
||||
public removeFromLibrarySearchPaths(file: unknown): void;
|
||||
public addToLibrarySearchPaths(file: unknown): void;
|
||||
public removeFromHeaderSearchPaths(file: unknown): void;
|
||||
public addToHeaderSearchPaths(file: unknown): void;
|
||||
public addToOtherLinkerFlags(flag: unknown): void;
|
||||
public removeFromOtherLinkerFlags(flag: unknown): void;
|
||||
public addToBuildSettings(buildSetting: unknown, value: unknown): void;
|
||||
public removeFromBuildSettings(buildSetting: unknown): void;
|
||||
/**
|
||||
* Checks whether there is a file with given `filePath` in the project.
|
||||
*/
|
||||
public hasFile(filePath: string): PBXFile | false;
|
||||
public addTarget(
|
||||
name: unknown,
|
||||
type: unknown,
|
||||
subfolder: unknown,
|
||||
): {
|
||||
uuid: unknown;
|
||||
pbxNativeTarget: {
|
||||
isa: string;
|
||||
name: string;
|
||||
productName: string;
|
||||
productReference: unknown;
|
||||
productType: string;
|
||||
buildConfigurationList: unknown;
|
||||
buildPhases: Array<unknown>;
|
||||
buildRules: Array<unknown>;
|
||||
dependencies: Array<unknown>;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Get First PBXProject that can be found in `.pbxproj` file.
|
||||
*/
|
||||
public getFirstProject(): { uuid: UUID; firstProject: PBXProject };
|
||||
public getFirstTarget(): {
|
||||
uuid: UUID;
|
||||
firstTarget: unknown;
|
||||
};
|
||||
/**
|
||||
* Retrieves PBXNativeTarget by the type
|
||||
*/
|
||||
public getTarget(productType: ProductType): { uuid: UUID; target: PBXNativeTarget } | null;
|
||||
public addToPbxGroupType(file: unknown, groupKey: unknown, groupType: unknown): void;
|
||||
public addToPbxVariantGroup(file: unknown, groupKey: unknown): void;
|
||||
public addToPbxGroup(file: PBXFile, groupKey: UUID): void;
|
||||
public pbxCreateGroupWithType(name: unknown, pathName: unknown, groupType: unknown): unknown;
|
||||
public pbxCreateVariantGroup(name: unknown): unknown;
|
||||
public pbxCreateGroup(name: string, pathName: string): UUID;
|
||||
public removeFromPbxGroupAndType(file: unknown, groupKey: unknown, groupType: unknown): void;
|
||||
public removeFromPbxGroup(file: unknown, groupKey: unknown): void;
|
||||
public removeFromPbxVariantGroup(file: unknown, groupKey: unknown): void;
|
||||
public getPBXGroupByKeyAndType(key: unknown, groupType: unknown): unknown;
|
||||
/**
|
||||
* @param groupKey UUID.
|
||||
*/
|
||||
public getPBXGroupByKey(groupKey: string): PBXGroup | undefined;
|
||||
public getPBXVariantGroupByKey(key: unknown): unknown;
|
||||
public findPBXGroupKeyAndType(criteria: unknown, groupType: unknown): string;
|
||||
/**
|
||||
* @param criteria Params that should be used to locate desired PBXGroup.
|
||||
*/
|
||||
public findPBXGroupKey(criteria: { name?: string; path?: string }): UUID | undefined;
|
||||
public findPBXVariantGroupKey(criteria: unknown): string;
|
||||
public addLocalizationVariantGroup(
|
||||
name: unknown,
|
||||
): {
|
||||
uuid: unknown;
|
||||
fileRef: unknown;
|
||||
basename: unknown;
|
||||
};
|
||||
public addKnownRegion(name: string): void;
|
||||
public removeKnownRegion(name: string): void;
|
||||
public hasKnownRegion(name: string): boolean;
|
||||
public getPBXObject(name: string): unknown;
|
||||
/**
|
||||
* - creates `PBXFile`
|
||||
* - adds to `PBXFileReference` section
|
||||
* - adds to `PBXGroup` or `PBXVariantGroup` if applicable
|
||||
* @returns `null` if file is already in `pbxproj`.
|
||||
*/
|
||||
public addFile(
|
||||
path: string,
|
||||
group?: string,
|
||||
opt?: {
|
||||
plugin?: string;
|
||||
target?: string;
|
||||
variantGroup?: string;
|
||||
lastKnownFileType?: string;
|
||||
defaultEncoding?: 4;
|
||||
customFramework?: true;
|
||||
explicitFileType?: number;
|
||||
weak?: true;
|
||||
compilerFLags?: string;
|
||||
embed?: boolean;
|
||||
sign?: boolean;
|
||||
},
|
||||
): PBXFile | null;
|
||||
public removeFile(path: unknown, group: unknown, opt: unknown): unknown;
|
||||
public getBuildProperty(prop: unknown, build: unknown): unknown;
|
||||
public getBuildConfigByName(name: unknown): object;
|
||||
public addDataModelDocument(filePath: unknown, group: unknown, opt: unknown): unknown;
|
||||
public addTargetAttribute(prop: unknown, value: unknown, target: unknown): void;
|
||||
public removeTargetAttribute(prop: unknown, target: unknown): void;
|
||||
}
|
||||
|
||||
export function project(projectPath: string): XcodeProject;
|
||||
}
|
||||
|
||||
declare module 'xcode/lib/pbxFile' {
|
||||
export default class PBXFile implements pbxFile {
|
||||
public basename: string;
|
||||
public lastKnownFileType?: string;
|
||||
public group?: string;
|
||||
public path?: string;
|
||||
public fileEncoding?: number;
|
||||
public defaultEncoding?: number;
|
||||
public sourceTree: string;
|
||||
public includeInIndex?: number;
|
||||
public explicitFileType?: unknown;
|
||||
public settings?: object;
|
||||
public uuid?: string;
|
||||
public fileRef: string;
|
||||
public target?: string;
|
||||
constructor(file: string);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
import Redis from 'ioredis';
|
||||
import chunk from 'lodash/chunk';
|
||||
|
||||
import config from 'turtle/config';
|
||||
import { getRedisClient, RedisClient } from 'turtle/utils/redis';
|
||||
import { sendBuildStatusUpdate, sendCredentialsUpdate } from 'turtle/utils/www';
|
||||
|
||||
const RETRY_COUNT = 5;
|
||||
|
||||
type UpdateType = 'build' | 'credentials';
|
||||
interface IUpdate {
|
||||
type: UpdateType;
|
||||
buildId: string;
|
||||
updateBody: any;
|
||||
retried: number;
|
||||
}
|
||||
|
||||
export async function saveUpdateFailure(buildId: string, type: UpdateType, updateBody: object): Promise<void> {
|
||||
if (config.env === 'test') {
|
||||
return;
|
||||
}
|
||||
const redis = await getRedisClient(RedisClient.Configuration) as Redis.Redis;
|
||||
const update: IUpdate = {
|
||||
type,
|
||||
buildId,
|
||||
updateBody,
|
||||
retried: 0,
|
||||
};
|
||||
await redis.set(getFailedUpdateKey(buildId), JSON.stringify(update));
|
||||
}
|
||||
|
||||
export async function synchronizeFailedUpdates(intervalMs = 3 * 60 * 1000): Promise<NodeJS.Timeout> {
|
||||
try {
|
||||
await _synchronizeFailedUpdates();
|
||||
} catch (err) {
|
||||
// don't do anything
|
||||
}
|
||||
return setInterval(() => _synchronizeFailedUpdates(), intervalMs);
|
||||
}
|
||||
|
||||
async function _synchronizeFailedUpdates(): Promise<void> {
|
||||
const redis = await getRedisClient(RedisClient.Configuration) as Redis.Redis;
|
||||
const keys = await redis.keys(getFailedUpdateKey('*'));
|
||||
const keyChunks = chunk(keys, 20);
|
||||
for (const keyChunk of keyChunks) {
|
||||
await Promise.all(keyChunk.map((key: string) => resendUpdateForKey(key)));
|
||||
}
|
||||
}
|
||||
|
||||
async function resendUpdateForKey(key: string): Promise<void> {
|
||||
try {
|
||||
const redis = await getRedisClient(RedisClient.Configuration) as Redis.Redis;
|
||||
const updateRaw = await redis.get(key);
|
||||
if (updateRaw) {
|
||||
const update = JSON.parse(updateRaw) as IUpdate;
|
||||
try {
|
||||
await resendUpdateToWWW(update);
|
||||
await redis.del(key);
|
||||
} catch (err) {
|
||||
update.retried += 1;
|
||||
if (update.retried >= RETRY_COUNT) {
|
||||
await redis.del(key);
|
||||
} else {
|
||||
await redis.set(key, JSON.stringify(update));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
// don't do anything
|
||||
}
|
||||
}
|
||||
|
||||
async function resendUpdateToWWW(update: IUpdate): Promise<void> {
|
||||
const { type, buildId, updateBody } = update;
|
||||
if (type === 'build') {
|
||||
await sendBuildStatusUpdate(buildId, updateBody);
|
||||
} else if (type === 'credentials') {
|
||||
const { platform, ...rest } = updateBody;
|
||||
await sendCredentialsUpdate(buildId, platform, rest);
|
||||
}
|
||||
}
|
||||
|
||||
const getFailedUpdateKey = (buildId: string) => `${config.deploymentEnv}:failed-update:${buildId}`;
|
||||
@@ -0,0 +1,164 @@
|
||||
import { EventEmitter } from 'events';
|
||||
import Redis from 'ioredis';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { getRedisClient, RedisClient } from 'turtle/utils/redis';
|
||||
|
||||
interface ILeaderParams {
|
||||
key: string;
|
||||
id?: string;
|
||||
ttl?: number;
|
||||
wait?: number;
|
||||
}
|
||||
|
||||
const RENEW_LEADER_SCRIPT = `
|
||||
local leader_key = KEYS[1]
|
||||
local leader_id = KEYS[2]
|
||||
local leader_ttl = KEYS[3]
|
||||
|
||||
local current_leader
|
||||
|
||||
current_leader = redis.call("get", leader_key)
|
||||
if (current_leader == leader_id) then
|
||||
redis.call("pexpire", leader_key, leader_ttl)
|
||||
return "ok"
|
||||
else
|
||||
return "you_are_not_the_leader"
|
||||
end
|
||||
`;
|
||||
|
||||
const STOP_BEING_LEADER_SCRIPT = `
|
||||
local leader_key = KEYS[1]
|
||||
local leader_id = KEYS[2]
|
||||
|
||||
local current_leader
|
||||
|
||||
current_leader = redis.call("get", leader_key)
|
||||
if (current_leader == leader_id) then
|
||||
redis.call("del", leader_key)
|
||||
return "ok"
|
||||
else
|
||||
return "you_are_not_the_leader"
|
||||
end
|
||||
`;
|
||||
|
||||
interface IRedisCustom extends Redis.Redis {
|
||||
renewLeader(key: string, id: string, ttl: number): Promise<string>;
|
||||
stopBeingLeader(key: string, id: string): Promise<string>;
|
||||
}
|
||||
|
||||
enum LeaderEvent {
|
||||
elected = 'elected',
|
||||
revoked = 'revoked',
|
||||
error = 'error',
|
||||
}
|
||||
|
||||
class Leader extends EventEmitter {
|
||||
private key: string;
|
||||
private id: string;
|
||||
private ttl: number;
|
||||
private wait: number;
|
||||
private waitId?: NodeJS.Timeout;
|
||||
private redisClientValue?: IRedisCustom;
|
||||
private renewId?: NodeJS.Timeout;
|
||||
private started = false;
|
||||
|
||||
constructor({ key, id, ttl = 30, wait = 1000 }: ILeaderParams) {
|
||||
super();
|
||||
|
||||
this.key = key;
|
||||
this.id = id || uuid();
|
||||
this.ttl = ttl * 1000;
|
||||
this.wait = wait;
|
||||
}
|
||||
public async elect(): Promise<void> {
|
||||
if (!this.redisClientValue) {
|
||||
await this.init();
|
||||
}
|
||||
|
||||
if (!this.started) {
|
||||
this.started = true;
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await this.redisClient.set(this.key, this.id, 'PX', this.ttl, 'NX');
|
||||
if (res === null) {
|
||||
this.waitId = setTimeout(() => {
|
||||
this.elect();
|
||||
}, this.wait);
|
||||
} else {
|
||||
this.emit(LeaderEvent.elected);
|
||||
this.renewId = setInterval(() => {
|
||||
this.renew();
|
||||
}, this.ttl / 2);
|
||||
}
|
||||
} catch (err) {
|
||||
this.emit(LeaderEvent.error, err);
|
||||
}
|
||||
}
|
||||
|
||||
public async stop(): Promise<void> {
|
||||
if (!this.started) {
|
||||
throw new Error('You should start the election first!');
|
||||
}
|
||||
try {
|
||||
const res = await this.redisClient.stopBeingLeader(this.key, this.id);
|
||||
if (res === 'ok') {
|
||||
this.emit(LeaderEvent.revoked);
|
||||
}
|
||||
if (this.renewId) {
|
||||
clearInterval(this.renewId);
|
||||
}
|
||||
if (this.waitId) {
|
||||
clearTimeout(this.waitId);
|
||||
}
|
||||
this.redisClientValue?.disconnect();
|
||||
this.redisClientValue = undefined;
|
||||
} catch (err) {
|
||||
this.emit(LeaderEvent.error, err);
|
||||
}
|
||||
}
|
||||
|
||||
private get redisClient(): IRedisCustom {
|
||||
if (!this.redisClientValue) {
|
||||
throw new Error('Please run the init method first!');
|
||||
}
|
||||
return this.redisClientValue as IRedisCustom;
|
||||
}
|
||||
|
||||
private async init(): Promise<void> {
|
||||
if (this.redisClientValue) {
|
||||
return;
|
||||
}
|
||||
this.redisClientValue = await getRedisClient(RedisClient.Configuration);
|
||||
const redisClient = this.redisClient as IRedisCustom;
|
||||
redisClient.defineCommand('renewLeader', {
|
||||
numberOfKeys: 3,
|
||||
lua: RENEW_LEADER_SCRIPT,
|
||||
});
|
||||
redisClient.defineCommand('stopBeingLeader', {
|
||||
numberOfKeys: 2,
|
||||
lua: STOP_BEING_LEADER_SCRIPT,
|
||||
});
|
||||
}
|
||||
|
||||
private async renew(): Promise<void> {
|
||||
try {
|
||||
const result = await this.redisClient.renewLeader(this.key, this.id, this.ttl);
|
||||
if (result === 'you_are_not_the_leader') {
|
||||
if (this.renewId) {
|
||||
clearInterval(this.renewId);
|
||||
}
|
||||
this.waitId = setTimeout(() => {
|
||||
this.elect();
|
||||
}, this.wait);
|
||||
this.emit(LeaderEvent.revoked);
|
||||
}
|
||||
} catch (err) {
|
||||
this.emit(LeaderEvent.error, err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Leader;
|
||||
export { LeaderEvent };
|
||||
@@ -10,7 +10,7 @@ async function setSupportedSdkVersions(platform: string, sdkVersions: string[])
|
||||
method: 'POST',
|
||||
uri: href,
|
||||
headers: {
|
||||
'secret-token': config.www.sdkVersionsSecretToken,
|
||||
'secret-token': config.www.secretToken,
|
||||
},
|
||||
body: {
|
||||
platform,
|
||||
@@ -26,7 +26,7 @@ async function setTurtleVersion(version: string) {
|
||||
method: 'POST',
|
||||
uri: href,
|
||||
headers: {
|
||||
'secret-token': config.www.sdkVersionsSecretToken,
|
||||
'secret-token': config.www.secretToken,
|
||||
},
|
||||
body: {
|
||||
version,
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
import { URL } from 'url';
|
||||
|
||||
import request from 'request-promise';
|
||||
|
||||
import config from 'turtle/config';
|
||||
import { saveUpdateFailure } from 'turtle/updatesManager';
|
||||
|
||||
async function sendBuildStatusUpdate(buildId: string, updateParams: object) {
|
||||
const { href } = new URL(`/--/api/v2/turtle-legacy-builds/${buildId}`, resolveWWWEndpoint());
|
||||
try {
|
||||
await request({
|
||||
method: 'PUT',
|
||||
uri: href,
|
||||
headers: {
|
||||
'secret-token': config.www.secretToken,
|
||||
},
|
||||
body: updateParams,
|
||||
json: true,
|
||||
});
|
||||
} catch (err) {
|
||||
await saveUpdateFailure(buildId, 'build', updateParams);
|
||||
}
|
||||
}
|
||||
|
||||
async function sendCredentialsUpdate(buildId: string, platform: 'android' | 'ios', updateParams: object) {
|
||||
const { href } = new URL(`/--/api/v2/turtle-legacy-builds/${buildId}/credentials`, resolveWWWEndpoint());
|
||||
try {
|
||||
await request({
|
||||
method: 'PUT',
|
||||
uri: href,
|
||||
headers: {
|
||||
'secret-token': config.www.secretToken,
|
||||
},
|
||||
body: {
|
||||
platform,
|
||||
...updateParams,
|
||||
},
|
||||
json: true,
|
||||
});
|
||||
} catch (err) {
|
||||
await saveUpdateFailure(buildId, 'credentials', updateParams);
|
||||
}
|
||||
}
|
||||
|
||||
function resolveWWWEndpoint() {
|
||||
const currentEnv = config.deploymentEnv;
|
||||
if (currentEnv === 'production') {
|
||||
return 'https://exp.host';
|
||||
} else if (currentEnv === 'staging') {
|
||||
return 'https://staging.exp.host';
|
||||
} else {
|
||||
return 'http://127.0.0.1:3000';
|
||||
}
|
||||
}
|
||||
|
||||
export { sendBuildStatusUpdate, sendCredentialsUpdate };
|
||||
+6
-1
@@ -10,5 +10,10 @@
|
||||
},
|
||||
"rulesDirectory": [
|
||||
"node_modules/tslint-eslint-rules/dist/rules"
|
||||
]
|
||||
],
|
||||
"linterOptions": {
|
||||
"exclude": [
|
||||
"src/types/xcode.d.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user