128 строки
5.1 KiB
YAML
128 строки
5.1 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: collaborators
|
|
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/android-components:1.4'
|
|
command:
|
|
- /bin/bash
|
|
- '--login'
|
|
- '-cx'
|
|
- >-
|
|
export TERM=dumb
|
|
&& git clone {{ event.head.repo.url }}
|
|
&& cd application-services
|
|
&& git config advice.detachedHead false
|
|
&& git checkout {{ event.head.sha }}
|
|
&& python automation/taskcluster/decision_task_pull_request.py
|
|
features:
|
|
taskclusterProxy: true
|
|
metadata:
|
|
name: application-services - Pull Request
|
|
description: Building and testing the Application Services repository - 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/application-services/publish"
|
|
payload:
|
|
maxRunTime: 7200
|
|
deadline: "{{ '4 hours' | $fromNow }}"
|
|
image: 'mozillamobile/rust-component:buildtools-27.0.3-ndk-r15c-ndk-version-21-rust-stable-rust-beta'
|
|
command:
|
|
- /bin/bash
|
|
- '-c'
|
|
- >-
|
|
export TERM=dumb
|
|
&& git clone '{{ event.head.repo.url }}' application-services
|
|
&& cd application-services
|
|
&& git config advice.detachedHead false
|
|
&& git checkout '{{ event.version }}'
|
|
&& python automation/taskcluster/release/fetch-bintray-api-key.py
|
|
&& ./scripts/taskcluster-android.sh
|
|
&& cd logins-api/android
|
|
&& ./gradlew --no-daemon clean library:assembleRelease
|
|
&& ./gradlew bintrayUpload --debug -PvcsTag="{{ event.head.sha }}"
|
|
artifacts:
|
|
'public/bin/mozilla/fxa_client_android_{{ event.version }}.zip':
|
|
type: 'file'
|
|
path: '/build/application-services/dist/fxa_client_android.zip'
|
|
routes:
|
|
- index.project.fxaclient.builds.{{ event.version }}
|
|
metadata:
|
|
name: fxa-client Android Build - Release ({{ event.version }})
|
|
description: Builds the FxA lib for Android architectures
|
|
owner: '{{ event.head.user.email }}'
|
|
source: '{{ event.head.repo.url }}'
|
|
|
|
####################################################################################################
|
|
# Task: Tag
|
|
####################################################################################################
|
|
- provisionerId: '{{ taskcluster.docker.provisionerId }}'
|
|
workerType: '{{ taskcluster.docker.workerType }}'
|
|
extra:
|
|
github:
|
|
events:
|
|
- tag
|
|
scopes:
|
|
- "secrets:get:project/application-services/publish"
|
|
payload:
|
|
maxRunTime: 7200
|
|
deadline: "{{ '4 hours' | $fromNow }}"
|
|
image: 'mozillamobile/rust-component:buildtools-27.0.3-ndk-r15c-ndk-version-21-rust-stable-rust-beta'
|
|
command:
|
|
- /bin/bash
|
|
- '-c'
|
|
- >-
|
|
export TERM=dumb
|
|
&& git clone '{{ event.head.repo.url }}' application-services
|
|
&& cd application-services
|
|
&& git config advice.detachedHead false
|
|
&& git checkout '{{ event.head.tag }}'
|
|
&& python automation/taskcluster/release/fetch-bintray-api-key.py
|
|
&& ./scripts/taskcluster-android.sh
|
|
&& cd logins-api/android
|
|
&& ./gradlew --no-daemon clean library:assembleRelease
|
|
&& ./gradlew bintrayUpload --debug -PvcsTag="{{ event.head.sha }}"
|
|
artifacts:
|
|
'public/bin/mozilla/fxa_client_android_{{ event.head.tag }}.zip':
|
|
type: 'file'
|
|
path: '/build/application-services/fxa-client/fxa_client_android.zip'
|
|
features:
|
|
taskclusterProxy: true
|
|
metadata:
|
|
name: application-services Android Build - Tag ({{ event.head.tag }})
|
|
description: Builds the FxA client and the Logins API for Android architectures.
|
|
owner: '{{ event.head.user.email }}'
|
|
source: '{{ event.head.repo.url }}'
|