forked from MozillaReality/FirefoxReality
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.taskcluster.yml
139 lines (137 loc) · 5.54 KB
/
.taskcluster.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
version: 0
allowPullRequests: public
tasks:
###############################################################################
# Task: Pull requests
#
# Triggered whenever a pull request is opened or updated.
#
# - Build the app (all flavors)
###############################################################################
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
extra:
github:
events:
- pull_request.opened
- pull_request.edited
- pull_request.synchronize
- pull_request.reopened
payload:
maxRunTime: 7200
image: 'mozillamixedreality/firefoxreality'
command:
- /bin/bash
- '--login'
- '-cx'
- >-
git fetch {{ event.head.repo.url }} {{ event.head.repo.branch }}
&& git config advice.detachedHead false
&& git checkout {{event.head.sha}}
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
&& git submodule update
&& ./gradlew --no-daemon --console=plain clean assembleNoapi assembleGooglevr
metadata:
name: Firefox Reality for Android - Build - Pull Request
description: Building Firefox Reality for Android (via Gradle) - triggered by a pull request.
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'
###############################################################################
# Task: Master builds
#
# Triggered whenever something is pushed/merged to the master branch.
###############################################################################
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
extra:
github:
env: true
events:
- push
branches:
- master
scopes:
- "secrets:get:project/firefoxreality/github-deploy-key"
- "secrets:get:project/firefoxreality/staging-signing-token"
- "secrets:get:project/firefoxreality/symbols-token"
payload:
maxRunTime: 7200
image: 'mozillamixedreality/firefoxreality'
features:
taskclusterProxy: true
command:
- /bin/bash
- '--login'
- '-cx'
- >-
git fetch origin
&& git config advice.detachedHead false
&& git rebase origin/master
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
&& git submodule update
&& . tools/taskcluster/get_third_party.sh
&& cp tools/gradle/taskcluster.properties ./user.properties
&& ./gradlew --no-daemon --console=plain clean assembleNoapi assembleGooglevr assembleWavevr assembleSvr assembleOculusvr
&& . tools/taskcluster/sign.sh staging-signing-token
&& . tools/taskcluster/upload_symbols.sh
artifacts:
'public':
type: 'directory'
path: '/opt/FirefoxReality/builds/'
expires: "{{ '1 week' | $fromNow }}"
metadata:
name: Firefox Reality for Android - Build - Master update
description: Building Firefox Reality for Android (via Gradle) - triggered by update to master
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'
###############################################################################
# Task: Release builds
#
# Triggered when a new tag or release is published (in any branch)
#
# - Build (unsigned) release versions of the app with release translations and
# adjust token.
###############################################################################
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
extra:
github:
events:
- release
scopes:
- "secrets:get:project/firefoxreality/github-deploy-key"
- "secrets:get:project/firefoxreality/release-signing-token"
- "secrets:get:project/firefoxreality/symbols-token"
payload:
maxRunTime: 7200
image: 'mozillamixedreality/firefoxreality'
features:
taskclusterProxy: true
command:
- /bin/bash
- '--login'
- '-cx'
- >-
git fetch origin
&& git config advice.detachedHead false
&& git checkout {{ event.version }}
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
&& git submodule update
&& . tools/taskcluster/get_third_party.sh
&& cp tools/gradle/taskcluster.properties ./user.properties
&& ./gradlew --no-daemon --console=plain clean assembleNoapi assembleGooglevr assembleWavevr assembleSvr assembleOculusvr
&& . tools/taskcluster/sign.sh release-signing-token -r
&& . tools/taskcluster/upload_symbols.sh
artifacts:
'public':
type: 'directory'
path: '/opt/FirefoxReality/builds/'
expires: "{{ '1 year' | $fromNow }}"
metadata:
name: Firefox Reality for Android - Release Build ({{ event.version }})
description: Building Firefox Reality for Android (via Gradle) - triggered by release
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'