* use http endpoints for status updates * resend updates if www failed to process them * make leader responsible for synchronizing build updates * fix tests
2.6 KiB
Turtle Development
Prerequisites
- Working
wwwservice, see this README for more details. - Own AWS SQS queues. See this README to learn more.
Setup
- Run
update-local-secretsto 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-queuefile 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:localoryarn set-workingdir:remote::localcreates symlinks to the shell apps inexporepository (unfortunately this is currently broken):remotedownloads precompiled shell apps
- Run
yarnto install node modules. - Run
yarn start:iosoryarn start:androidto run Turtle.
Updating shell apps
TODO
Generating recording files for smoke tests
Smoke tests are powered by Nock which uses JSON files containing responses to the HTTP requests fired by the build process.
To record new responses remove old recording.json and run tests and then manually schedule a build with expo-cli tool.
As a precaution, the file with HTTP requests/responses contains, among other things, iOS certificates used for the test build, is
encrypted with git-crypt. Remember not to revoke them, because then the tests will fail.
Other notes
Turtle uses Redis to get notifications (from www) about builds cancellations. To make this feature working, you have to use the same Redis instance as www. Therefore, you need to remember about starting www before starting Turtle. If you forget about it, don't worry, Turtle will remind you to run yarn start-docker in server/www directory.
Turtle uploads build artifacts to S3. This could take some time if you have a poor internet connection. To facilitate local development, there is a feature which allows Turtle to fake artifacts upload. secrets:init-private script, which you should have run while setting up Turtle, sets fake upload directory to your user's default Downloads directory (we're assuming you're using Mac). If you need to test uploading artifacts to S3, you have to edit .secrets.local file and comment or remove TURTLE_FAKE_UPLOAD and TURTLE_FAKE_UPLOAD_DIR environment variables.