-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitrise.yml
77 lines (74 loc) · 2.67 KB
/
bitrise.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
format_version: 1.2.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: nogpservices
workflow: nogpservices
- push_branch: publish
workflow: publish
- push_branch: "*"
workflow: primary
workflows:
primary:
steps:
- gradle-runner:
inputs:
- gradle_task: "$CHECKSTYLE_TASK"
- script:
title: Configure Google Cloud SDK
run_if: '{{enveq "SKIPCI" "false"}}'
inputs:
- content: |-
#!/bin/bash
# Install python tools for pip
sudo apt-get install -y gcc python-dev python-setuptools
sudo easy_install -U pip
sudo pip uninstall crcmod
sudo pip install -U crcmod
# Install Google Cloud SDK for Firebase
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install -y google-cloud-sdk
- script:
title: Run Firebase instrumentation tests
inputs:
- content: |-
#!/bin/bash
echo "Build seperate test apk:"
./gradlew :MapboxAndroidDemo:assembleGpservicesDebug --continue
# Get authentication secret
echo "Downloading Google Cloud authentication:"
wget -O secret.json "$BITRISEIO_FIREBASE_JSON_URL"
echo "Run tests on firebase:"
gcloud auth activate-service-account --key-file secret.json --project mapbox-android-demo
gcloud beta test android run --type robo --app MapboxAndroidDemo/build/outputs/apk/MapboxAndroidDemo-gpservices-debug.apk --device-ids shamu --os-version-ids 22 --locales en --orientations portrait --timeout 10m
- deploy-to-bitrise-io:
inputs:
- notify_user_groups: none
publish:
steps:
- gradle-runner:
inputs:
- gradle_task: "$GRADLE_TASK"
- sign-apk: {}
- google-play-deploy:
inputs:
- service_account_json_key_path: "$BITRISEIO_SERVICE_ACCOUNT_JSON_URL"
- package_name: com.mapbox.mapboxandroiddemo
- track: beta
- whatsnews_dir: whatsnew
- service_account_email: ''
- key_file_path: ''
- deploy-to-bitrise-io:
inputs:
- notify_user_groups: android
nogpservices:
steps:
- gradle-runner:
inputs:
- gradle_task: "$NO_GPS_GRADLE_TASK"
- sign-apk: {}
- deploy-to-bitrise-io:
inputs:
- notify_user_groups: android