Files
flipper/.circleci/config.yml
Pascal Hartig b5e613141e Set up automated retry (#1714)
Summary:
Circle occasionally fails with a network error in one of the Android dependencies. This uses a simple retry to alleviate the need to manually restart the tasks.

Pull Request resolved: https://github.com/facebook/flipper/pull/1714

Test Plan: Ran this on my private fork: https://app.circleci.com/pipelines/github/passy/flipper-1/9/workflows/e1b40086-1dce-49eb-a178-81052145ed0f

Reviewed By: nikoant

Differential Revision: D25170790

Pulled By: passy

fbshipit-source-id: 220759fb227855eac807d64f41c78f5781599515
2020-11-27 09:11:19 -08:00

53 lines
1.4 KiB
YAML

version: 2.1
executors:
default-executor:
docker:
- image: circleci/android:api-29-ndk
resource_class: large
environment:
_JAVA_OPTIONS: "-Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:ParallelGCThreads=2 -XX:ConcGCThreads=2 -XX:ParallelGCThreads=2 -Djava.util.concurrent.ForkJoinPool.common.parallelism=2"
TERM: 'dumb'
jobs:
snapshot:
executor: default-executor
steps:
- checkout
- run:
name: install retry
command: scripts/install-retry.sh
- run:
name: build and deploy
command: |
yes | sdkmanager "platforms;android-27" || true
/tmp/retry -m 3 ./gradlew :android:assembleRelease
/tmp/retry -m 3 scripts/publish-android-snapshot.sh
release:
executor: default-executor
steps:
- checkout
- run:
name: install retry
command: scripts/install-retry.sh
- run:
name: build and deploy
command: |
yes | sdkmanager "platforms;android-27" || true
/tmp/retry -m 3 ./gradlew :android:assembleRelease
/tmp/retry -m 3 scripts/publish-android-release.sh
workflows:
version: 2
build-and-deploy:
jobs:
- snapshot:
filters:
branches:
only: master
- release:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/