@@ -11,7 +11,10 @@ tasks:
1111 $if : ' tasks_for == "github-pull-request"'
1212 then : ${event.pull_request.head.repo.clone_url}
1313 else : ${event.repository.clone_url}
14-
14+ isFeatureBranch :
15+ $if : ' tasks_for == "github-push"'
16+ then : {$eval: 'event.ref[0:19] == "refs/heads/feature/"'}
17+ else : false
1518 in :
1619# ##############################################################################
1720# Task: Pull requests
@@ -53,50 +56,56 @@ tasks:
5356# testing only and should not be uploaded to App Stores.
5457#
5558# ##############################################################################
56- - $if : ' tasks_for == "github-push" && event["ref"] == "refs/heads/master"'
59+ - $if : ' tasks_for == "github-push" && ( event["ref"] == "refs/heads/master" || isFeatureBranch == true) '
5760 then :
58- provisionerId : ' aws-provisioner-v1'
59- workerType : ' github-worker'
60- deadline : {$fromNow: 1 day}
61- expires : {$fromNow: 1 year}
62- scopes :
63- - " secrets:get:project/firefoxreality/github-deploy-key"
64- - " secrets:get:project/firefoxreality/staging-signing-token"
65- - " secrets:get:project/firefoxreality/symbols-token"
66- routes :
67- 68- payload :
69- maxRunTime : 14400
70- image : ' mozillamixedreality/firefoxreality:190312'
71- features :
72- taskclusterProxy : true
73- command :
74- - /bin/bash
75- - ' --login'
76- - ' -cx'
77- - >-
78- git fetch origin
79- && git config advice.detachedHead false
80- && git rebase origin/master
81- && rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
82- && git submodule update
83- && . tools/taskcluster/get_third_party.sh
84- && cp tools/gradle/taskcluster.properties ./user.properties
85- && ./gradlew --no-daemon --console=plain clean `python tools/taskcluster/build_targets.py =all`
86- && python tools/taskcluster/fetch_secret.py -s project/firefoxreality/staging-signing-token -o token -n token
87- && python tools/taskcluster/sign_apk.py -t token
88- && python tools/taskcluster/archive_debug_apk.py
89- && . tools/taskcluster/upload_symbols.sh
90- artifacts :
91- ' public ' :
92- type : ' directory'
93- path : ' /opt/FirefoxReality/builds/'
94- expires : {$fromNow: '1 month'}
95- metadata :
96- name : Firefox Reality for Android - Build - Master update
97- description : Building Firefox Reality for Android (via Gradle) - triggered by update to master
98- 99- source : ${repository}
61+ $let :
62+ featureName :
63+ $if : ' isFeatureBranch == true'
64+ then : " -f ${event.ref[19:]}"
65+ else : " -f master"
66+ in :
67+ provisionerId : ' aws-provisioner-v1'
68+ workerType : ' github-worker'
69+ deadline : {$fromNow: 1 day}
70+ expires : {$fromNow: 1 year}
71+ scopes :
72+ - " secrets:get:project/firefoxreality/github-deploy-key"
73+ - " secrets:get:project/firefoxreality/staging-signing-token"
74+ - " secrets:get:project/firefoxreality/symbols-token"
75+ routes :
76+ 77+ payload :
78+ maxRunTime : 14400
79+ image : ' mozillamixedreality/firefoxreality:190312'
80+ features :
81+ taskclusterProxy : true
82+ command :
83+ - /bin/bash
84+ - ' --login'
85+ - ' -cx'
86+ - >-
87+ git fetch origin
88+ && git config advice.detachedHead false
89+ && git checkout ${event.ref}
90+ && rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk
91+ && git submodule update
92+ && . tools/taskcluster/get_third_party.sh
93+ && cp tools/gradle/taskcluster.properties ./user.properties
94+ && ./gradlew --no-daemon --console=plain clean `python tools/taskcluster/build_targets.py =all`
95+ && python tools/taskcluster/fetch_secret.py -s project/firefoxreality/staging-signing-token -o token -n token
96+ && python tools/taskcluster/sign_apk.py -t token ${featureName}
97+ && python tools/taskcluster/archive_debug_apk.py
98+ && . tools/taskcluster/upload_symbols.sh
99+ artifacts :
100+ ' public ' :
101+ type : ' directory'
102+ path : ' /opt/FirefoxReality/builds/'
103+ expires : {$fromNow: '1 month'}
104+ metadata :
105+ name : Firefox Reality for Android - Build - Master update
106+ description : Building Firefox Reality for Android (via Gradle) - triggered by update to master or feature branch
107+ 108+ source : ${repository}
100109# ##############################################################################
101110# Task: Release builds
102111#
0 commit comments