You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iceraven-browser/.taskcluster.yml

95 lines
3.9 KiB
YAML

# 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
####################################################################################################
- 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: 3600
deadline: "{{ '2 hours' | $fromNow }}"
image: 'mozillamobile/phoenix:1.0'
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}}
&& ./gradlew --no-daemon clean assemble test detektCheck ktlint lint
artifacts:
'public/reports':
type: 'directory'
path: '/build/phoenix/build/reports'
expires: "{{ '1 week' | $fromNow }}"
'public/app/reports':
type: 'directory'
path: '/build/phoenix/app/build/reports'
expires: "{{ '1 week' | $fromNow }}"
metadata:
name: Fenix - Pull Request
description: Building and testing fenix - triggered by a pull request.
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'
####################################################################################################
# Task: Master pushes
####################################################################################################
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
extra:
github:
env: true
events:
- push
branches:
- master
scopes:
- "queue:create-task:aws-provisioner-v1/github-worker"
- "queue:scheduler-id:taskcluster-github"
- "secrets:get:project/fenix/sentry"
- "secrets:get:project/fenix/preview-key-store"
- "queue:route:index.project.fenix.android.preview-builds"
payload:
maxRunTime: 3600
deadline: "{{ '2 hours' | $fromNow }}"
image: 'mozillamobile/phoenix:1.0'
command:
- /bin/bash
- '--login'
- '-cx'
- >-
git fetch origin
&& git checkout {{event.head.sha}}
&& python automation/taskcluster/get-secret.py -s project/fenix/sentry -k sentryDsn -f .sentry
&& ./gradlew --no-daemon clean assemble test detektCheck ktlint lint
&& ./gradlew --no-daemon clean assembleRelease
&& python automation/taskcluster/get-secret.py -s project/fenix/preview-key-store -k keyStoreFile -f .store --decode
&& python automation/taskcluster/get-secret.py -s project/fenix/preview-key-store -k keyStorePassword -f .store_token
&& python automation/taskcluster/get-secret.py -s project/fenix/preview-key-store -k keyPassword -f .key_token
&& python automation/taskcluster/sign-builds.py --zipalign --path ./app/build/outputs/apk --store .store --store-token .store_token --key-alias preview-key --key-token .key_token --archive preview
features:
taskclusterProxy: true
artifacts:
'public/preview':
type: 'directory'
path: '/build/phoenix/preview'
expires: "{{ '1 week' | $fromNow }}"
metadata:
name: Fenix - Master build
description: Building and testing fenix
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'