diff options
author | tobrun <tobrun.van.nuland@gmail.com> | 2018-07-23 11:35:31 +0200 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2018-07-23 19:18:54 +0200 |
commit | 3821f74079f88b6a5b3b0ea210fe529132a3494f (patch) | |
tree | 5cd64f75c72b14385c705408f0e5af02bc90801d | |
parent | 31cace784ed6d3a0e25e593bdabdb5e41ee8919a (diff) | |
download | qtlocation-mapboxgl-3821f74079f88b6a5b3b0ea210fe529132a3494f.tar.gz |
[android] - fix circle ci configuration for building forked PRs
-rw-r--r-- | circle.yml | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/circle.yml b/circle.yml index 29e8de1d38..784ee2530c 100644 --- a/circle.yml +++ b/circle.yml @@ -398,8 +398,10 @@ jobs: - run: name: Build Test APK command: | - echo "${MAPBOX_DEVELOPER_CONFIG_XML}" > platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml - make android-ui-test-arm-v7 + if [[ $MAPBOX_DEVELOPER_CONFIG_XML ]]; then + echo "${MAPBOX_DEVELOPER_CONFIG_XML}" > platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml + make android-ui-test-arm-v7 + fi - *show-ccache-stats - *save-node_modules-cache - *save-mason_packages-cache @@ -409,19 +411,23 @@ jobs: name: Log in to Google Cloud Platform shell: /bin/bash -euo pipefail command: | - echo "${GCLOUD_SERVICE_ACCOUNT_JSON}" > secret.json - gcloud auth activate-service-account --key-file secret.json --project android-gl-native - rm secret.json + if [[ $GCLOUD_SERVICE_ACCOUNT_JSON ]]; then + echo "${GCLOUD_SERVICE_ACCOUNT_JSON}" > secret.json + gcloud auth activate-service-account --key-file secret.json --project android-gl-native + rm secret.json + fi - run: name: Run instrumentation tests on Firebase no_output_timeout: 1200 shell: /bin/bash -euo pipefail command: | - gcloud firebase test android models list - gcloud firebase test android run --type instrumentation \ - --app platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/debug/MapboxGLAndroidSDKTestApp-debug.apk \ - --test platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/debug/MapboxGLAndroidSDKTestApp-debug-androidTest.apk \ - --device-ids sailfish --os-version-ids 26 --locales en --orientations portrait --timeout 20m + if [[ $GCLOUD_SERVICE_ACCOUNT_JSON ]]; then + gcloud firebase test android models list + gcloud firebase test android run --type instrumentation \ + --app platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/debug/MapboxGLAndroidSDKTestApp-debug.apk \ + --test platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/debug/MapboxGLAndroidSDKTestApp-debug-androidTest.apk \ + --device-ids sailfish --os-version-ids 26 --locales en --orientations portrait --timeout 20m + fi - store_artifacts: path: platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/debug destination: . @@ -463,12 +469,14 @@ jobs: name: Generate Maven credentials shell: /bin/bash -euo pipefail command: | - aws s3 cp s3://mapbox/android/signing-credentials/secring.gpg platform/android/MapboxGLAndroidSDK/secring.gpg - echo "NEXUS_USERNAME=$PUBLISH_NEXUS_USERNAME - NEXUS_PASSWORD=$PUBLISH_NEXUS_PASSWORD - signing.keyId=$SIGNING_KEYID - signing.password=$SIGNING_PASSWORD - signing.secretKeyRingFile=secring.gpg" >> platform/android/MapboxGLAndroidSDK/gradle.properties + if [[ $PUBLISH_NEXUS_USERNAME ]]; then + aws s3 cp s3://mapbox/android/signing-credentials/secring.gpg platform/android/MapboxGLAndroidSDK/secring.gpg + echo "NEXUS_USERNAME=$PUBLISH_NEXUS_USERNAME + NEXUS_PASSWORD=$PUBLISH_NEXUS_PASSWORD + signing.keyId=$SIGNING_KEYID + signing.password=$SIGNING_PASSWORD + signing.secretKeyRingFile=secring.gpg" >> platform/android/MapboxGLAndroidSDK/gradle.properties + fi - run: name: Update version name command: | |