mentat/.taskcluster.yml

81 lines
2.9 KiB
YAML
Raw Permalink Normal View History

# 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:
env: true
events:
- pull_request.opened
- pull_request.edited
- pull_request.synchronize
- pull_request.reopened
- push
scopes:
- "queue:create-task:aws-provisioner-v1/github-worker"
- "queue:scheduler-id:taskcluster-github"
payload:
maxRunTime: 3600
deadline: "{{ '2 hours' | $fromNow }}"
image: 'mozillamobile/mentat:1.1'
command:
- /bin/bash
- '--login'
- '-cx'
- >-
export TERM=dumb
&& git fetch {{ event.head.repo.url }} {{ event.head.repo.branch }}
&& git config advice.detachedHead false
&& git checkout {{event.head.sha}}
&& python automation/taskcluster/decision_task_pull_request.py
features:
taskclusterProxy: true
metadata:
name: Mentat Android SDK - Pull Request
description: Building and testing the Mentat Android SDK - triggered by a pull request.
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'
####################################################################################################
# Task: Release
####################################################################################################
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
extra:
github:
events:
- release
scopes:
- "secrets:get:project/mentat/publish"
payload:
maxRunTime: 3600
deadline: "{{ '2 hours' | $fromNow }}"
image: 'mozillamobile/mentat:1.1'
command:
- /bin/bash
- '--login'
- '-cx'
- >-
export TERM=dumb
&& git fetch origin --tags
&& git config advice.detachedHead false
&& git checkout {{ event.version }}
&& python automation/taskcluster/release/fetch-bintray-api-key.py
&& cd sdks/android/Mentat
&& ./gradlew --no-daemon clean library:assembleRelease
&& ./gradlew bintrayUpload --debug
features:
taskclusterProxy: true
metadata:
name: Mentat Android SDK - Release ({{ event.version }})
description: Building and publishing release versions.
owner: '{{ event.head.user.email }}'
source: '{{ event.head.repo.url }}'