Fix CircleCI maven snapshot build (#4257)

Summary:
It somehow broke with 16983deaaf and failed with a fairly unspecific error message: https://app.circleci.com/pipelines/github/facebook/flipper/11548/workflows/5f114b29-edd8-4a12-97c0-97e2b6e2aef3/jobs/6136

This fixes it and also upgrades the build to make use of the new "orb" system Circle CI provides.

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

Reviewed By: mweststrate

Differential Revision: D40641195

Pulled By: passy

fbshipit-source-id: ca99a6063ff4aca97510ea8b65f6d466f86a72fd
This commit is contained in:
Pascal Hartig
2022-10-25 02:57:26 -07:00
committed by Facebook GitHub Bot
parent a520c422eb
commit 3129250a12

View File

@@ -1,28 +1,32 @@
version: 2.1
executors:
default-executor:
docker:
- image: circleci/android:api-30-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'
orbs:
android: circleci/android@2.1.2
jobs:
snapshot:
executor: default-executor
environment:
TERM: 'dumb'
executor:
name: android/android-machine
tag: 2021.10.1
resource-class: large
steps:
- checkout
- android/restore-gradle-cache:
cache-prefix: v1a
- run:
name: install retry
command: scripts/install-retry.sh
- run:
name: build and deploy
name: build
command: |
yes | sdkmanager "platforms;android-30" || true
/tmp/retry -m 3 ./gradlew :android:assembleRelease --info
- run:
name: deploy snapshot
command: |
yes | sdkmanager "platforms;android-27" || true
/tmp/retry -m 3 ./gradlew :android:assembleRelease
/tmp/retry -m 3 scripts/publish-android-snapshot.sh
- android/save-gradle-cache:
cache-prefix: v1a
workflows:
version: 2
build-and-deploy: